/* SK Systems — site styles. One file, three themes (site, dream, friend). */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --bg: #f5f4ef;
  --surface: #ffffff;
  --ink: #0e1020;
  --muted: #555a70;
  --line: #dfddd3;
  --accent: #2a2aff;
  --accent-ink: #ffffff;
  --pop: #4bff2a;
  --hero-bg: var(--bg);
  --hero-ink: var(--ink);
  --hero-muted: var(--muted);
  --radius: 22px;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow: 0 1px 2px rgb(14 16 32 / 0.06), 0 12px 32px -12px rgb(14 16 32 / 0.18);
}

.theme-dream {
  --bg: #0f0d1f;
  --surface: #1b1836;
  --ink: #f1eeff;
  --muted: #a9a3cc;
  --line: #2e2a55;
  --accent: #9b8cff;
  --accent-ink: #130f2b;
  --pop: #ffd98a;
  --hero-bg: linear-gradient(150deg, #2a1470 0%, #6b2494 48%, #c9477f 100%);
  --hero-ink: #ffffff;
  --hero-muted: #e6d9f7;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 18px 40px -16px rgb(0 0 0 / 0.6);
}

.theme-friend {
  --bg: #f6f5ff;
  --surface: #ffffff;
  --ink: #17183a;
  --muted: #5b5e80;
  --line: #e1e0f5;
  --accent: #5457ee;
  --accent-ink: #ffffff;
  --pop: #ffb86b;
  --hero-bg: radial-gradient(120% 90% at 80% 10%, #4b2bd0 0%, #1d1470 45%, #100a45 100%);
  --hero-ink: #ffffff;
  --hero-muted: #d5d2f7;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); font-weight: 650; }
h3 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.15rem/1 var(--display); letter-spacing: -0.02em; }
.nav { display: flex; gap: 6px; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 550; font-size: 0.95rem; color: var(--muted); }
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; padding: 12px 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); border-radius: 2px; margin: 6px 0; transition: transform 0.2s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
@media (max-width: 640px) {
  .nav-toggle { display: block; margin-right: -10px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; padding: 10px 20px 18px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; font-size: 1.05rem; }
}

/* ---------- buttons & pills ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 650; text-decoration: none; border: 0; font-size: 1rem; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px var(--accent); }
.btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn.light { background: #fff; color: #17183a; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 600; background: color-mix(in srgb, currentColor 10%, transparent); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pop); }
.eyebrow { font: 600 0.8rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 56ch; }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section.tight { padding-top: 0; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { margin-top: 16px; }
.band { background: var(--surface); border-block: 1px solid var(--line); }

/* ---------- hero ---------- */
.hero { background: var(--hero-bg); color: var(--hero-ink); overflow: hidden; }
.hero .lede { color: var(--hero-muted); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding: clamp(48px, 7vw, 96px) 0 0; }
.hero-copy { padding-bottom: clamp(48px, 7vw, 96px); }
.hero-copy h1 { margin-bottom: 22px; }
.hero-copy .lede { margin-bottom: 30px; }
.hero-art { display: flex; justify-content: center; align-items: flex-end; gap: 0; align-self: end; }
.hero-art .phone { margin-bottom: -90px; }
.hero-art .phone + .phone { margin-left: -70px; margin-bottom: -150px; transform: rotate(5deg); }
.hero-art .phone:first-child:not(:last-child) { transform: rotate(-4deg); z-index: 1; }
.app-id { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.app-id img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 8px 24px -8px rgb(0 0 0 / 0.5); }
.app-id strong { display: block; font: 650 1.1rem/1.2 var(--display); }
.app-id span { font-size: 0.9rem; opacity: 0.8; }
.hero .pill { background: rgb(255 255 255 / 0.14); }
.theme-site .hero .pill { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.theme-site .hero h1 em { font-style: normal; color: var(--accent); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 8px; }
  .hero-art .phone { margin-bottom: -120px; }
}

/* ---------- phone frame ---------- */
.phone { --sb: #0f0d1f; flex: none; width: min(270px, 62vw); padding: 9px; border-radius: 40px; background: #06060c; box-shadow: 0 0 0 1.5px #2b2b3a, 0 30px 60px -20px rgb(0 0 0 / 0.55); position: relative; }
.phone .screen { border-radius: 31px; overflow: hidden; background: var(--sb); padding-top: 30px; aspect-ratio: 1080 / 2250; }
.phone::before { content: ""; position: absolute; top: 19px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #06060c; box-shadow: 0 0 0 1.5px rgb(255 255 255 / 0.12); z-index: 2; }
.phone img { width: 100%; }
.phone.small { width: min(230px, 56vw); }

/* ---------- feature rows ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; padding: clamp(40px, 6vw, 72px) 0; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature .art { display: flex; justify-content: center; }
.feature:nth-of-type(even) .art { order: 2; }
.feature h2 { margin-bottom: 16px; }
.feature p { color: var(--muted); max-width: 46ch; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.42em; width: 16px; height: 9px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg) scale(0.8); transform-origin: left; }
@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) .art { order: 0; }
}

/* ---------- cards & grids ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.97rem; }
.card .num { font: 700 0.85rem/1 var(--display); color: var(--accent); display: block; margin-bottom: 18px; }
.band .card { background: var(--bg); }

/* app showcase cards (home + /apps/) */
.app-card { display: grid; grid-template-columns: 1fr auto; gap: 24px; border-radius: 32px; overflow: hidden; color: #fff; text-decoration: none; padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 48px) 0; min-height: 440px; position: relative; transition: transform 0.25s; }
.app-card:hover { transform: translateY(-4px); }
.app-card.dream { background: linear-gradient(150deg, #2a1470 0%, #6b2494 48%, #c9477f 100%); }
.app-card.friend { background: radial-gradient(120% 90% at 80% 10%, #4b2bd0 0%, #1d1470 45%, #100a45 100%); }
.app-card h3, .app-card h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 700; margin-bottom: 12px; letter-spacing: -0.02em; line-height: 1.08; }
.app-card p { color: rgb(255 255 255 / 0.82); max-width: 34ch; }
.app-card .copy { padding-bottom: 40px; display: flex; flex-direction: column; align-items: flex-start; }
.app-card .copy > img { width: 60px; height: 60px; border-radius: 15px; margin-bottom: 22px; box-shadow: 0 8px 24px -8px rgb(0 0 0 / 0.6); }
.app-card .more { margin-top: auto; padding-top: 26px; font-weight: 650; }
.app-card .more::after { content: " →"; transition: margin 0.2s; }
.app-card:hover .more::after { margin-left: 5px; }
.app-card .phone { align-self: end; margin-bottom: -150px; width: 220px; }
.app-card .pill { background: rgb(255 255 255 / 0.14); margin-bottom: 18px; }
.app-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 980px) { .app-pair { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .app-card { grid-template-columns: 1fr; }
  .app-card .phone { justify-self: center; margin-bottom: -210px; }
}

/* screenshot gallery */
.gallery { display: flex; gap: 22px; overflow-x: auto; padding: 8px 20px 32px; scroll-snap-type: x mandatory; scrollbar-width: thin; margin-inline: calc((100vw - min(1120px, 100vw - 40px)) / -2); padding-inline: calc((100vw - min(1120px, 100vw - 40px)) / 2); }
.gallery figure { margin: 0; scroll-snap-align: center; flex: none; }
.gallery figcaption { text-align: center; margin-top: 16px; font-size: 0.9rem; color: var(--muted); }

/* ---------- CTA ---------- */
.cta { border-radius: 32px; padding: clamp(36px, 6vw, 72px); background: var(--ink); color: var(--bg); display: grid; gap: 22px; justify-items: start; }
.cta p { color: color-mix(in srgb, var(--bg) 72%, transparent); max-width: 52ch; }
.cta .btn:not(.ghost) { background: var(--pop); color: #0e1020; }
.theme-dream .cta { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.theme-dream .cta p { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; font: 600 1.1rem/1.35 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-size: 1.5rem; font-weight: 400; color: var(--accent); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > *:not(summary) { color: var(--muted); margin: 0 0 14px; max-width: 64ch; }
.faq details > *:last-child { margin-bottom: 24px; }
.faq a, .prose a, .card a, .lede a { color: var(--accent); text-underline-offset: 3px; }

/* ---------- page head (inner pages) ---------- */
.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(28px, 4vw, 48px); }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 18px; }
.crumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- prose (policies) ---------- */
.prose { max-width: 740px; padding-bottom: clamp(64px, 9vw, 110px); }
.prose h2 { font-size: 1.45rem; margin: 2.2em 0 0.6em; }
.prose h3 { font-size: 1.1rem; margin: 1.8em 0 0.5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose li { margin-bottom: 0.45em; }
.prose .meta { color: var(--muted); font-size: 0.95rem; }
.prose code { background: color-mix(in srgb, var(--accent) 14%, transparent); padding: 1px 6px; border-radius: 5px; font-size: 0.92em; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95rem; margin-bottom: 1em; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.prose .box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 22px 6px; margin-bottom: 1em; }
.table-scroll { overflow-x: auto; }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; max-width: 560px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.form input, .form textarea, .form select { font: inherit; padding: 13px 15px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); width: 100%; }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--accent); }
.form .hp { position: absolute; left: -9999px; }
.notice { padding: 14px 18px; border-radius: 14px; background: color-mix(in srgb, var(--pop) 30%, var(--surface)); border: 1px solid color-mix(in srgb, var(--pop) 60%, var(--line)); margin-bottom: 24px; max-width: 560px; }
.notice.err { background: #ffe9e6; border-color: #f3b1a8; color: #5c1a10; }
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 28px; font-size: 0.95rem; }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
.foot-grid h2 { font: 650 0.95rem/1 var(--display); letter-spacing: 0; margin-bottom: 14px; }
.foot-grid a:not(.brand) { display: block; text-decoration: none; color: var(--muted); padding: 5px 0; }
.foot-grid a:not(.brand):hover { color: var(--ink); }
.foot-note { color: var(--muted); margin-top: 14px; max-width: 26ch; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.88rem; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn, .app-card { transition: none; }
}

/* ---------- AI Friend illustrated screens ---------- */
.mock { --sb: #f9fafb; }
.mock .screen { background: #f9fafb; color: #1f2937; font: 500 11px/1.35 var(--body); padding: 34px 12px 12px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.mock .m-title { font: 700 17px/1.1 var(--display); letter-spacing: -0.02em; }
.mock .m-sub { color: #6b7280; font-size: 10px; margin-top: -4px; }
.mock .m-tabs { display: flex; gap: 5px; margin: 2px 0; }
.mock .m-tabs span { padding: 4px 10px; border-radius: 99px; background: #eceef3; color: #4b5563; font-size: 9.5px; font-weight: 600; }
.mock .m-tabs span.on { background: #6366f1; color: #fff; }
.mock .m-label { font-size: 8.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #6b7280; margin-top: 4px; }
.mock .m-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 9px 10px; display: grid; gap: 5px; }
.mock .m-card b { font-size: 11.5px; font-weight: 650; }
.mock .m-card small { color: #6b7280; font-size: 9.5px; }
.mock .m-card.late { border-left: 3px solid #ef4444; }
.mock .m-row { display: flex; gap: 5px; flex-wrap: wrap; }
.mock .chip { padding: 3px 8px; border-radius: 99px; font-size: 9px; font-weight: 650; background: #eef0ff; color: #4f46e5; }
.mock .chip.ok { background: #d9f7ea; color: #047857; }
.mock .chip.plain { background: #f1f2f5; color: #4b5563; }
.mock .m-input { background: #fff; border: 1.5px solid #6366f1; border-radius: 12px; padding: 10px; font-size: 11.5px; min-height: 52px; }
.mock .m-btn { margin-top: auto; background: #6366f1; color: #fff; text-align: center; padding: 10px; border-radius: 12px; font-weight: 700; font-size: 11.5px; }
.mock .m-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 10.5px; }
.mock .m-kv span:nth-child(odd) { color: #6b7280; }
.mock .m-kv span:nth-child(even) { font-weight: 650; }
.mock .m-av { display: flex; }
.mock .m-av i { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; margin-right: -7px; display: grid; place-items: center; font: 700 9px/1 var(--body); color: #fff; font-style: normal; }
.mock .m-check { display: flex; align-items: center; gap: 7px; font-size: 10.5px; }
.mock .m-check::before { content: ""; width: 13px; height: 13px; border-radius: 4px; border: 1.5px solid #c5c9d3; flex: none; }
.mock .m-check.done { color: #9ca3af; text-decoration: line-through; }
.mock .m-check.done::before { background: #10b981; border-color: #10b981; }

.notif { width: min(340px, 100%); background: #fff; color: #1f2937; border-radius: 22px; padding: 16px 18px; box-shadow: var(--shadow); border: 1px solid var(--line); font-size: 0.92rem; }
.notif .n-top { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: #6b7280; margin-bottom: 8px; }
.notif .n-top img { width: 20px; height: 20px; border-radius: 6px; }
.notif b { display: block; font-size: 1rem; }
.notif .n-actions { display: flex; gap: 18px; margin-top: 14px; font-weight: 700; color: #4f46e5; font-size: 0.88rem; }
.caption { font-size: 0.82rem; color: var(--muted); margin-top: 18px; text-align: center; }
.stack { display: grid; justify-items: center; gap: 0; }
