/* dripwork.dev. Palette: ivory #F6F4EF, ink #16161A, burnt orange #C2603A */

:root {
  --ivory: #F6F4EF;
  --ink: #16161A;
  --orange: #C2603A;

  --bg: var(--ivory);
  --bg-raised: #FFFFFF;
  --bg-sunken: #EFEBE3;
  --fg: var(--ink);
  --fg-muted: #5C5C66;
  --fg-faint: #8A8A94;
  --accent: var(--orange);
  --accent-soft: rgba(194, 96, 58, 0.10);
  --accent-line: rgba(194, 96, 58, 0.28);
  --border: rgba(22, 22, 26, 0.12);
  --border-strong: rgba(22, 22, 26, 0.22);
  --shadow: 0 1px 2px rgba(22,22,26,.04), 0 8px 24px -12px rgba(22,22,26,.14);
  --shadow-lift: 0 2px 4px rgba(22,22,26,.05), 0 18px 44px -18px rgba(22,22,26,.22);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --maxw: 1140px;
  --radius: 14px;
  --radius-lg: 20px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--ink);
    --bg-raised: #1D1D22;
    --bg-sunken: #121216;
    --fg: var(--ivory);
    --fg-muted: #A8A8B2;
    --fg-faint: #76767F;
    --accent: #DB7A52;
    --accent-soft: rgba(219, 122, 82, 0.14);
    --accent-line: rgba(219, 122, 82, 0.34);
    --border: rgba(246, 244, 239, 0.13);
    --border-strong: rgba(246, 244, 239, 0.24);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lift: 0 2px 4px rgba(0,0,0,.35), 0 18px 44px -18px rgba(0,0,0,.7);
  }
}
:root[data-theme="dark"] {
  --bg: var(--ink);
  --bg-raised: #1D1D22;
  --bg-sunken: #121216;
  --fg: var(--ivory);
  --fg-muted: #A8A8B2;
  --fg-faint: #76767F;
  --accent: #DB7A52;
  --accent-soft: rgba(219, 122, 82, 0.14);
  --accent-line: rgba(219, 122, 82, 0.34);
  --border: rgba(246, 244, 239, 0.13);
  --border-strong: rgba(246, 244, 239, 0.24);
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lift: 0 2px 4px rgba(0,0,0,.35), 0 18px 44px -18px rgba(0,0,0,.7);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.022em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.3rem, 6.2vw, 3.65rem); letter-spacing: -0.032em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.4rem); letter-spacing: -0.028em; }
h3 { font-size: 1.28rem; }
p { margin: 0 0 1.1em; }
a { color: inherit; }

img, canvas, svg { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 12px 18px;
  border-radius: 0 0 10px 0; font-weight: 600; text-decoration: none;
}
.skip:focus { left: 0; }

:where(a, button, summary, input):focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-stuck { border-bottom-color: var(--border); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 68px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand img { height: 26px; width: auto; }
:root[data-theme="dark"] .brand img,
.brand img { filter: none; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  text-decoration: none; font-size: .95rem; font-weight: 500;
  color: var(--fg-muted); transition: color .18s ease;
}
.nav a:hover { color: var(--fg); }
.nav .btn { color: #fff; }
@media (max-width: 720px) { .nav .nav-link { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 11px 20px; border-radius: 999px;
  font-size: .95rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px -8px rgba(194,96,58,.75); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px -10px rgba(194,96,58,.85); }
.btn-ghost { border-color: var(--border-strong); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-lg { padding: 14px 26px; font-size: 1rem; }

/* ---------- hero ---------- */
.hero { padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 84px); position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(760px 420px at 76% 22%, var(--accent-soft), transparent 68%),
    radial-gradient(560px 380px at 8% 6%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%);
}
.hero-grid {
  display: grid; gap: clamp(36px, 6vw, 64px); align-items: center;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.hero p.lede {
  font-size: clamp(1.06rem, 2vw, 1.22rem); color: var(--fg-muted);
  max-width: 54ch; margin-bottom: 1.8em;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 13px; align-items: center; }

.hero-visual { display: grid; place-items: center; position: relative; min-height: 300px; }
.orb-stage {
  position: relative; display: grid; place-items: center;
  width: min(380px, 84vw); aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, var(--accent-soft), transparent 62%);
}
.orb-stage::after {
  content: ""; position: absolute; inset: 8%;
  border: 1px solid var(--border); border-radius: 50%;
  mask-image: radial-gradient(circle, #000 60%, transparent 100%);
}
.orb-stage canvas { position: relative; z-index: 1; }

.hero-platforms {
  margin-top: 30px; display: flex; flex-wrap: wrap; gap: 10px 22px;
  align-items: center; color: var(--fg-faint); font-size: .86rem;
}
.hero-platforms strong { color: var(--fg-muted); font-weight: 600; }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-sunken); border-block: 1px solid var(--border); }
.section-head { max-width: 62ch; margin-bottom: clamp(34px, 5vw, 52px); }
.section-head p { color: var(--fg-muted); font-size: 1.06rem; margin-bottom: 0; }
.section-label {
  font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px; display: block;
}

/* ---------- app cards ---------- */
.apps { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 880px) { .apps { grid-template-columns: 1fr; } }

.app-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(26px, 3.4vw, 36px);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
  transition: transform .22s ease, box-shadow .28s ease, border-color .22s ease;
}
.app-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--border-strong); }
.app-card::before {
  content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 25%, transparent));
  opacity: 0; transition: opacity .25s ease;
}
.app-card:hover::before { opacity: 1; }

.app-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.app-orb { flex-shrink: 0; opacity: .92; }

.badges { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.badge {
  font-size: .73rem; font-weight: 600; letter-spacing: .02em;
  padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--fg-muted); background: var(--bg);
  white-space: nowrap;
}
.badge-accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.badge-status {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--fg-muted);
}
.badge-status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}

.app-card h3 { margin-bottom: 10px; font-size: 1.34rem; }
.app-card > p { color: var(--fg-muted); margin-bottom: 1.35em; }

.feature-list { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 11px; }
.feature-list li {
  position: relative; padding-left: 27px;
  font-size: .95rem; color: var(--fg-muted); line-height: 1.55;
}
.feature-list li::before {
  content: ""; position: absolute; left: 3px; top: .55em;
  width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent); opacity: .85;
}

.app-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.app-foot .meta { font-size: .86rem; color: var(--fg-faint); }

/* upcoming card */
.app-card-soon {
  background: transparent;
  border-style: dashed;
  border-color: var(--border-strong);
  box-shadow: none;
  align-items: flex-start;
  grid-column: 1 / -1;
  flex-direction: row; gap: 26px; align-items: center;
}
.app-card-soon:hover { transform: none; box-shadow: none; }
.app-card-soon::before { display: none; }
.app-card-soon .soon-body { flex: 1; min-width: 0; }
.app-card-soon h3 { margin-bottom: 6px; }
.app-card-soon p { margin-bottom: 0; color: var(--fg-muted); font-size: .97rem; }
@media (max-width: 620px) { .app-card-soon { flex-direction: column; align-items: flex-start; gap: 18px; } }

/* ---------- principles ---------- */
.principles { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); }
.principle { padding-top: 22px; border-top: 2px solid var(--accent-line); }
.principle h3 { font-size: 1.06rem; margin-bottom: 8px; }
.principle p { color: var(--fg-muted); font-size: .94rem; margin-bottom: 0; }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.contact-card {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.contact-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.contact-card p { color: var(--fg-muted); font-size: .92rem; margin-bottom: 14px; }
.contact-card a.mail {
  font-weight: 600; color: var(--accent); text-decoration: none;
  border-bottom: 1px solid var(--accent-line); padding-bottom: 1px;
  word-break: break-word;
}
.contact-card a.mail:hover { border-bottom-color: var(--accent); }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink); color: var(--ivory);
  padding: clamp(48px, 6vw, 68px) 0 34px; margin-top: 0;
}
.site-footer .wrap > .foot-top {
  display: flex; flex-wrap: wrap; gap: 30px;
  justify-content: space-between; align-items: flex-start;
  padding-bottom: 32px; border-bottom: 1px solid rgba(246,244,239,.13);
}
.site-footer img { height: 24px; width: auto; }
.foot-tag { color: rgba(246,244,239,.62); font-size: .92rem; margin: 14px 0 0; max-width: 34ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 12px 30px; }
.foot-links a { color: rgba(246,244,239,.72); text-decoration: none; font-size: .92rem; }
.foot-links a:hover { color: var(--ivory); }
.foot-bottom {
  padding-top: 26px; display: flex; flex-wrap: wrap; gap: 14px 28px;
  justify-content: space-between; align-items: center;
}
.foot-bottom p { margin: 0; font-size: .82rem; color: rgba(246,244,239,.46); max-width: 74ch; line-height: 1.6; }

/* ---------- reveal ---------- */
/* Hidden only when JS is confirmed running, so content never depends on it. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- theme-aware wordmark ----------
   The supplied wordmark is ivory, so it needs an ink twin on light backgrounds. */
.brand .logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand .logo-light { display: none; }
  :root:not([data-theme="light"]) .brand .logo-dark  { display: block; }
}
:root[data-theme="dark"] .brand .logo-light { display: none; }
:root[data-theme="dark"] .brand .logo-dark  { display: block; }

/* ---------- 404 ---------- */
.nf { min-height: 74vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.nf .code { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.nf p { color: var(--fg-muted); max-width: 46ch; margin-inline: auto; }
.nf canvas { margin: 0 auto 26px; }
.nf-cta { margin-top: 26px; }
.nf-foot { padding-top: 0; }

/* ---------- legal pages ---------- */
.legal { padding: clamp(44px, 6vw, 76px) 0 clamp(56px, 7vw, 88px); }
.legal-inner { max-width: 74ch; margin-inline: auto; }
.legal h1 { font-size: clamp(2rem, 4.6vw, 2.75rem); margin-bottom: 14px; }
.legal .updated {
  color: var(--fg-faint); font-size: .9rem; margin-bottom: 8px;
}
.legal .intro {
  color: var(--fg-muted); font-size: 1.06rem;
  padding-bottom: 26px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.legal h2 {
  font-size: 1.32rem; margin-top: 2.2em; margin-bottom: .55em;
  scroll-margin-top: 90px;
}
.legal h3 { font-size: 1.03rem; margin-top: 1.7em; margin-bottom: .4em; }
.legal p, .legal li { color: var(--fg-muted); }
.legal strong { color: var(--fg); font-weight: 600; }
/* Literal identifiers, such as an app's permission scopes. */
.legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em; color: var(--fg);
  background: var(--bg-sunken); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 6px; white-space: nowrap;
}
.legal ul { padding-left: 20px; margin: 0 0 1.1em; }
.legal li { margin-bottom: .5em; }
/* Prose links only. Buttons keep their own colours: `.legal a` would otherwise
   out-specify `.btn-primary` and paint its label accent-on-accent. */
.legal a:not(.btn) { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal a.btn { text-decoration: none; }
.legal a.btn-primary { color: #fff; }
.legal a.btn-ghost { color: var(--fg); }
.legal a.btn-ghost:hover { color: var(--accent); }

.legal-toc {
  background: var(--bg-sunken); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 26px; margin: 30px 0 8px;
}
.legal-toc h2 { margin: 0 0 12px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.legal-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.legal-toc li { margin-bottom: .4em; break-inside: avoid; }
.legal-toc a { color: var(--fg-muted); text-decoration: none; }
.legal-toc a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 620px) { .legal-toc ol { columns: 1; } }

.entity {
  background: var(--bg-raised); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px; margin: 0 0 1.4em;
}
.entity p { margin: 0; line-height: 1.75; }

.legal-table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .94rem; }
.legal-table th, .legal-table td {
  text-align: left; padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--border); vertical-align: top;
}
.legal-table th { color: var(--fg); font-weight: 600; }
.legal-table td { color: var(--fg-muted); }

.legal-note {
  margin-top: 2.6em; padding-top: 22px; border-top: 1px solid var(--border);
  font-size: .88rem; color: var(--fg-faint);
}

/* app-scoped legal pages */
.app-crumb {
  font-size: .86rem; color: var(--fg-faint); margin-bottom: 18px;
}
.app-crumb a { color: var(--fg-muted); text-decoration: none; }
.app-crumb a:hover { color: var(--accent); text-decoration: underline; }
.app-crumb span { margin: 0 7px; opacity: .55; }

/* ---------- app landing + docs ---------- */
.app-hero { padding: clamp(40px, 5.5vw, 68px) 0 8px; }
.app-hero .badges { margin-bottom: 20px; }
.app-hero h1 { font-size: clamp(2rem, 4.8vw, 2.9rem); margin-bottom: 16px; }
.app-hero .lede {
  font-size: clamp(1.04rem, 2vw, 1.18rem); color: var(--fg-muted);
  max-width: 62ch; margin-bottom: 1.5em;
}
.app-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }

.doc blockquote {
  margin: 0 0 1.3em; padding: 18px 22px;
  background: var(--bg-sunken);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--fg); font-size: .97rem; line-height: 1.7;
}
.doc blockquote p { margin: 0; color: var(--fg); }

.doc ol { padding-left: 22px; margin: 0 0 1.2em; }
.doc ol li { margin-bottom: .55em; color: var(--fg-muted); }
.doc ol li strong, .doc ul li strong { color: var(--fg); }

.note {
  border: 1px solid var(--accent-line); background: var(--accent-soft);
  border-radius: var(--radius); padding: 16px 20px; margin: 0 0 1.3em;
}
.note p { margin: 0; color: var(--fg-muted); font-size: .95rem; }
.note strong { color: var(--accent); }

.doc-nav {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 2.8em; padding-top: 24px; border-top: 1px solid var(--border);
}

/* live-on-marketplace badge */
.badge-live {
  display: inline-flex; align-items: center; gap: 6px;
  color: #1E7A4C; border-color: rgba(30, 122, 76, .32); background: rgba(30, 122, 76, .10);
}
.badge-live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #1E7A4C; flex-shrink: 0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .badge-live {
    color: #55C98D; border-color: rgba(85, 201, 141, .34); background: rgba(85, 201, 141, .13);
  }
  :root:not([data-theme="light"]) .badge-live::before { background: #55C98D; }
}
:root[data-theme="dark"] .badge-live {
  color: #55C98D; border-color: rgba(85, 201, 141, .34); background: rgba(85, 201, 141, .13);
}
:root[data-theme="dark"] .badge-live::before { background: #55C98D; }
