/* =========================================================
   CalcNote — Main Stylesheet
   Font: Inter (UI), JetBrains Mono (code)
   Palette: from brand-guidelines.md
   ========================================================= */

/* Inter — self-hosted, OFL 1.1 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-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;
}

/* JetBrains Mono — self-hosted, OFL 1.1 */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../fonts/jetbrains-mono-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 {
  --accent:        #3B82F6;
  --accent-hover:  #2563EB;
  --accent-light:  #EFF6FF;
  --bg:            #FFFFFF;
  --bg-secondary:  #F9FAFB;
  --bg-dark:       #1A1A2E;
  --text:          #111827;
  --text-muted:    #6B7280;
  --purple:        #8B5CF6;
  --green:         #10B981;
  --border:        #E5E7EB;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
  --shadow-md:     0 4px 16px rgba(0,0,0,.10);
  --radius:        12px;
  --radius-sm:     8px;
  --mono:          'JetBrains Mono', 'Fira Code', monospace;
  --sans:          'Inter', -apple-system, sans-serif;
  --max-width:     1140px;
  --transition:    0.2s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--sans); }

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 80px 0; }

/* ---- Typography ---- */
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: 1.125rem; font-weight: 600; }
p  { line-height: 1.7; }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title { margin-bottom: 16px; }
.section-subtitle { color: var(--text-muted); font-size: 1.125rem; max-width: 560px; }
.text-center { text-align: center; }
.text-center .section-subtitle { margin: 0 auto; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.nav-logo img { display: block; border-radius: 6px; }
.nav-logo .logo-name { color: var(--text); }
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; transition: color var(--transition); }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links .btn-primary { color: #fff; }
.nav-links .btn-primary:hover { color: #fff; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-light); text-decoration: none; }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 80px 0;
  background: #0F172A;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  background: #1E3A5F;
  color: #93C5FD;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero-title { color: #fff; margin-bottom: 20px; line-height: 1.15; }
.hero-title .accent { color: var(--accent); }
.hero-desc { color: #94A3B8; font-size: 1.125rem; margin-bottom: 32px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.hero-note { font-size: 0.8rem; color: #64748B; }

/* App screenshot */
.hero-demo { display: flex; align-items: center; overflow: visible; }
.hero-screenshot {
  width: 120%;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  display: block;
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: zoom-in;
  transform-origin: center center;
}
.hero-screenshot:hover {
  transform: scale(1.35);
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works { background: var(--bg-secondary); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.step-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--border);
}
.step-number {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.step-card h3 { margin-bottom: 8px; }
.step-card p  { color: var(--text-muted); font-size: 0.9rem; }

/* ============================================================
   FEATURES
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.feature-card {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-md); }
.feature-icon {
  margin-bottom: 14px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: #EFF6FF;
  border-radius: 8px;
  flex-shrink: 0;
}
.feature-icon svg { color: var(--accent); }
.feature-card h3 { margin-bottom: 8px; }
.feature-card p  { color: var(--text-muted); font-size: 0.9rem; }

/* ============================================================
   PRICING
   ============================================================ */
.pricing { background: var(--bg-secondary); }
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 800px;
  margin: 48px auto 0;
}
.pricing-card {
  background: var(--bg);
  border-radius: 16px;
  padding: 32px;
  border: 1px solid var(--border);
  position: relative;
}
.pricing-card.featured {
  border: 2px solid var(--accent);
}
.plan-name { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.pricing-card.featured .plan-name { color: var(--accent); }
.plan-rec { text-transform: none; }
.plan-tier { font-size: 0.75em; font-weight: 400; letter-spacing: 0; text-transform: none; opacity: 0.55; }
.plan-price { font-size: 2.5rem; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.plan-price .currency { font-size: 1.25rem; font-weight: 500; }
.plan-price-note { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 24px; }
.plan-features { margin-bottom: 28px; }
.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features .check { color: var(--green); flex-shrink: 0; }
.plan-features .muted-feature { color: var(--text-muted); }
.plan-features .lock { color: var(--text-muted); flex-shrink: 0; }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { max-width: 720px; margin: 48px auto 0; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.faq-chevron {
  flex-shrink: 0;
  width: 20px; height: 20px;
  transition: transform var(--transition);
  color: var(--text-muted);
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding-bottom: 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.faq-item.open .faq-answer { display: block; }

/* ============================================================
   EARLY ACCESS (email capture)
   ============================================================ */
.early-access {
  background: linear-gradient(135deg, #1A1A2E 0%, #16213E 100%);
  color: #fff;
}
.early-access .section-label { color: #93C5FD; }
.early-access .section-title { color: #fff; }
.early-access .section-subtitle { color: rgba(255,255,255,.6); }
.early-access-inner { text-align: center; max-width: 560px; margin: 0 auto; }

.email-form { margin-top: 36px; }
.form-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.form-row input[type="email"] {
  flex: 1;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 0.95rem;
  font-family: var(--sans);
  outline: none;
  transition: border-color var(--transition);
}
.form-row input[type="email"]::placeholder { color: rgba(255,255,255,.35); }
.form-row input[type="email"]:focus { border-color: var(--accent); }

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  margin-bottom: 16px;
}
.consent-row input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.consent-text { font-size: 0.82rem; color: rgba(255,255,255,.55); line-height: 1.5; }
.consent-text a { color: #93C5FD; }
.form-success {
  display: none;
  color: var(--green);
  font-size: 0.95rem;
  padding: 12px;
  background: rgba(16,185,129,.1);
  border-radius: var(--radius-sm);
  margin-top: 12px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand p { font-size: 0.82rem; color: #9CA3AF; margin-top: 6px; }
.footer-legal { display: flex; flex-direction: column; gap: 6px; }
.footer-legal a { font-size: 0.75rem; color: #6B7280; text-decoration: none; }
.footer-legal a:hover { color: var(--text); }
.footer-legal div { font-size: 0.75rem; color: #6B7280; }
.footer-email { font-size: 0.82rem; color: #6B7280; text-decoration: none; }
.footer-email:hover { color: var(--text); }
.footer-bottom {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: #9CA3AF;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.rkn-notice { font-size: 0.75rem; color: #9CA3AF; }

/* ============================================================
   COOKIE BANNER
   ============================================================ */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: #fff;
  padding: 0 120px;
  height: 88px;
  display: none;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  box-shadow: 0 -4px 24px rgba(0,0,0,.10);
  border-top: 1px solid #E5E7EB;
}
.cookie-text { display: flex; flex-direction: column; gap: 4px; max-width: 760px; }
.cookie-title { font-size: 0.9375rem; font-weight: 600; color: #111827; }
.cookie-desc { font-size: 0.8125rem; line-height: 1.5; color: #6B7280; margin: 0; }
.cookie-text a { color: #3B82F6; }
.cookie-text a:hover { text-decoration: underline; }
.cookie-actions { display: flex; gap: 12px; flex-shrink: 0; }
.btn-cookie-accept {
  background: #3B82F6;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
}
.btn-cookie-accept:hover { background: var(--accent-hover); }
.btn-cookie-decline {
  background: transparent;
  color: #374151;
  border: 1.5px solid #D1D5DB;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-cookie-decline:hover { border-color: #9CA3AF; color: #111827; }

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-page { padding: 60px 0 80px; }
.legal-page .container { max-width: 800px; }
.legal-title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 8px; }
.legal-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 48px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.legal-body h2 { font-size: 1.2rem; margin: 36px 0 12px; }
.legal-body h3 { font-size: 1rem; margin: 24px 0 8px; color: var(--text-muted); }
.legal-body p  { margin-bottom: 14px; font-size: 0.95rem; }
.legal-body ul { margin: 12px 0 16px 24px; }
.legal-body ul li { list-style: disc; font-size: 0.95rem; margin-bottom: 6px; line-height: 1.6; }
.legal-body table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 0.875rem; }
.legal-body table th { text-align: left; padding: 10px 12px; background: var(--bg-secondary); border: 1px solid var(--border); font-weight: 600; }
.legal-body table td { padding: 10px 12px; border: 1px solid var(--border); vertical-align: top; }
.legal-body .highlight-box {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0 24px;
  font-size: 0.9rem;
}
.legal-breadcrumb { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 24px; }
.legal-breadcrumb a { color: var(--text-muted); }
.legal-breadcrumb a:hover { color: var(--accent); text-decoration: none; }

/* ============================================================
   CHANGELOG
   ============================================================ */
.changelog-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.changelog-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-version { background: #1E3A5F; color: #93C5FD; }
.badge-date    { background: #F3F4F6; color: var(--text-muted); font-weight: 500; }
.badge-current { background: #ECFDF5; color: #059669; font-weight: 500; }

.changelog-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.01em;
}

.changelog-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

.changelog-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.legal-body .changelog-features li,
.changelog-features li {
  list-style: none;
  font-size: 0.9375rem;
  color: #374151;
  line-height: 1.6;
  padding-left: 22px;
  position: relative;
}
.changelog-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 600;
}
.changelog-features code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner   { grid-template-columns: 1fr; gap: 40px; }
  .hero-demo    { order: -1; }
  .steps-grid   { grid-template-columns: 1fr; gap: 16px; }
  .features-grid{ grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .nav-links a:not(.btn) { display: none; }
}
@media (max-width: 600px) {
  section { padding: 56px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .form-row { flex-direction: column; }
  #cookie-banner { flex-direction: column; align-items: flex-start; height: auto; padding: 16px 20px; }
  .hero { padding: 64px 0 48px; }
  .nav-links .btn { display: none; }
}
