/*
Theme Name: GetFlow
Theme URI: https://get-flow.ru
Description: Child theme для GetFlow блога. Основана на GeneratePress.
Author: GetFlow
Template: generatepress
Version: 1.0.0
Text Domain: getflow
*/

/* ===========================
   CSS DESIGN TOKENS
   =========================== */
:root {
  /* Fonts */
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --font-hand: 'Caveat', cursive;

  /* Foundation */
  --ink: #1C1C1A;
  --body-color: #37372F;
  --muted: #6B6B66;
  --subtle: #9B9B94;
  --border: #D4D4CF;
  --line: #E8E8E4;
  --surface: #F5F5F2;
  --canvas: #FAFAF7;

  /* Teal */
  --teal-950: #042F2E;
  --teal-800: #115E59;
  --teal-700: #0F766E;
  --teal-600: #0D9488;
  --teal-500: #14B8A6;
  --teal-300: #5EEAD4;
  --teal-100: #CCFBF1;
  --teal-50: #F0FDFA;

  /* Amber */
  --amber-800: #92400E;
  --amber-600: #D97706;
  --amber-300: #FCD34D;
  --amber-50: #FFFBEB;

  /* Semantic */
  --success: #16A34A;
  --error: #DC2626;
  --warning: #D97706;
  --info: #2563EB;

  /* Layout */
  --content-width: 720px;
  --wide-width: 960px;
  --site-width: 1100px;
}

/* ===========================
   RESET & BASE
   =========================== */
body {
  background-color: var(--canvas);
  color: var(--body-color);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ===========================
   TYPOGRAPHY
   =========================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--ink);
  line-height: 1.25;
}

h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
}

h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-top: 48px;
  margin-bottom: 16px;
}

h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin-top: 36px;
  margin-bottom: 12px;
}

h4 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 8px;
}

p {
  margin-bottom: 16px;
}

/* ===========================
   LINKS
   =========================== */
a {
  color: var(--teal-600);
  text-decoration: underline;
  text-decoration-color: var(--teal-100);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  transition: text-decoration-color 0.2s ease;
}

a:hover {
  text-decoration-color: var(--teal-600);
}

/* ===========================
   CODE
   =========================== */
code, pre {
  font-family: var(--font-mono);
}

code {
  font-size: 14px;
  background: var(--teal-50);
  color: var(--teal-700);
  padding: 2px 6px;
  border-radius: 4px;
}

pre {
  background: var(--ink);
  color: #B0B0A8;
  padding: 20px 24px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  margin: 24px 0;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* ===========================
   IMAGES
   =========================== */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ===========================
   BLOCKQUOTE / CALLOUT
   =========================== */
blockquote {
  background: var(--teal-50);
  border-left: 3px solid var(--teal-600);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  font-family: var(--font-heading);
  font-size: 15px;
  color: var(--teal-700);
  font-style: normal;
}

blockquote p {
  margin-bottom: 0;
}

/* ===========================
   LISTS
   =========================== */
ul, ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

li {
  margin-bottom: 6px;
}

/* ===========================
   TABLES
   =========================== */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

th {
  text-align: left;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--subtle);
  padding: 10px 12px;
  border-bottom: 2px solid var(--line);
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

/* ===========================
   HR
   =========================== */
hr {
  border: none;
  height: 1px;
  background: var(--line);
  margin: 48px 0;
}

/* ===========================
   SELECTION
   =========================== */
::selection {
  background: var(--teal-100);
  color: var(--teal-950);
}

/* ===========================
   HEADER
   =========================== */
.site-header {
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.getflow-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.getflow-logo:hover {
  text-decoration: none;
}

.getflow-logo svg {
  height: 28px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--teal-600);
  text-decoration: none;
}

/* ===========================
   FOOTER
   =========================== */
.site-footer {
  background-color: var(--ink);
  background-image: radial-gradient(circle, rgba(20,184,166,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  padding: 48px 24px;
  text-align: center;
}

.site-footer__inner {
  max-width: var(--site-width);
  margin: 0 auto;
}

.site-footer .getflow-logo svg {
  height: 24px;
}

.site-footer__tagline {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.5;
}

/* ===========================
   CATEGORY BADGES
   =========================== */
.category-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  color: var(--teal-600);
  background: var(--teal-50);
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.3px;
  text-decoration: none;
}

.category-badge:hover {
  background: var(--teal-100);
  text-decoration: none;
}

/* ===========================
   POST CARD
   =========================== */
.post-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.post-card__image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.post-card__content {
  padding: 20px 24px;
}

.post-card__title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin-bottom: 8px;
  line-height: 1.3;
}

.post-card__title a {
  color: inherit;
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--teal-600);
}

.post-card__excerpt {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.post-card__meta {
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--subtle);
}

/* ===========================
   BUTTONS
   =========================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--teal-600);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: var(--teal-700);
  color: white;
  text-decoration: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--ink);
  padding: 10px 20px;
  border-radius: 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--subtle);
  background: var(--surface);
  text-decoration: none;
}

/* ===========================
   OVERLINE
   =========================== */
.overline {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--subtle);
  margin-bottom: 12px;
}

/* ===========================
   HIGHLIGHT BOX
   =========================== */
.highlight-box {
  background: var(--teal-50);
  border-left: 3px solid var(--teal-600);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
}

.highlight-box p {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--teal-700);
  line-height: 1.6;
  margin: 0;
}

.highlight-box.warning {
  background: var(--amber-50);
  border-left-color: var(--amber-600);
}

.highlight-box.warning p {
  color: var(--amber-800);
}

/* ===========================
   SCREENSHOT FRAME
   =========================== */
.screenshot-frame {
  background: var(--surface);
  padding: 32px;
  border-radius: 12px;
  margin: 32px 0;
  background-image: radial-gradient(circle, rgba(28,28,26,0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  background-color: var(--surface);
}

.screenshot-frame__browser {
  background: white;
  border-radius: 10px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.06);
  max-width: 100%;
  margin: 0 auto;
}

.screenshot-frame__titlebar {
  background: var(--surface);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--line);
}

.screenshot-frame__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.screenshot-frame__dot--red { background: #DC2626; opacity: 0.3; }
.screenshot-frame__dot--yellow { background: #D97706; opacity: 0.3; }
.screenshot-frame__dot--green { background: #16A34A; opacity: 0.3; }

.screenshot-frame__url {
  margin-left: 12px;
  background: var(--line);
  border-radius: 6px;
  padding: 3px 14px;
  font-family: var(--font-heading);
  font-size: 11px;
  color: var(--subtle);
}

.screenshot-frame__content img {
  display: block;
  width: 100%;
  border-radius: 0;
}

/* ===========================
   SINGLE POST
   =========================== */
.single-post__header {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 48px 24px 0;
  text-align: left;
}

.single-post__categories {
  margin-bottom: 16px;
}

.single-post__title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 16px;
}

.single-post__meta {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 400;
  color: var(--subtle);
  margin-bottom: 32px;
}

.single-post__meta span + span::before {
  content: ' · ';
}

.single-post__featured {
  max-width: var(--wide-width);
  margin: 0 auto 40px;
  padding: 0 24px;
}

.single-post__featured img {
  width: 100%;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.single-post__content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px 48px;
}

.single-post__content h2 {
  margin-top: 48px;
}

.single-post__content h3 {
  margin-top: 36px;
}

/* Post navigation */
.post-nav {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px 48px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.post-nav a {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-nav a:hover {
  color: var(--teal-600);
}

/* ===========================
   HERO SECTION (FRONT PAGE)
   =========================== */
.hero {
  background-color: var(--ink);
  background-image: radial-gradient(circle, rgba(20,184,166,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero__inner {
  max-width: var(--site-width);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero .overline {
  color: var(--subtle);
}

.hero__title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
  color: var(--canvas);
  margin-bottom: 16px;
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: 18px;
  font-style: italic;
  color: var(--subtle);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Flow line SVG decoration */
.hero__flowline {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80px;
  pointer-events: none;
}

/* ===========================
   POST CARDS GRID
   =========================== */
.post-cards-section {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 48px 24px;
}

.post-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.post-cards-section__footer {
  text-align: center;
  margin-top: 40px;
}

/* ===========================
   ARCHIVE / CATEGORY
   =========================== */
.archive-header {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 48px 24px 0;
}

.archive-header__badge {
  margin-bottom: 12px;
}

.archive-header__title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--ink);
}

.archive-header__description {
  font-family: var(--font-body);
  font-size: 17px;
  color: var(--muted);
  margin-top: 8px;
  max-width: var(--content-width);
}

/* Pagination */
.pagination {
  max-width: var(--site-width);
  margin: 0 auto;
  padding: 24px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pagination a,
.pagination span {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.pagination a:hover {
  background: var(--surface);
  color: var(--teal-600);
  text-decoration: none;
}

.pagination .current {
  background: var(--teal-600);
  color: white;
}

/* ===========================
   PAGE TEMPLATE (About etc.)
   =========================== */
.page-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 48px 24px;
}

.page-content__title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 32px;
}

/* ===========================
   GENERATEPRESS OVERRIDES
   =========================== */
/* Remove GeneratePress defaults that conflict */
.inside-article {
  padding: 0;
}

.entry-content {
  margin-top: 0;
}

.site-content {
  padding: 0;
}

/* Hide GP header/footer — we use custom ones */
#site-navigation,
.main-navigation {
  display: none;
}

/* Remove GP container constraints */
.site-main .inside-article {
  max-width: none;
}

/* Remove default sidebar */
#right-sidebar,
#left-sidebar {
  display: none;
}

.site-content .content-area {
  width: 100%;
}

/* ===========================
   RESPONSIVE — TABLET
   =========================== */
@media (max-width: 768px) {
  h1,
  .single-post__title,
  .hero__title,
  .archive-header__title,
  .page-content__title {
    font-size: 28px;
  }

  h2 { font-size: 22px; }

  body { font-size: 16px; }

  .post-cards-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 48px 24px;
  }

  .site-header__inner {
    padding: 0 16px;
  }

  .site-nav {
    gap: 16px;
  }

  .post-nav {
    flex-direction: column;
  }
}

/* ===========================
   RESPONSIVE — MOBILE
   =========================== */
@media (max-width: 480px) {
  h1,
  .single-post__title,
  .hero__title,
  .archive-header__title,
  .page-content__title {
    font-size: 24px;
  }

  h2 { font-size: 20px; }

  .screenshot-frame {
    padding: 16px;
  }

  .single-post__header,
  .single-post__featured,
  .single-post__content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .post-cards-section {
    padding: 32px 16px;
  }

  .site-nav {
    gap: 12px;
  }

  .site-nav a {
    font-size: 13px;
  }
}
