/* studyhop.kz — тот же дизайн-язык, что у studyhop.ru (светлая бумага + шалфей).
 * Шрифты свои, без CDN:
 *   Lora    — заголовки (полная казахская кириллица + ₸; у Fraunces кириллицы нет);
 *   Fraunces Italic — только словесный знак «StudyHop»;
 *   Geist   — текст; знак ₸ добирается из подмножества Noto Sans (у Geist его нет).
 */

@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/Fraunces-Italic.ttf") format("truetype"); }

@font-face { font-family: "Geist"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/Geist-Regular.ttf") format("truetype"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/Geist-Medium.ttf") format("truetype"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/Geist-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/GeistMono-Regular.ttf") format("truetype"); }

@font-face { font-family: "Tenge"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/tenge-400.woff2") format("woff2"); unicode-range: U+20B8; }
@font-face { font-family: "Tenge"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/tenge-600.woff2") format("woff2"); unicode-range: U+20B8; }

/* Lora: те же подмножества и unicode-range, что отдаёт Google Fonts */
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/assets/fonts/Lora-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/assets/fonts/Lora-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/assets/fonts/Lora-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url("/assets/fonts/Lora-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper:        #F3EEE2;
  --surface:      #FFFFFF;
  --surface-2:    #FAF6EC;
  --border:       #E6E1D4;
  --border-hi:    #D4CFC0;

  --text:         #15120E;
  --text-muted:   #5C5448;
  --text-subtle:  #7D7568;
  --text-dim:     #B8B0A0;

  --sage:         #9EAE9A;
  --sage-deep:    #5F7559;
  --sage-btn:     #6B8264;
  --sage-btn-hi:  #5A7053;
  --sage-soft:    #DCE3D8;

  --todo-bg:      #FFE58A;
  --todo-fg:      #4A3800;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(33, 28, 16, 0.04);
  --shadow:    0 2px 8px rgba(33, 28, 16, 0.06), 0 1px 2px rgba(33, 28, 16, 0.04);
  --shadow-lg: 0 24px 60px rgba(33, 28, 16, 0.12);

  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-word:    "Fraunces", "Lora", Georgia, serif;
  --font-sans:    "Geist", "Tenge", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, SFMono-Regular, monospace;

  --content-max: 1100px;
  --gutter: clamp(16px, 4vw, 24px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

a { color: var(--sage-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--sage-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

img, svg { display: block; max-width: 100%; }

mark.todo {
  background: var(--todo-bg);
  color: var(--todo-fg);
  padding: 0 0.3em;
  border-radius: 4px;
  font-weight: 500;
}

.draft-banner {
  background: var(--todo-bg);
  color: var(--todo-fg);
  text-align: center;
  font-size: 14px;
  padding: 8px var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "brand lang" "nav nav";
  align-items: center;
  gap: 12px 24px;
}
@media (min-width: 760px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav lang";
  }
}

.brand { grid-area: brand; display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo { width: 40px; height: 40px; border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.brand-word {
  font-family: var(--font-word);
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.01em;
}

.site-nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
@media (min-width: 760px) { .site-nav { justify-content: flex-end; } }
.site-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 0;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--sage); }

.lang-switch {
  grid-area: lang;
  display: inline-flex;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
}
.lang-switch a, .lang-switch .lang-current {
  padding: 5px 12px;
  border-radius: var(--r-full);
  line-height: 1.2;
}
.lang-switch a { color: var(--text-muted); }
.lang-switch a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.lang-switch .lang-current { background: var(--text); color: var(--paper); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: var(--r-full);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--sage-btn); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--sage-btn-hi); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border-hi); }
.btn-ghost:hover { border-color: var(--text-subtle); }
.btn-icon { flex-shrink: 0; }

.text-link { font-weight: 500; }

/* ---------- Sections ---------- */

.section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(48px, 7vw, 72px) var(--gutter) 0;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4.2vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 20px;
}

.section-lead {
  margin: -6px 0 28px;
  max-width: 40em;
  color: var(--text-muted);
}

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.25;
  margin: 14px 0 8px;
}
.card p { margin: 0; font-size: 16px; color: var(--text-muted); }

/* ---------- Hero ---------- */

.hero {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 56px) var(--gutter) 0;
  display: grid;
  gap: 56px;
  align-items: center;
}
@media (min-width: 880px) { .hero { grid-template-columns: 1.15fr 1fr; gap: 80px; } }

.hero-title { margin: 0 0 14px; }
.hero-mark {
  font-family: var(--font-word);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(56px, 9vw, 96px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero-sub {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.hero-lead {
  margin: 0 0 28px;
  font-size: clamp(16px, 1.8vw, 18px);
  color: var(--text-muted);
  max-width: 32em;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.hero-meta { margin: 0; font-size: 14px; color: var(--text-subtle); }

@media (max-width: 479px) {
  .hero-actions .btn { width: 100%; }
}

/* CSS-мокап экрана приложения */
.hero-mockup { display: flex; justify-content: center; }
.phone-frame {
  width: 280px;
  background: #15120E;
  border-radius: 36px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.phone-notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 22px; background: #15120E; border-radius: 0 0 14px 14px; z-index: 2;
}
.phone-screen {
  background: #0A0906; border-radius: 28px; overflow: hidden; height: 540px;
  color: #F5F3EE; display: flex; flex-direction: column;
}
.screen-statusbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px 8px; font-family: var(--font-mono); font-size: 12px; color: #C9BFAE;
}
.status-dots { display: flex; gap: 3px; }
.status-dots .dot { width: 4px; height: 4px; background: #C9BFAE; border-radius: 50%; }
.screen-navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 16px 10px; border-bottom: 1px solid #241F19;
}
.screen-back { color: var(--sage); font-size: 22px; line-height: 1; }
.screen-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.screen-action { width: 22px; }
.screen-content { padding: 16px 14px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bubble { padding: 10px 12px; border-radius: 14px; font-size: 13px; line-height: 1.4; max-width: 86%; }
.bubble-kicker {
  display: block; font-family: var(--font-mono); font-size: 9px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--sage); margin-bottom: 4px;
}
.bubble-user { align-self: flex-end; background: rgba(158, 174, 154, 0.18); border: 1px solid rgba(158, 174, 154, 0.35); }
.bubble-ai { align-self: flex-start; background: #15120E; border: 1px solid #241F19; }
.record-area { margin-top: auto; display: flex; flex-direction: column; align-items: center; padding-top: 16px; gap: 8px; }
.record-button {
  width: 64px; height: 64px; border-radius: 50%; background: var(--sage); position: relative;
  box-shadow: 0 0 0 8px rgba(158, 174, 154, 0.18);
}
.record-button::before {
  content: ""; position: absolute; inset: 50% auto auto 50%; width: 22px; height: 22px;
  background: #110F0B; border-radius: 8px; transform: translate(-50%, -50%);
}
.record-hint { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: #8A8275; }

/* ---------- Steps / features ---------- */

.step-list, .feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
@media (min-width: 760px) {
  .step-list, .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--text); color: var(--paper);
  font-family: var(--font-mono); font-size: 15px;
}
.feature-icon {
  width: 52px; height: 52px; border-radius: var(--r-md);
  background: var(--sage-soft); color: var(--sage-deep);
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Tariffs ---------- */

.tariff-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .tariff-grid { grid-template-columns: 1fr 1fr; gap: 20px; } }

.tariff-card { display: flex; flex-direction: column; padding: 28px; }
.tariff-premium { border-color: var(--sage); box-shadow: 0 0 0 1px var(--sage), var(--shadow); }
.tariff-card .tariff-name { margin-top: 0; font-size: 26px; }
.tariff-tagline { margin: 0 0 20px !important; }

.price-list { list-style: none; margin: 0 0 20px; padding: 0; border-top: 1px solid var(--border); }
.price-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.price-term { color: var(--text-muted); }
.price-amount {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.01em;
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}

.tariff-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tariff-features li {
  position: relative; padding-left: 26px; font-size: 15px; color: var(--text-muted);
}
.tariff-features li::before {
  content: ""; position: absolute; left: 2px; top: 0.45em;
  width: 12px; height: 7px;
  border-left: 2px solid var(--sage-deep); border-bottom: 2px solid var(--sage-deep);
  transform: rotate(-45deg);
}

.trial-note {
  margin: 20px 0 0;
  padding: 14px 18px;
  background: var(--surface-2);
  border: 1px dashed var(--border-hi);
  border-radius: var(--r-md);
  font-size: 15px;
  color: var(--text-muted);
}
.trial-note strong { color: var(--text); }

.tariff-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px;
  margin-top: 24px;
}

/* ---------- Payment strip / logos ---------- */

.pay-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.pay-strip p { margin: 0; flex: 1 1 280px; font-size: 15px; color: var(--text-muted); }

.pay-logos { display: flex; gap: 10px; align-items: center; }
.pay-logo {
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; padding: 0 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.pay-logo-lg { height: 48px; padding: 0 14px; border-radius: 8px; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: clamp(64px, 9vw, 104px);
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  padding: 48px var(--gutter) 32px;
  font-size: 14px;
  color: var(--text-muted);
}
.footer-grid {
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  gap: 32px;
}
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

.footer-brand { display: flex; align-items: flex-start; gap: 12px; }
.footer-brand .brand-logo { width: 44px; height: 44px; flex-shrink: 0; }
.footer-word { display: block; font-size: 22px; line-height: 1; margin: 4px 0 8px; }
.footer-legal-name { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }
.footer-address { margin: 6px 0 0; font-size: 13px; color: var(--text-subtle); line-height: 1.45; }

.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--text-muted); }
.footer-col a:hover { color: var(--text); }
.footer-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.footer-meta {
  max-width: var(--content-max);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--text-subtle);
}
.footer-divider { color: var(--text-dim); }
.footer-pay { display: inline-flex; gap: 8px; margin-left: auto; }
@media (max-width: 559px) { .footer-pay { margin-left: 0; width: 100%; } }

/* ---------- Text pages (оферта, политика, оплата, возврат, контакты) ---------- */

.legal-page {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px) var(--gutter) 0;
}
.legal-page h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4.2vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
}
.legal-page h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.3;
  margin: 36px 0 12px;
}
.legal-page h3 { font-size: 17px; font-weight: 600; margin: 24px 0 8px; }
.legal-page p, .legal-page li { font-size: 16px; color: var(--text-muted); }
.legal-page strong { color: var(--text); }
.legal-page ul, .legal-page ol { padding-left: 1.4em; }
.legal-page li { margin-bottom: 0.4em; }
.legal-page .meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin: 0 0 28px;
}
.legal-page table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}
.legal-page th, .legal-page td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.legal-page th { background: var(--surface-2); font-weight: 600; color: var(--text); }
.legal-page td { color: var(--text-muted); }
.legal-page .pay-logos { margin: 16px 0; }
.legal-page .notice {
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--sage);
  border-radius: var(--r-sm);
}
