/* apps.v-sag.com · the software room. LIGHT theme — deliberately bright so the
   software room stands apart from the dark cosmic rooms. Gold stays as the house
   accent (darkened for contrast on white). */

:root {
  --bg: #fbfaf7;          /* warm white */
  --bg-soft: #f1ede4;     /* soft paper for inset tiles */
  --panel: #ffffff;       /* cards pop on the warm bg with a hairline + shadow */
  --panel-2: #f3efe6;     /* kbd / chips */
  --ink: #1a1813;         /* near-black, warm */
  --ink-dim: #54514a;     /* body copy */
  --ink-faint: #908c82;   /* muted meta */
  --line: rgba(26, 24, 19, 0.12);
  --line-2: rgba(26, 24, 19, 0.20);
  --gold: #a9741b;        /* amber that reads on white (accents, eyebrows) */
  --gold-2: #7f5410;      /* darker amber for emphasis text */
  --sky: #2c6cae;         /* deeper sky for the beta badge on white */
  --accent: var(--gold);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1180px;

  /* dark editor mockup — a real-app window that pops against the light page */
  --paper: #f4efe2;
  --paper-ink: #2b2722;
  --shelf: #161922;

  --shadow: 0 14px 40px rgba(40, 34, 20, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
.serif { font-family: "Fraunces", "Cormorant Garamond", Georgia, serif; }

/* ---- light backdrop ---- */
.stars, .glow { position: fixed; inset: 0; pointer-events: none; }
.stars {
  z-index: -2;
  background-color: var(--bg);
  background-image:
    radial-gradient(60vmax 52vmax at 80% -10%, rgba(232,184,115,.18), transparent 60%),
    radial-gradient(52vmax 48vmax at 2% 108%, rgba(111,168,220,.14), transparent 60%);
  opacity: 1;
}
.glow {
  z-index: -1;
  background: radial-gradient(80vmax 40vmax at 50% -20%, rgba(255,255,255,.6), transparent 55%);
}

a { color: inherit; text-decoration: none; }

/* ---- shell ---- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 2.4rem); }

.topbar { position: sticky; top: 0; z-index: 45; background: rgba(251,250,247,.85); backdrop-filter: blur(12px); }
.topbar .nav { position: static; backdrop-filter: none; }
.topbar .wrap { max-width: none; } /* banner + nav span full width, matching the other rooms */
.bookbanner { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .4rem .8rem;
  padding: .55rem 1.2rem; text-align: center; border-bottom: 1px solid var(--line); text-decoration: none;
  background: linear-gradient(90deg, rgba(232,184,115,.10), rgba(232,184,115,.20), rgba(232,184,115,.10)); transition: background .25s; }
.bookbanner:hover { background: linear-gradient(90deg, rgba(232,184,115,.18), rgba(232,184,115,.30), rgba(232,184,115,.18)); }
.bookbanner__tag { font-size: .62rem; text-transform: uppercase; letter-spacing: .2em; color: #07090f;
  background: var(--gold); padding: .16rem .5rem; border-radius: 100px; font-weight: 700; }
.bookbanner__title { font-family: "Fraunces", serif; font-style: italic; color: var(--gold-2); font-size: 1rem; }
.bookbanner__note { font-size: .8rem; color: var(--ink-dim); letter-spacing: .02em; transition: color .2s; }
.bookbanner:hover .bookbanner__note { color: var(--gold-2); }

.nav { border-bottom: 1px solid var(--line); }
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: 1.6rem; height: 62px; }
.brand { display: flex; align-items: baseline; gap: .6rem; letter-spacing: .04em; }
.brand b { font-weight: 700; }
.brand span { color: var(--ink-faint); font-size: .82rem; letter-spacing: .18em; text-transform: uppercase; }
.nav__links { display: flex; gap: 1.1rem; font-size: .9rem; align-items: center; }
.nav__links a { color: var(--ink-dim); transition: color .2s var(--ease); }
.nav__links a:hover { color: var(--gold-2); }
.nav__links a.here { color: var(--ink); }
.nav__links a.pill { border: 1px solid var(--line); padding: .4rem .9rem; border-radius: 100px; }
.nav__links a.pill:hover { border-color: var(--gold); color: var(--gold); }

/* mobile hamburger (pure CSS, checkbox toggle) */
.navtoggle-cb { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.navtoggle { display: none; }
@media (max-width: 760px) {
  .nav__in { position: relative; }
  .navtoggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 40px; padding: 0 10px; cursor: pointer; border: 1px solid var(--line-2);
    border-radius: 11px; background: var(--panel); }
  .navtoggle span { display: block; height: 2px; border-radius: 2px; background: var(--ink);
    transition: transform .25s var(--ease), opacity .2s; }
  .nav__links { position: absolute; top: calc(100% + 12px); right: 0; z-index: 70;
    flex-direction: column; align-items: stretch; gap: .15rem; min-width: 210px; padding: .5rem;
    background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow); display: none; }
  .navtoggle-cb:checked ~ .nav__links { display: flex; }
  .nav__links a { padding: .7rem .85rem; border-radius: 9px; font-size: 1rem; }
  .nav__links a.pill, .nav__links a.pill.here { border: none; padding: .7rem .85rem; }
  .navtoggle-cb:checked ~ .navtoggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .navtoggle-cb:checked ~ .navtoggle span:nth-child(2) { opacity: 0; }
  .navtoggle-cb:checked ~ .navtoggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

.eyebrow { font-size: .76rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .72rem 1.3rem; border-radius: 999px;
  font-size: .92rem; font-weight: 500; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; color: var(--ink);
  transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--gold); }
.btn--gold { background: linear-gradient(135deg, #e6a93e, #cf8b21); color: #2a1c05; border-color: transparent; font-weight: 600; }
.btn--gold:hover { box-shadow: 0 10px 30px rgba(207,139,33,.30); }
.btn--ghost { color: var(--ink-dim); }

/* ---- status badge ---- */
.badge {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  padding: .32rem .7rem; border-radius: 999px; border: 1px solid var(--line-2); color: var(--gold-2);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--beta { color: var(--sky); border-color: rgba(111,168,220,.4); }

/* ---- section scaffolding ---- */
.section { padding: clamp(2.6rem, 6vw, 4.6rem) 0; }
.section--line { border-top: 1px solid var(--line); }
.section-head { max-width: 640px; margin: 0 0 clamp(1.6rem, 4vw, 2.6rem); }
.section-head .eyebrow { display: block; margin-bottom: .7rem; }
.section-head h2 { font-weight: 600; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.08; letter-spacing: -.01em; }
.section-head p { color: var(--ink-dim); margin-top: .7rem; }

/* ============ HOME / LIBRARY ============ */
.hero-home { padding: clamp(3.2rem, 8vw, 6rem) 0 clamp(1.6rem, 4vw, 3rem); }
.hero-home h1 { font-weight: 600; line-height: 1.04; letter-spacing: -.01em; font-size: clamp(2.4rem, 7vw, 4.6rem); margin: .5rem 0 1.1rem; }
.hero-home h1 em { font-style: italic; color: var(--gold-2); }
.hero-home .lead { color: var(--ink-dim); font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 40rem; }

.shelf { display: grid; gap: clamp(1.4rem, 3vw, 2rem); padding-bottom: clamp(2.5rem,6vw,4rem); }
.appcard {
  display: grid; grid-template-columns: minmax(0, 320px) 1fr; gap: clamp(1.4rem, 3vw, 2.6rem);
  align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
  padding: clamp(1.4rem, 3vw, 2.2rem); position: relative; overflow: hidden; box-shadow: var(--shadow);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.appcard::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40vmax 30vmax at 100% 0, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%); opacity: .8;
}
.appcard:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.appcard__body { position: relative; z-index: 1; }
.appcard__head { display: flex; align-items: center; gap: .8rem; margin-bottom: .2rem; }
.appcard__body h2 { font-weight: 600; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.05; margin: .55rem 0 .25rem; }

/* real app icon (self-contained squircle artwork with its own padding + rounding) */
.appicon { flex: none; width: 58px; height: 58px; display: block;
  filter: drop-shadow(0 10px 22px rgba(0,0,0,.5)); }
.appicon--sm { width: 50px; height: 50px; }
.appcard__sub { color: var(--gold-2); font-style: italic; font-size: 1.05rem; margin-bottom: .9rem; }
.appcard__hook { color: var(--ink-dim); max-width: 38rem; margin-bottom: 1.3rem; }
.appcard__cta { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.appcard__meta { color: var(--ink-faint); font-size: .85rem; margin-top: .9rem; }

/* developer block (home) */
.dev { border-top: 1px solid var(--line); padding: clamp(2.6rem,6vw,4rem) 0; }
.dev h3 { font-weight: 600; font-size: clamp(1.5rem,3.5vw,2.1rem); margin-bottom: .3rem; }
.dev .kicker { color: var(--ink-faint); margin-bottom: 1.2rem; }
.dev p { color: var(--ink-dim); max-width: 46rem; }

/* ============ APP DETAIL ============ */
.app-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.8rem, 4vw, 3.4rem); align-items: center;
  padding: clamp(2.4rem, 6vw, 4.4rem) 0 clamp(1.6rem, 4vw, 2.6rem); }
.app-hero__icon { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.app-hero__glyph { width: 52px; height: 52px; flex: none; border-radius: 14px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 70%, #fff 0%), color-mix(in srgb, var(--accent) 40%, #2a2114));
  display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.12); }
.app-hero__glyph svg { width: 30px; height: 30px; }
.app-hero__name { font-weight: 600; font-size: 1.3rem; letter-spacing: .01em; }
.app-hero h1 { font-weight: 600; font-size: clamp(2.2rem, 5.5vw, 3.8rem); line-height: 1.03; letter-spacing: -.015em; margin: .3rem 0 1rem; }
.app-hero h1 em { font-style: italic; color: var(--gold-2); }
.app-hero__lead { color: var(--ink-dim); font-size: clamp(1.05rem, 2.2vw, 1.25rem); max-width: 34rem; margin-bottom: 1.4rem; }
.app-hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.app-hero__plat { color: var(--ink-faint); font-size: .85rem; margin-top: .9rem; }

/* the stylized editor mockup (a design illustration, not a screenshot) */
.mockup { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line-2);
  background: var(--shelf); box-shadow: 0 30px 70px rgba(0,0,0,.55); }
.mockup__bar { display: flex; align-items: center; gap: .9rem; padding: .7rem .9rem; background: rgba(0,0,0,.25); border-bottom: 1px solid rgba(255,255,255,.06); }
.mockup__lights { display: flex; gap: .42rem; }
.mockup__lights i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.mockup__lights i:nth-child(1){ background:#ff5f57; } .mockup__lights i:nth-child(2){ background:#febc2e; } .mockup__lights i:nth-child(3){ background:#28c840; }
.mockup__search { flex: 1; height: 22px; border-radius: 100px; background: rgba(255,255,255,.07); max-width: 220px; margin: 0 auto; }
.mockup__tabs { display: flex; gap: .4rem; padding: .5rem .8rem 0; background: rgba(0,0,0,.18); }
.mockup__tab { font-size: .72rem; color: var(--ink-faint); padding: .35rem .7rem; border-radius: 8px 8px 0 0; background: rgba(255,255,255,.04); }
.mockup__tab.is-active { color: var(--paper-ink); background: var(--paper); }
.mockup__stage { padding: clamp(1rem, 3vw, 1.8rem); display: grid; place-items: center;
  background: radial-gradient(60% 80% at 50% 0, rgba(255,255,255,.04), transparent 70%); }
.mockup__page { width: 100%; max-width: 360px; background: var(--paper); color: var(--paper-ink);
  border-radius: 10px 10px 4px 4px; padding: 1.5rem 1.4rem 2rem; box-shadow: 0 18px 40px rgba(0,0,0,.4); }
.mockup__h { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.15rem; margin-bottom: .9rem; color: #1f1c17; }
.mockup__line { height: 8px; border-radius: 4px; background: rgba(43,39,34,.16); margin: .55rem 0; }
.mockup__line.w-90{width:90%} .mockup__line.w-80{width:80%} .mockup__line.w-70{width:70%} .mockup__line.w-60{width:60%} .mockup__line.w-40{width:40%}
.mockup__caret { display: inline-block; width: 2px; height: 1em; background: var(--accent); vertical-align: text-bottom; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* highlight trio */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.4vw, 1.6rem); }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.2rem, 2.5vw, 1.7rem);
  box-shadow: var(--shadow); transition: border-color .25s, transform .25s var(--ease); }
.tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.tile__icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 1rem;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--gold-2); }
.tile__icon svg { width: 22px; height: 22px; }
.tile h3 { font-weight: 600; font-size: 1.2rem; margin-bottom: .4rem; }
.tile p { color: var(--ink-dim); font-size: .95rem; }

/* in-action list */
.actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.action { background: var(--bg-soft); padding: clamp(1.2rem, 2.6vw, 1.8rem); }
.action h3 { font-weight: 600; font-size: 1.1rem; margin-bottom: .35rem; color: var(--gold-2); }
.action p { color: var(--ink-dim); font-size: .94rem; }

/* fundamental features grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.4vw, 1.5rem); }
.feat { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.1rem, 2.4vw, 1.5rem); }
.feat h3 { font-weight: 600; font-size: 1.05rem; margin-bottom: .35rem; }
.feat h3::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: .55rem; vertical-align: middle; }
.feat p { color: var(--ink-dim); font-size: .92rem; }

/* shortcuts */
.keys { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem 2rem; }
.key { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .7rem .2rem; border-bottom: 1px solid var(--line); }
.key span { color: var(--ink-dim); }
.key kbd { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .82rem; color: var(--gold-2);
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 7px; padding: .2rem .5rem; white-space: nowrap; }

/* get section */
.get { background: var(--panel); border: 1px solid var(--line-2); border-radius: 22px; padding: clamp(1.8rem, 4vw, 3rem);
  position: relative; overflow: hidden; box-shadow: var(--shadow); }
.get::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40vmax 24vmax at 0 0, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%); }
.get__in { position: relative; z-index: 1; max-width: 42rem; }
.get h2 { font-weight: 600; font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: .8rem; }
.get p { color: var(--ink-dim); margin-bottom: 1rem; }
.get__cta { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin: 1.2rem 0 1rem; }
.get__rel { color: var(--ink-faint); font-size: .85rem; }
.get__rel b { color: var(--ink-dim); font-weight: 600; }

/* developer note + principles */
.note { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
.note__body p { color: var(--ink-dim); margin-bottom: 1rem; max-width: 40rem; }
.note__quote { border-left: 2px solid var(--gold); padding: .2rem 0 .2rem 1.2rem; margin-top: 1.4rem;
  font-family: "Fraunces", Georgia, serif; font-style: italic; color: var(--ink); font-size: 1.15rem; }
.note__quote cite { display: block; font-style: normal; font-size: .82rem; color: var(--ink-faint); margin-top: .5rem; letter-spacing: .04em; }
.principles { display: grid; gap: .8rem; }
.principle { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.2rem; }
.principle h4 { font-weight: 600; font-size: 1rem; color: var(--gold-2); margin-bottom: .2rem; }
.principle p { color: var(--ink-dim); font-size: .9rem; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 2.4rem 0 3.2rem; color: var(--ink-faint); font-size: .86rem;
  display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: space-between; align-items: center; }
.footer a { color: var(--ink-dim); }
.footer a:hover { color: var(--gold-2); }

.loading { color: var(--ink-faint); text-align: center; padding: 4rem 0; }

/* ============ responsive ============ */
@media (max-width: 900px) {
  .app-hero { grid-template-columns: 1fr; }
  .app-hero__media { order: -1; }
  .trio { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .note { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .appcard { grid-template-columns: 1fr; }
  .actions, .keys { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .nav__links { gap: .7rem; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; animation: none !important; }
}
