/* ==========================================================================
   Bookshelf — website styles
   Brand: navy #0D0C45, teal #0FCEC9 (taken from the logo)
   Type:  Poppins (headings/UI, matches the wordmark) + Source Serif 4 (prose)
   ========================================================================== */

:root {
  --ink:        #0D0C45;
  --ink-2:      #171A5C;
  --ink-deep:   #08072E;
  --teal:       #0FCEC9;
  --teal-ink:   #0A8582;   /* teal that passes contrast on light backgrounds */
  --teal-soft:  #E6FAF9;

  --paper:      #F6F7FC;
  --surface:    #FFFFFF;
  --surface-2:  #FBFBFE;
  --text:       #14133F;
  --slate:      #565B85;
  --line:       #E4E6F2;

  --shadow:     0 1px 2px rgba(13,12,69,.04), 0 12px 32px -18px rgba(13,12,69,.22);
  --shadow-lg:  0 30px 60px -28px rgba(13,12,69,.45);

  --radius:     16px;
  --radius-sm:  10px;
  --container:  1080px;

  --font-display: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:     #0A0A2A;
    --surface:   #12123F;
    --surface-2: #16164A;
    --text:      #E9EAF6;
    --slate:     #A2A6CE;
    --line:      #262861;
    --teal-ink:  #4FE3DF;
    --teal-soft: #14304A;
    --shadow:    0 1px 2px rgba(0,0,0,.3), 0 12px 32px -18px rgba(0,0,0,.6);
    --shadow-lg: 0 30px 60px -28px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --paper:     #0A0A2A;
  --surface:   #12123F;
  --surface-2: #16164A;
  --text:      #E9EAF6;
  --slate:     #A2A6CE;
  --line:      #262861;
  --teal-ink:  #4FE3DF;
  --teal-soft: #14304A;
  --shadow:    0 1px 2px rgba(0,0,0,.3), 0 12px 32px -18px rgba(0,0,0,.6);
  --shadow-lg: 0 30px 60px -28px rgba(0,0,0,.7);
}

/* --------------------------------------------------------------- base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, .u-display { font-family: var(--font-display); font-weight: 700; line-height: 1.15; text-wrap: balance; margin: 0; letter-spacing: -.02em; }
h1 { font-size: clamp(2.15rem, 5.2vw, 3.35rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.16rem; letter-spacing: -.01em; }
p  { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }

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

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }

.eyebrow {
  font-family: var(--font-display); font-weight: 600; font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--teal-ink);
  margin: 0 0 .7rem;
}

.lede { font-size: 1.12rem; color: var(--slate); }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 0 0 10px 0;
  font-family: var(--font-display); font-weight: 600;
}
.skip:focus { left: 0; }

/* ------------------------------------------------------------- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 20px; min-height: 72px; }

.brand { display: inline-flex; align-items: center; flex: none; }
.brand picture { display: inline-flex; }
.brand img { height: 30px; width: auto; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav a {
  font-family: var(--font-display); font-weight: 500; font-size: .93rem;
  color: var(--text); text-decoration: none; padding: 9px 13px; border-radius: 9px;
}
.nav a:hover { background: var(--teal-soft); color: var(--text); }
.nav a[aria-current="page"] { color: var(--teal-ink); font-weight: 600; }
/* The button inside the nav must win over the generic `.nav a` colour. */
.nav a.btn-primary { color: #fff; }
.nav a.btn-primary:hover { color: #fff; }
:root[data-theme="dark"] .nav a.btn-primary { color: #05203A; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav a.btn-primary { color: #05203A; }
}
@media (max-width: 860px) { .nav a.nav-hide { display: none; } }
@media (max-width: 620px) {
  .nav a.nav-hide-sm { display: none; }
  .site-header .container { gap: 10px; }
  .brand img { height: 25px; }
  .nav { gap: 2px; }
  .nav a { padding: 8px 9px; font-size: .87rem; }
  .btn-sm { padding: 9px 13px; }
}

/* ------------------------------------------------------------ buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: .96rem;
  padding: 13px 22px; border-radius: 12px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 10px 24px -12px rgba(13,12,69,.7); }
.btn-primary:hover { background: var(--ink-2); color: #fff; transform: translateY(-1px); }
:root[data-theme="dark"] .btn-primary { background: var(--teal); color: #05203A; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-primary { background: var(--teal); color: #05203A; }
}
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); color: var(--text); border-color: var(--slate); }
.btn-sm { padding: 9px 16px; font-size: .88rem; border-radius: 10px; }

/* --------------------------------------------------------------- hero ---- */
.hero { padding: clamp(52px, 8vw, 92px) 0 clamp(44px, 6vw, 72px); overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px; align-items: center; }
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
}
.hero h1 { margin-bottom: 18px; }
.hero h1 .accent {
  background: linear-gradient(transparent 66%, rgba(15,206,201,.42) 66%, rgba(15,206,201,.42) 94%, transparent 94%);
  padding-inline: 2px;
}
.hero .lede { font-size: 1.2rem; max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-meta {
  margin-top: 22px; font-family: var(--font-display); font-size: .84rem; color: var(--slate);
  display: flex; align-items: center; gap: 9px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex: none; }

/* --------------------------------------------------- phone mockup (art) -- */
.hero-art { display: flex; justify-content: center; }
.phone {
  width: 268px; border-radius: 34px; background: #08081F; padding: 9px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,.06) inset;
  position: relative;
}
.phone-screen {
  border-radius: 26px; background: #F6F7FB; overflow: hidden;
  font-family: var(--font-display); color: #14133F; font-size: 11px;
}
.phone-notch {
  position: absolute; top: 17px; left: 50%; transform: translateX(-50%);
  width: 74px; height: 20px; border-radius: 12px; background: #08081F; z-index: 3;
}
.ph-top { padding: 34px 15px 12px; }
.ph-row { display: flex; align-items: center; gap: 10px; }
.ph-title { font-weight: 700; font-size: 13px; letter-spacing: -.01em; }
.ph-sub { color: #6B70A0; font-size: 10px; }
.ph-card {
  background: #fff; border: 1px solid #E7E9F4; border-radius: 13px; padding: 11px; margin: 0 15px 9px;
  display: flex; gap: 10px; align-items: flex-start;
}
.ph-tile {
  width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center;
  color: #fff; font-size: 8px; font-weight: 700; letter-spacing: .04em;
  background: linear-gradient(140deg, #E5484D, #F0797D);
}
.ph-tile.w { background: linear-gradient(140deg, var(--ink), #3A3E86); }
.ph-tile.t { background: linear-gradient(140deg, #0FCEC9, #57E3DF); color: #06403E; }
.ph-bar { height: 5px; border-radius: 5px; background: #E5E7F5; overflow: hidden; margin-top: 7px; }
.ph-bar i { display: block; height: 100%; background: var(--ink); border-radius: 5px; }
.ph-bar.teal i { background: var(--teal); }
.ph-pct { font-size: 9px; font-weight: 700; color: var(--ink); }
.ph-reader {
  margin: 4px 15px 0; background: #fff; border-radius: 13px 13px 0 0; border: 1px solid #E7E9F4; border-bottom: 0;
  padding: 13px 14px 16px;
}
.ph-line { height: 5px; background: #D9DCEC; border-radius: 3px; margin-bottom: 7px; }
.ph-foot {
  background: var(--ink); color: #fff; margin: 0 15px; border-radius: 0 0 13px 13px;
  padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; font-size: 10px; font-weight: 600;
}
.ph-nav {
  margin-top: 14px; border-top: 1px solid #E7E9F4; background: #fff;
  display: grid; grid-template-columns: repeat(4,1fr); padding: 9px 0 13px; text-align: center;
  font-size: 8px; color: #9095BE; font-weight: 600;
}
.ph-nav b { color: var(--ink); font-weight: 700; }
.ph-nav span { display: block; font-size: 14px; line-height: 1.1; }
.ph-nav .plus { color: #fff; background: var(--ink); border-radius: 7px; width: 26px; height: 18px; margin: 0 auto 2px; font-size: 12px; }

/* ------------------------------------------------------------ sections --- */
.section { padding: clamp(48px, 7vw, 82px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 40px; }
.section-head p { color: var(--slate); margin-top: .6rem; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.feature {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; display: flex; flex-direction: column; gap: 11px;
}
.section-alt .feature { background: var(--surface-2); }
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--teal-soft);
  display: grid; place-items: center; color: var(--teal-ink); flex: none;
}
.feature-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.feature p { color: var(--slate); font-size: .97rem; margin: 0; }

/* steps — genuinely sequential, so they are numbered */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; } }
.step { padding-top: 22px; border-top: 2px solid var(--line); position: relative; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-weight: 700; font-size: .8rem; letter-spacing: .1em;
  color: var(--teal-ink); display: block; margin-bottom: 8px;
}
.step h3 { margin-bottom: 7px; }
.step p { color: var(--slate); font-size: .97rem; margin: 0; }

/* about */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 34px; } }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; letter-spacing: -.02em; }
.stat span { font-family: var(--font-display); font-size: .8rem; color: var(--slate); }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.contact-list li { display: flex; gap: 13px; align-items: flex-start; }
.contact-list svg { width: 19px; height: 19px; margin-top: 4px; flex: none; stroke: var(--teal-ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-list .k { font-family: var(--font-display); font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); display: block; }
.contact-list .v { font-size: 1rem; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* ------------------------------------------------------------- footer ---- */
.site-footer { background: var(--ink); color: #C7CAE6; padding: 54px 0 30px; }
.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
@media (max-width: 780px) { .site-footer .container { grid-template-columns: 1fr 1fr; gap: 30px; } .site-footer .f-brand { grid-column: 1 / -1; } }
.site-footer img { height: 28px; width: auto; }
.site-footer p { font-size: .93rem; color: #9DA2C8; max-width: 34ch; margin-top: 14px; }
.site-footer h4 { font-family: var(--font-display); font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: #7B80AE; margin: 0 0 14px; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer a { color: #C7CAE6; text-decoration: none; font-size: .93rem; }
.site-footer a:hover { color: var(--teal); text-decoration: underline; }
.footer-base {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 42px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: space-between;
  font-family: var(--font-display); font-size: .82rem; color: #7B80AE;
}

/* ---------------------------------------------------------- legal page --- */
.legal-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 46px 0 38px; }
.legal-hero h1 { font-size: clamp(1.9rem, 4.4vw, 2.7rem); }
.legal-meta { font-family: var(--font-display); font-size: .84rem; color: var(--slate); margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; }

.legal-wrap { display: grid; grid-template-columns: 232px 1fr; gap: 52px; align-items: start; padding: 46px 0 72px; }
.legal-wrap > * { min-width: 0; }
@media (max-width: 1000px) { .legal-wrap { grid-template-columns: 1fr; gap: 30px; } .toc { position: static !important; } }

.toc { position: sticky; top: 92px; font-family: var(--font-display); font-size: .87rem; }
.toc h2 { font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--slate); margin-bottom: 12px; font-weight: 600; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; max-height: 68vh; overflow-y: auto; }
.toc a { display: block; padding: 5px 10px; border-radius: 7px; color: var(--slate); text-decoration: none; border-left: 2px solid transparent; }
.toc a:hover { background: var(--surface); color: var(--text); }
.toc a.is-active { color: var(--teal-ink); border-left-color: var(--teal); background: var(--surface); font-weight: 600; }

.legal-body { max-width: 70ch; min-width: 0; }
.legal-body h2 {
  font-size: 1.32rem; margin: 44px 0 12px; padding-top: 8px; scroll-margin-top: 92px;
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h2 .num { color: var(--teal-ink); font-size: .82em; margin-right: .5em; font-variant-numeric: tabular-nums; }
.legal-body h3 { margin: 26px 0 8px; font-size: 1.02rem; }
.legal-body ul, .legal-body ol { margin: 0 0 1.05em; padding-left: 1.35em; }
.legal-body li { margin-bottom: .5em; }
.legal-body li::marker { color: var(--teal-ink); }
.legal-body strong { font-weight: 600; }

.callout {
  background: var(--teal-soft); border: 1px solid rgba(15,206,201,.4);
  border-radius: var(--radius); padding: 22px 24px; margin: 0 0 34px;
}
.callout h2 { margin-top: 0 !important; font-size: 1.1rem; }
.callout ul { margin-bottom: 0; }
.callout p:last-child { margin-bottom: 0; }

.note {
  border-left: 3px solid var(--teal); background: var(--surface); padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 20px 0; font-size: .96rem;
}

.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: .93rem; background: var(--surface); }
th, td { text-align: left; padding: 12px 15px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-display); font-weight: 600; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--slate); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }

.addr { font-style: normal; }

/* deletion / support page */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow); margin-bottom: 20px;
}
.panel h2 { font-size: 1.24rem; margin-bottom: 10px; }
.panel ol { padding-left: 1.3em; }
.panel ol li::marker { font-family: var(--font-display); font-weight: 600; color: var(--teal-ink); }
