/* Somanader Group site styles. Publisher pages use body.pub, SmartScroller pages use body.ss. */
:root {
  --paper: #f7f5f1;
  --paper-2: #efebe4;
  --ink: #15181e;
  --ink-2: #464c57;
  --muted: #6b7280;
  --line: #ddd7cc;
  --accent: #2b54e0;
  --accent-ink: #ffffff;
  --radius: 18px;
  --wrap: 1120px;
  --f-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --f-serif: "Literata", Georgia, "Times New Roman", serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(19,29,42,.06), 0 24px 48px -20px rgba(19,29,42,.28);
}
body.ss {
  --paper: #f4f6fa;
  --paper-2: #e7ebf0;
  --ink: #131d2a;
  --ink-2: #3c4859;
  --muted: #5a6677;
  --line: #d2d9e2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121417;
    --paper-2: #1a1d22;
    --ink: #ecebe7;
    --ink-2: #c3c6cc;
    --muted: #979ca6;
    --line: #2b2f36;
    --accent: #8aa4ff;
    --accent-ink: #0e141b;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 24px 48px -20px rgba(0,0,0,.7);
  }
  body.ss {
    --paper: #0e141b;
    --paper-2: #17202a;
    --ink: #e6ecf3;
    --ink-2: #c2ccd8;
    --muted: #93a0b2;
    --line: #273341;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.65 var(--f-serif);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--f-display); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.eyebrow { font: 500 .78rem/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
.lede { font-size: 1.25rem; color: var(--ink-2); max-width: 40em; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 99; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.05rem/1 var(--f-serif); letter-spacing: .01em; }
.brand:hover { color: inherit; }
.monogram { width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font: 600 .95rem/1 var(--f-serif); letter-spacing: .02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand small { display: block; font: 500 .68rem/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; font: 500 .95rem/1 var(--f-display); }
.nav a { text-decoration: none; padding: 10px 12px; border-radius: 10px; color: var(--ink-2); }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 20px; border-radius: 12px; font: 600 1rem/1 var(--f-display); text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }
.nav .btn { padding: 10px 14px; margin-left: 8px; }
.nav .btn-primary, .nav .btn-primary:hover { color: var(--accent-ink); background: var(--accent); }
.menu-toggle { display: none; }
@media (max-width: 820px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
  .menu-toggle { display: inline-flex; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; color: var(--ink); font: 500 .9rem/1 var(--f-display); }
}

/* Sections */
section { padding: 88px 0; }
section.tight { padding: 56px 0; }
.band { background: var(--paper-2); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; gap: 36px; } section { padding: 64px 0; } }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.band .card { background: var(--paper); }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--ink-2); font-size: 1rem; margin: 0; }
.icon-dot { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.icon-dot svg { width: 22px; height: 22px; }

/* Publisher home */
.pub-hero { padding: 104px 0 72px; }
.pub-hero h1 { font-family: var(--f-serif); font-weight: 500; letter-spacing: -0.025em; max-width: 14em; }
.pub-hero h1 em { font-style: italic; color: var(--accent); }
.shelf { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; }
@media (max-width: 860px) { .shelf { grid-template-columns: 1fr; } }
.product { position: relative; overflow: hidden; border-radius: 24px; padding: 40px; min-height: 420px; display: flex; flex-direction: column; text-decoration: none; isolation: isolate; }
.product:hover { color: inherit; }
.product.ss-tile { background: linear-gradient(150deg, #4069f5 0%, #1a2c9a 100%); color: #fff; }
.product.ss-tile p { color: rgba(255,255,255,.86); }
.product.ss-tile .eyebrow { color: rgba(255,255,255,.75); }
.product .tile-phone { position: absolute; right: -10px; bottom: -120px; width: 46%; max-width: 260px; transform: rotate(-6deg); transition: transform .4s ease; }
.product:hover .tile-phone { transform: rotate(-3deg) translateY(-8px); }
.product .tile-copy { max-width: 52%; position: relative; z-index: 1; }
.product .tile-link { margin-top: auto; font: 600 1rem/1 var(--f-display); display: inline-flex; gap: 8px; align-items: center; position: relative; z-index: 1; }
.product.soon { background: var(--paper-2); border: 1px dashed var(--line); }
.product.soon p { color: var(--ink-2); }
.book-spines { display: flex; gap: 10px; align-items: flex-end; margin-top: auto; height: 160px; }
.book-spines span { flex: 1; border-radius: 6px 6px 2px 2px; background: var(--line); }
.book-spines span:nth-child(1) { height: 70%; }
.book-spines span:nth-child(2) { height: 92%; background: color-mix(in srgb, var(--ink) 18%, var(--line)); }
.book-spines span:nth-child(3) { height: 80%; }
.book-spines span:nth-child(4) { height: 100%; background: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.book-spines span:nth-child(5) { height: 64%; }
@media (max-width: 560px) { .product .tile-copy { max-width: 100%; } .product .tile-phone { position: relative; right: auto; bottom: auto; width: 70%; margin: 28px auto -140px; } .product { min-height: 0; } }

.principles { counter-reset: p; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.principles div { counter-increment: p; border-top: 1px solid var(--ink); padding-top: 18px; }
.principles div::before { content: "0" counter(p); font: 500 .8rem/1 var(--f-mono); color: var(--muted); display: block; margin-bottom: 14px; }
.principles p { color: var(--ink-2); font-size: 1rem; }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; gap: 28px; } }

/* Phone frame */
.phone { position: relative; border-radius: 44px; padding: 10px; background: #0b0f14; box-shadow: var(--shadow), inset 0 0 0 1.5px #2a3340; aspect-ratio: 393 / 852; }
.phone img { border-radius: 34px; width: 100%; height: 100%; object-fit: cover; }

/* SmartScroller hero */
.ss-hero { position: relative; overflow: hidden; padding: 80px 0 0; }
.ss-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 55% at 78% 40%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%); z-index: -1; }
.ss-hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.ss-hero h1 { font-size: clamp(2.8rem, 6.5vw, 5rem); }
.ss-hero .app-id { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.ss-hero .app-id img { width: 64px; height: 64px; border-radius: 15px; box-shadow: var(--shadow); }
.ss-hero .app-id b { font: 700 1.25rem/1.1 var(--f-display); display: block; }
.ss-hero .app-id span { font: 500 .8rem/1.4 var(--f-mono); color: var(--muted); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 18px; }
.fine { font: 500 .82rem/1.5 var(--f-mono); color: var(--muted); }
.hero-phones { position: relative; height: 640px; }
.hero-phones > div { position: absolute; width: 290px; }
.hero-phones .p1 { left: 2%; top: 20px; transform: rotate(-5deg); z-index: 2; }
.hero-phones .p2 { right: 0; top: 100px; transform: rotate(6deg); }
@media (max-width: 900px) {
  .ss-hero .wrap { grid-template-columns: 1fr; }
  .hero-phones { height: 520px; max-width: 460px; margin: 0 auto; width: 100%; }
  .hero-phones > div { width: 58%; }
}

/* Feature rows */
.feature-row { display: grid; grid-template-columns: 1fr 340px; gap: 72px; align-items: center; padding: 40px 0; }
.feature-row.flip { grid-template-columns: 340px 1fr; }
.feature-row.flip .copy { order: 2; }
.feature-row .phone, .grid-2 > div > .phone { width: 100%; max-width: 320px; margin: 0 auto; }
.feature-row ul { padding-left: 1.1em; color: var(--ink-2); }
.feature-row li { margin-bottom: .4em; }
@media (max-width: 860px) { .feature-row, .feature-row.flip { grid-template-columns: 1fr; gap: 32px; } .feature-row.flip .copy { order: 0; } .feature-row .phone { max-width: 270px; } }

.steps-inline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.steps-inline .card { counter-increment: s; }
.steps-inline .card::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 1rem/1 var(--f-display); margin-bottom: 16px; }
@media (max-width: 860px) { .steps-inline { grid-template-columns: 1fr; } }

.kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kinds .card { padding: 22px; }
.kinds b { font: 500 .75rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 10px; }
@media (max-width: 860px) { .kinds { grid-template-columns: 1fr 1fr; } }

/* Feature table */
.ftable { width: 100%; border-collapse: collapse; font-size: 1rem; }
.ftable th, .ftable td { text-align: left; padding: 16px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ftable th { font: 600 .95rem/1.3 var(--f-display); width: 30%; }
.ftable td { color: var(--ink-2); }
.tag { display: inline-block; font: 500 .7rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; margin-left: 6px; vertical-align: 2px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.tag.soon { background: var(--paper-2); color: var(--muted); border: 1px solid var(--line); }

/* Install */
.os-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: 14px; border: 1px solid var(--line); margin-bottom: 32px; }
.os-tabs button { border: 0; background: transparent; padding: 11px 18px; border-radius: 10px; font: 600 1rem/1 var(--f-display); color: var(--ink-2); cursor: pointer; }
.os-tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.install-steps { list-style: none; padding: 0; margin: 0; counter-reset: i; display: grid; gap: 14px; }
.install-steps li > div { min-width: 0; overflow-wrap: anywhere; }
.install-steps li { counter-increment: i; display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.install-steps li::before { content: counter(i); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 1rem/1 var(--f-display); }
.install-steps b { font-family: var(--f-display); font-weight: 600; }
.install-steps .ico { display: inline-flex; vertical-align: -5px; width: 22px; height: 22px; padding: 2px; border-radius: 6px; background: var(--paper-2); border: 1px solid var(--line); }
.install-steps .ico svg { width: 100%; height: 100%; }
.qr { background: #fff; border-radius: 18px; padding: 14px; width: 200px; border: 1px solid var(--line); }
.note { border-left: 3px solid var(--accent); padding: 4px 0 4px 18px; color: var(--ink-2); font-size: 1rem; }

/* Story */
.story { font-size: 1.15rem; }
.story h2 { margin-top: 2.2em; font-size: 1.7rem; }
.story blockquote { margin: 2em 0; padding: 0 0 0 24px; border-left: 3px solid var(--accent); font-size: 1.35rem; font-style: italic; color: var(--ink); }
.timeline { list-style: none; padding: 0; margin: 2em 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px 26px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 9px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline b { font: 500 .8rem/1 var(--f-mono); color: var(--muted); display: block; margin-bottom: 6px; letter-spacing: .06em; text-transform: uppercase; }
.portrait { width: 120px; height: 120px; border-radius: 50%; background: var(--paper-2); border: 1px dashed var(--line); display: grid; place-items: center; font: 500 .75rem/1.3 var(--f-mono); color: var(--muted); text-align: center; }

/* Prose pages */
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.draft-flag { display: inline-block; font: 500 .75rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 7px 10px; border-radius: 8px; background: #fff3c4; color: #6b4e00; margin-bottom: 20px; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .lede { margin: 0 auto; }
.cta-band .cta-row { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 56px; font-size: .95rem; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer h4 { font: 600 .8rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { text-decoration: none; }
@media (max-width: 700px) { .site-footer .wrap { grid-template-columns: 1fr; } }

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

@media (max-width: 860px) { .qr-col { display: none !important; } }

/* Books */
.product.book-tile { background: linear-gradient(160deg, #2a2f3a 0%, #12151b 100%); color: #f1ede4; }
.product.book-tile h2 { color: #f1ede4; font-family: var(--f-serif); font-weight: 500; font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.product.book-tile p { color: rgba(241,237,228,.82); }
.product.book-tile .eyebrow { color: rgba(241,237,228,.65); }
.product.book-tile:hover { color: #f1ede4; }
.product .tile-cover { position: absolute; right: 24px; bottom: -40px; width: 38%; max-width: 170px; border-radius: 4px; box-shadow: 0 20px 40px rgba(0,0,0,.5); transform: rotate(4deg); transition: transform .4s ease; }
.product.book-tile .tile-copy { max-width: 58%; }
.product.book-tile:hover .tile-cover { transform: rotate(2deg) translateY(-6px); }
@media (max-width: 560px) { .product .tile-cover { position: relative; right: auto; bottom: auto; width: 50%; margin: 28px auto -70px; } .product.book-tile .tile-copy { max-width: 100%; } }
.book-card { display: grid; grid-template-columns: 200px 1fr; gap: 36px; align-items: center; padding: 32px; border: 1px solid var(--line); border-radius: 24px; text-decoration: none; margin-bottom: 24px; background: var(--paper); }
.book-card:hover { color: inherit; border-color: var(--ink-2); }
.book-card img { border-radius: 4px; box-shadow: var(--shadow); }
.book-card h2 { font-family: var(--f-serif); font-weight: 500; margin-bottom: .2em; }
.book-card .tile-link { font: 600 1rem/1 var(--f-display); display: inline-flex; gap: 8px; align-items: center; }
.book-card.soon { border-style: dashed; background: var(--paper-2); }
.ph-cover { aspect-ratio: 800/1182; border-radius: 4px; background: var(--line); }
@media (max-width: 640px) { .book-card { grid-template-columns: 1fr; } .book-card img, .ph-cover { max-width: 180px; } }
.book-hero { padding: 72px 0; background: linear-gradient(170deg, #2a2f3a 0%, #12151b 100%); color: #f1ede4; }
.book-hero .wrap { display: grid; grid-template-columns: 320px 1fr; gap: 64px; align-items: center; }
.book-hero h1 { font-family: var(--f-serif); font-weight: 500; color: #f1ede4; }
.book-hero .eyebrow { color: rgba(241,237,228,.65); }
.book-hero .byline { font: 500 1.3rem/1.3 var(--f-serif); color: rgba(241,237,228,.85); }
.book-hero .lede { color: rgba(241,237,228,.85); font-style: italic; }
.book-hero .fine { color: rgba(241,237,228,.6); }
.book-hero .btn-primary { background: #f1ede4; color: #12151b; }
.book-hero .btn-primary:hover { color: #12151b; }
.book-cover-wrap img { border-radius: 6px; box-shadow: 0 30px 60px rgba(0,0,0,.55); }
@media (max-width: 760px) { .book-hero .wrap { grid-template-columns: 1fr; gap: 36px; } .book-cover-wrap { max-width: 240px; } }
.pull { margin: 0 0 2em; padding: 0 0 0 24px; border-left: 3px solid var(--ink); font: italic 400 1.4rem/1.5 var(--f-serif); }
