/* Bogdan landing — shared tokens */
:root {
  --gold: oklch(0.78 0.11 75);
  --gold-soft: oklch(0.78 0.11 75 / 0.18);
  --gold-line: oklch(0.78 0.11 75 / 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-feature-settings: "ss01", "ss02", "kern", "liga"; overflow-x: hidden; }
img, svg { max-width: 100%; }

.serif { font-family: "PT Serif", "Times New Roman", serif; }
.sans  { font-family: "Inter", "Helvetica Neue", Arial, sans-serif; }
.mono  { font-family: "JetBrains Mono", "SF Mono", Menlo, monospace; }

.hairline { height: 1px; width: 100%; }
.hairline-strong { height: 1px; width: 100%; background: currentColor; opacity: 0.3; }

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
}

a { color: inherit; }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* Block number styling */
.block-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
}

/* Quilt animation — torn grid → ordered grid */
.quilt-cell {
  transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.live-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* FAQ accordion */
.faq-item summary {
  list-style: none;
  cursor: pointer;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .chevron {
  transition: transform 0.3s ease;
}
.faq-item[open] .chevron {
  transform: rotate(45deg);
}

/* Scrollbar dark */
.dark-theme::-webkit-scrollbar { width: 10px; }
.dark-theme::-webkit-scrollbar-track { background: #0a0a0a; }
.dark-theme::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* ============================================================
   MOBILE BURGER (fixed top-right, shown via media query)
   ============================================================ */
.burger {
  display: none;
  position: fixed;
  top: 12px;
  right: 14px;
  z-index: 200;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid #d6d3cc;
  border-radius: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #0a0a0a;
  position: relative;
}
.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 1.5px;
  background: #0a0a0a;
  transition: transform 0.25s ease, top 0.25s ease;
}
.burger span::before { top: -6px; }
.burger span::after  { top:  6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #faf8f3;
  padding: 24px 24px 40px;
  overflow-y: auto;
}
.mobile-drawer.open { display: flex; flex-direction: column; gap: 24px; }
.mobile-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.mobile-drawer-nav a {
  font-family: "PT Serif", serif;
  font-size: 28px;
  color: #0a0a0a;
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid #d6d3cc;
}
.mobile-drawer-cta {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mobile-drawer-cta a {
  display: block;
  text-align: center;
  padding: 18px 22px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}
.mobile-drawer-cta a.primary {
  background: #0a0a0a;
  color: #fafaf7;
}
.mobile-drawer-cta a.secondary {
  border: 1px solid #d6d3cc;
  color: #0a0a0a;
}
body.drawer-open { overflow: hidden; }

/* ============================================================
   TABLET (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  /* Loosen the wide section paddings before phone layout kicks in */
  section[data-screen-label] {
    padding-left: 32px !important;
    padding-right: 32px !important;
    padding-top: 80px !important;
    padding-bottom: 80px !important;
  }
  header > div {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  footer {
    padding-left: 32px !important;
    padding-right: 32px !important;
  }
  /* Slightly less aggressive grid changes — three-col → two-col */
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 32px !important;
  }
}

/* ============================================================
   NARROW DESKTOP / TABLET (≤ 980px) — hide desktop header parts,
   replace with burger to avoid cramped wrap
   ============================================================ */
@media (max-width: 980px) {
  header nav { display: none !important; }
  header > div > div:last-child { display: none !important; }
  .burger { display: inline-flex; }
}

/* ============================================================
   PHONE (≤ 760px) — heavy overrides
   ============================================================ */
@media (max-width: 760px) {

  /* Section padding */
  section[data-screen-label] {
    padding-left: 18px !important;
    padding-right: 18px !important;
    padding-top: 56px !important;
    padding-bottom: 56px !important;
  }

  /* Header */
  header > div {
    padding: 12px 16px !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }
  header > div > div:first-child { flex-direction: column; align-items: flex-start !important; gap: 2px !important; }
  header > div > div:first-child > span:first-child { font-size: 16px !important; }
  header > div > div:first-child > span:last-child { font-size: 9px !important; }
  header nav { display: none !important; }
  /* Hide the right-side nav block (places + button) on mobile — burger replaces it */
  header > div > div:last-child { display: none !important; }
  /* Show burger (fixed-position element outside React tree) */
  .burger { display: inline-flex; }

  /* Generic stacking for explicit multi-column layouts */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 1fr 1.1fr"],
  [style*="grid-template-columns: 1fr 1.4fr"],
  [style*="grid-template-columns: 1.3fr 1fr"],
  [style*="grid-template-columns: 1fr 1.4fr"],
  [style*="grid-template-columns: 1fr auto"],
  [style*="grid-template-columns: 2fr 1fr 1fr"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns: 140px 1fr 200px"],
  [style*="grid-template-columns: 180px 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    padding-left: 0 !important;
  }

  /* Dashboard 4-col metrics → 2-col */
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  [style*="grid-template-columns: repeat(4"] > div {
    border-right: none !important;
    border-bottom: 1px solid #e7e3da !important;
  }
  /* Dashboard channel rows: name/delta on top, leads/cost below */
  [style*="grid-template-columns: 2fr 1fr 1fr 0.8fr"] {
    grid-template-columns: 1fr auto !important;
    gap: 2px 12px !important;
    align-items: center !important;
  }
  [style*="grid-template-columns: 2fr 1fr 1fr 0.8fr"] > span:nth-child(2) {
    grid-column: 1 !important;
    grid-row: 2 !important;
    font-size: 11px !important;
  }
  [style*="grid-template-columns: 2fr 1fr 1fr 0.8fr"] > span:nth-child(3) {
    grid-column: 2 !important;
    grid-row: 2 !important;
    text-align: right !important;
    font-size: 11px !important;
  }
  [style*="grid-template-columns: 2fr 1fr 1fr 0.8fr"] > span:nth-child(4) {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  /* Counter blocks: drop the side borders */
  [style*="grid-template-columns: repeat(3"] > div {
    border-right: none !important;
    border-bottom: 1px solid #d6d3cc;
    padding: 24px 0 !important;
  }
  [style*="grid-template-columns: repeat(3"] > div:last-child { border-bottom: none; }

  /* Big inline numbers — squish */
  .serif[style*="font-size: 160px"] { font-size: 96px !important; }
  .serif[style*="font-size: 112px"] { font-size: 64px !important; line-height: 1.05 !important; }
  .serif[style*="font-size: 96px"]  { font-size: 64px !important; }
  .serif[style*="font-size: 88px"]  { font-size: 56px !important; }
  .serif[style*="font-size: 64px"]  { font-size: 40px !important; }
  .serif[style*="font-size: 40px"]  { font-size: 30px !important; line-height: 1.2 !important; }
  .serif[style*="font-size: 36px"]  { font-size: 28px !important; line-height: 1.25 !important; }
  .serif[style*="font-size: 32px"]  { font-size: 24px !important; }
  .serif[style*="font-size: 30px"]  { font-size: 22px !important; line-height: 1.4 !important; }
  .serif[style*="font-size: 28px"]  { font-size: 22px !important; line-height: 1.3 !important; }
  .serif[style*="font-size: 26px"]  { font-size: 20px !important; }
  .serif[style*="font-size: 24px"]  { font-size: 18px !important; }

  /* Spacing/padding overrides for cards */
  [style*="padding: 56px"]  { padding: 28px 22px !important; }
  [style*="padding: 48px"]  { padding: 26px 20px !important; }
  [style*="padding: 36px 32px"] { padding: 22px 18px !important; }
  [style*="padding: 32px"]  { padding: 22px 18px !important; }

  /* Hero headline — already uses clamp() but its margin-bottom 80 is too much */
  section[data-screen-label="01 Hero"] h1.serif { margin-bottom: 40px !important; line-height: 0.96 !important; }
  section[data-screen-label="01 Hero"] h2.serif { margin-bottom: 32px !important; font-size: 16px !important; line-height: 1.55 !important; }
  section[data-screen-label="01 Hero"] [style*="padding: 56px 0"] { padding: 32px 0 !important; }

  /* Quilt SVG container height — shrink */
  section[data-screen-label="01 Hero"] [style*="height: 340px"],
  section[data-screen-label="01 Hero"] [style*="height: 340"] {
    height: 220px !important;
  }
  /* Quilt right-side text gets cramped */
  section[data-screen-label="01 Hero"] [style*="padding-left: 32px"] {
    padding-left: 0 !important;
  }
  section[data-screen-label="01 Hero"] [style*="margin-top: 96px"] { margin-top: 56px !important; }

  /* Hero CTA bar: 1fr/auto → stacked block */
  section[data-screen-label="01 Hero"] [style*="grid-template-columns: 1fr auto"] {
    padding: 28px 0 !important;
    gap: 20px !important;
  }

  /* Section bottom margins inside heros */
  [style*="margin-bottom: 96px"] { margin-bottom: 48px !important; }
  [style*="margin-bottom: 80px"] { margin-bottom: 40px !important; }
  [style*="margin-bottom: 64px"] { margin-bottom: 36px !important; }
  [style*="margin-top: 96px"]    { margin-top: 56px !important; }
  [style*="margin-top: 80px"]    { margin-top: 48px !important; }

  /* CTA buttons stack and fill width */
  a[href*="t.me/shapovalovbogdan"][style*="padding"] {
    justify-content: center;
    width: 100%;
  }
  /* Make the inline CTA links cluster wrap properly */
  /* Already wraps via flex-wrap */

  /* Process step grid: stack cleanly */
  section[data-screen-label="04 Process"] [style*="grid-template-columns: 140px 1fr 200px"] {
    padding: 24px 0 !important;
    gap: 8px !important;
  }
  section[data-screen-label="04 Process"] [style*="grid-template-columns: 140px 1fr 200px"] .mono {
    text-align: left !important;
    margin-top: 0 !important;
  }

  /* Two paths block rows: padding too big */
  section[data-screen-label="05 After"] [style*="background: #faf8f3"][style*="padding: 56px"] {
    padding: 28px 22px !important;
  }

  /* Audit pricing strip: drop 80px padding-left between two columns */
  section[data-screen-label="03 Audit"] [style*="padding-left: 80px"] {
    padding-left: 0 !important;
    border-left: none !important;
    padding-top: 28px !important;
    border-top: 1px solid #d6d3cc !important;
  }

  /* Fit big "10" + text */
  section[data-screen-label="07 Fit"] [style*="grid-template-columns: 180px 1fr"] {
    gap: 16px !important;
  }
  section[data-screen-label="07 Fit"] [style*="grid-template-columns: 180px 1fr"] > div:first-child {
    font-size: 96px !important;
  }

  /* FAQ summary text size */
  .faq-item summary .serif { font-size: 18px !important; line-height: 1.35 !important; }
  .faq-item > div { padding-left: 28px !important; font-size: 15px !important; }
  .faq-item summary > span:first-child { gap: 12px !important; }

  /* Footer tweaks */
  footer { padding: 40px 18px !important; }
  footer [style*="grid-template-columns: 2fr 1fr 1fr"] { gap: 28px !important; padding-bottom: 32px !important; }

  /* Block heads margin */
  section [class*="serif"] + p[style*="font-size: 17"] { font-size: 15px !important; }
  section p[style*="max-width: 760"] { font-size: 15px !important; line-height: 1.65 !important; }

  /* Hide block-num separator hairline (the long stroke between number and label) */
  /* keep — but reduce its width slightly is fine via global */
}

/* ============================================================
   SMALL PHONE (≤ 380px)
   ============================================================ */
@media (max-width: 380px) {
  section[data-screen-label] {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .serif[style*="font-size: 64px"]  { font-size: 36px !important; }
  .serif[style*="font-size: 96px"]  { font-size: 56px !important; }
  .serif[style*="font-size: 112px"] { font-size: 56px !important; }
  .serif[style*="font-size: 160px"] { font-size: 80px !important; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  header, footer, .live-dot, .mobile-drawer { display: none !important; }
  section { page-break-inside: avoid; padding: 24px !important; }
}
