/* Octet — Organic Chemistry landing site
   Palette derived from app icon: orange benzene hexagon (#F5821F) on charcoal (#1C1B1A) */

:root {
  --orange: #e56f0c;          /* darkened for AA contrast on light bg */
  --orange-bright: #f5821f;   /* icon orange, used on dark surfaces */
  --orange-deep: #c45e08;
  --ink: #241f1a;
  --ink-soft: #55483d;
  --paper: #fdf9f4;
  --paper-raised: #ffffff;
  --line: #e8ddd1;
  --charcoal: #1c1b1a;
  --charcoal-raised: #262422;
  --hex-tint: rgba(245, 130, 31, 0.08);
  --focus-ring: 3px solid var(--orange-bright);
  --radius: 14px;
  --shadow: 0 2px 12px rgba(36, 31, 26, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --orange: #f5821f;
    --orange-bright: #ff9a3d;
    --orange-deep: #f5821f;
    --ink: #f3ede5;
    --ink-soft: #c2b8ab;
    --paper: #1c1b1a;
    --paper-raised: #262422;
    --line: #3a3631;
    --hex-tint: rgba(245, 130, 31, 0.10);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--orange-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--orange-bright); }

:focus-visible { outline: var(--focus-ring); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--orange); color: #fff; padding: 0.6rem 1rem;
  z-index: 100; border-radius: 0 0 8px 0; text-decoration: none;
}
.skip-link:focus { left: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 0; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav-links { display: flex; gap: 1.4rem; list-style: none; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--orange-deep); }
.nav-cta {
  background: var(--orange); color: #fff !important; padding: 0.45rem 1rem;
  border-radius: 999px; font-weight: 600;
}
.nav-cta:hover { background: var(--orange-deep); }
@media (prefers-color-scheme: dark) {
  .nav-cta { color: #1c1b1a !important; }
  .nav-cta:hover { background: var(--orange-bright); }
}

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 0.45rem 0.6rem; cursor: pointer; color: var(--ink); font-size: 1.1rem; line-height: 1;
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper-raised); border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: none; padding-top: 0.75rem; }
  .nav-links a { display: block; padding: 0.75rem 0; }
  .nav-cta { text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse 900px 480px at 85% -10%, var(--hex-tint), transparent 65%),
    var(--paper);
  padding: 4rem 0 3.5rem;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--orange-deep);
  background: var(--hex-tint); border: 1px solid color-mix(in srgb, var(--orange) 30%, transparent);
  padding: 0.3rem 0.8rem; border-radius: 999px; margin-bottom: 1.1rem;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 1.1rem; }
h1 .hl { color: var(--orange-deep); }
.hero-sub { font-size: 1.15rem; color: var(--ink-soft); max-width: 34rem; margin-bottom: 1.8rem; }

.store-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; margin-bottom: 1.2rem; }
.appstore-badge {
  display: inline-flex; align-items: center; gap: 0.65rem;
  background: var(--charcoal); color: #fff; text-decoration: none;
  border: 1px solid #3a3631; border-radius: 12px; padding: 0.55rem 1.15rem;
}
.appstore-badge:hover { background: #2e2b28; color: #fff; }
.appstore-badge svg { width: 26px; height: 26px; flex-shrink: 0; }
.appstore-badge .badge-text { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.appstore-badge .badge-small { font-size: 0.68rem; opacity: 0.85; }
.appstore-badge .badge-big { font-size: 1.08rem; font-weight: 600; }

.hero-note { font-size: 0.9rem; color: var(--ink-soft); }

/* Hero visual: icon + stat hexagons */
.hero-visual { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.hero-icon {
  width: 148px; height: 148px; border-radius: 32px;
  box-shadow: 0 12px 36px rgba(245, 130, 31, 0.28);
}
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 0.8rem; width: 100%; max-width: 380px; }
.stat-card {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.9rem 1rem; text-align: center; box-shadow: var(--shadow);
}
.stat-card b { display: block; font-size: 1.5rem; color: var(--orange-deep); letter-spacing: -0.01em; }
.stat-card span { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- Sections ---------- */
section { padding: 3.6rem 0; }
section.alt { background: color-mix(in srgb, var(--paper-raised) 60%, var(--paper)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.015em; margin-bottom: 0.7rem; }
.section-lede { color: var(--ink-soft); max-width: 44rem; margin-bottom: 2.2rem; font-size: 1.08rem; }

/* Problem / solution */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.panel {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.7rem; box-shadow: var(--shadow);
}
.panel h3 { font-size: 1.2rem; margin-bottom: 0.8rem; }
.panel.problem h3 { color: var(--ink); }
.panel.solution { border-top: 4px solid var(--orange); }
.panel ul { padding-left: 1.2rem; color: var(--ink-soft); }
.panel li { margin-bottom: 0.55rem; }
.panel li::marker { color: var(--orange-deep); }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.2rem; }
.feature {
  background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); position: relative;
}
.feature .hex {
  width: 40px; height: 40px; margin-bottom: 0.9rem;
}
.feature h3 { font-size: 1.08rem; margin-bottom: 0.5rem; }
.feature p { font-size: 0.96rem; color: var(--ink-soft); }
.feature ul { font-size: 0.96rem; color: var(--ink-soft); padding-left: 1.15rem; margin-top: 0.4rem; }
.feature li { margin-bottom: 0.3rem; }
.feature li::marker { color: var(--orange-deep); }

/* Free vs Premium */
.tier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; max-width: 820px; }
@media (max-width: 720px) { .tier-grid { grid-template-columns: 1fr; } }
.tier { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.7rem; box-shadow: var(--shadow); }
.tier.premium { border: 2px solid var(--orange); }
.tier h3 { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.4rem; }
.tier .price { font-size: 0.85rem; font-weight: 600; color: var(--orange-deep); text-transform: uppercase; letter-spacing: 0.06em; }
.tier ul { padding-left: 1.2rem; color: var(--ink-soft); margin-top: 0.7rem; }
.tier li { margin-bottom: 0.45rem; }
.tier li::marker { color: var(--orange-deep); }

/* How it helps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; counter-reset: step; }
.step { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; margin-bottom: 0.8rem;
  background: var(--orange); color: #fff; font-weight: 700;
}
@media (prefers-color-scheme: dark) { .step::before { color: #1c1b1a; } }
.step h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.step p { font-size: 0.95rem; color: var(--ink-soft); }

/* FAQ accordion */
.faq-list { max-width: 780px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 0.8rem; background: var(--paper-raised); box-shadow: var(--shadow); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 1.05rem 1.25rem; font-size: 1.02rem; font-weight: 600; color: var(--ink);
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-family: inherit;
}
.faq-q .chev { transition: transform 0.2s ease; color: var(--orange-deep); flex-shrink: 0; font-size: 0.85rem; }
.faq-q[aria-expanded="true"] .chev { transform: rotate(180deg); }
.faq-a { padding: 0 1.25rem 1.15rem; color: var(--ink-soft); }
.faq-a[hidden] { display: none; }

/* Guides teaser */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.guide-card {
  display: block; background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem; text-decoration: none;
  box-shadow: var(--shadow); color: var(--ink);
}
.guide-card:hover { border-color: var(--orange); color: var(--ink); }
.guide-card .tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--orange-deep); }
.guide-card h3 { font-size: 1.08rem; margin: 0.45rem 0 0.45rem; }
.guide-card p { font-size: 0.92rem; color: var(--ink-soft); }

/* Final CTA */
.cta-band {
  background: var(--charcoal); color: #f3ede5; text-align: center;
  padding: 4rem 0; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 700px 340px at 50% 120%, rgba(245,130,31,0.22), transparent 70%);
}
.cta-band > .wrap { position: relative; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c2b8ab; max-width: 36rem; margin: 0.6rem auto 1.8rem; }
.cta-band .appstore-badge { background: var(--orange-bright); color: #1c1b1a; border-color: transparent; }
.cta-band .appstore-badge:hover { background: #ffab5e; color: #1c1b1a; }

/* ---------- Footer ---------- */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding: 2.6rem 0 2rem; font-size: 0.92rem; color: var(--ink-soft); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; margin-bottom: 1.8rem; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink); margin-bottom: 0.7rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--orange-deep); }
.footer-note { border-top: 1px solid var(--line); padding-top: 1.2rem; font-size: 0.85rem; }

/* ---------- Guide article pages ---------- */
.breadcrumb { font-size: 0.88rem; color: var(--ink-soft); padding: 1.2rem 0 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumb li + li::before { content: "›"; margin-right: 0.4rem; color: var(--line); }
.article { max-width: 760px; margin: 0 auto; padding: 1.6rem 1.25rem 3.5rem; }
.article header { margin-bottom: 2rem; }
.article h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.article .meta { color: var(--ink-soft); font-size: 0.92rem; margin-top: 0.6rem; }
.article h2 { margin-top: 2.4rem; font-size: 1.45rem; }
.article h3 { margin-top: 1.6rem; margin-bottom: 0.5rem; font-size: 1.15rem; }
.article p { margin-bottom: 1.1rem; }
.article ul, .article ol { margin: 0 0 1.1rem 1.4rem; }
.article li { margin-bottom: 0.5rem; }
.article li::marker { color: var(--orange-deep); }
.article table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: 0.95rem; }
.article th, .article td { border: 1px solid var(--line); padding: 0.55rem 0.7rem; text-align: left; }
.article th { background: var(--hex-tint); color: var(--ink); }
.article .table-scroll { overflow-x: auto; }
.callout {
  background: var(--hex-tint); border-left: 4px solid var(--orange);
  border-radius: 0 10px 10px 0; padding: 1.1rem 1.3rem; margin: 1.6rem 0;
}
.callout h2, .callout h3 { margin-top: 0; }
.next-guides { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 1.6rem; }
.next-guides h2 { font-size: 1.2rem; margin-top: 0; }
