/* Perfect Universe — design system
   Palette taken from the Nooklio app icon: deep navy ground, cream type, sage accent.
   Each app page overrides --accent with its own icon colour. */

:root {
  --navy-900: #0b111d;
  --navy-800: #0e1522;
  --navy-700: #131c2c;
  --navy-600: #1a2437;
  --line:     #253048;

  --cream:    #ede8dc;
  --text:     #d9dde6;
  --muted:    #8e9aae;
  --sage:     #869d5d;
  --sage-lit: #a5bd75;

  --accent:      var(--sage);
  --accent-lit:  var(--sage-lit);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1080px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.3rem + 0.9vw, 2.1rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 3.4rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy-800);
  color: var(--text);
  font: 400 var(--step-0)/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- primitives ---------- */

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

h1, h2, h3 { color: var(--cream); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: var(--step-3); font-weight: 700; }
h2 { font-size: var(--step-2); font-weight: 650; }
h3 { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-lit); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.lead { font-size: var(--step-1); color: var(--text); line-height: 1.5; }
.muted { color: var(--muted); }

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 14px;
}

section { padding: clamp(56px, 8vw, 104px) 0; }
section + section { border-top: 1px solid var(--line); }

.stack > * + * { margin-top: 18px; }

/* ---------- brand lockup ---------- */
/* The logo is white line art (assets/brand/PU_logo.png), split into the monogram and
   the wordmark. Both carry their opacity in the alpha channel, so they sit on any
   dark ground without a box around them. */

.wordmark { display: flex; align-items: center; gap: 12px; flex: none; }
.wordmark:hover { text-decoration: none; opacity: 0.82; }
.wordmark .mark { height: 30px; width: auto; display: block; }
.wordmark .word { height: 17px; width: auto; display: block; }

.site-foot .wordmark { gap: 14px; }
.site-foot .wordmark .mark { height: 38px; }
.site-foot .wordmark .word { height: 21px; }

/* ---------- header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 17, 29, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 64px;
}
.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  color: var(--muted); font-size: var(--step--1); font-weight: 550;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--cream); text-decoration: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-size: var(--step--1); font-weight: 600; letter-spacing: 0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #0b111d; }
.btn-primary:hover { background: var(--accent-lit); }
.btn-ghost { border-color: var(--line); color: var(--cream); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-lit); }

/* ---------- hero ---------- */

.hero { position: relative; overflow: hidden; padding-top: clamp(64px, 9vw, 128px); }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto -20%; height: 620px;
  background:
    radial-gradient(42% 60% at 22% 30%, rgba(52, 78, 118, 0.5), transparent 70%),
    radial-gradient(38% 55% at 78% 12%, rgba(134, 157, 93, 0.28), transparent 72%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero h1 { max-width: 20ch; }
.hero .lead { max-width: 56ch; margin-top: 22px; color: #b9c2d1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ---------- app grid ---------- */

.apps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }

.app-card {
  --accent: var(--sage);
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--navy-700), var(--navy-800));
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.app-card:hover {
  text-decoration: none; transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: linear-gradient(180deg, var(--navy-600), var(--navy-700));
}
.app-card img {
  width: 76px; height: 76px; flex: none;
  border-radius: 18px; box-shadow: 0 6px 20px rgba(0,0,0,0.45);
}
.app-card h3 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.app-card p { font-size: var(--step--1); color: var(--muted); margin: 8px 0 0; }
.app-card .more {
  display: inline-block; margin-top: 14px;
  font-size: var(--step--1); font-weight: 600; color: var(--accent-lit);
}

.tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent-lit);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.tag-soon { border-color: var(--line); color: var(--muted); background: transparent; }

/* ---------- feature / value grid ---------- */

.cols { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.cols h3 { margin-bottom: 8px; }
.cols p { color: var(--muted); font-size: var(--step--1); }

.panel {
  padding: 26px; border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--navy-700);
}

/* ---------- app detail page ---------- */

.app-hero { display: grid; gap: 36px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: center; }
.app-hero .shot { justify-self: center; max-width: 100%; }
.app-hero .shot img { width: 100%; height: auto; border-radius: var(--r-lg); display: block; }
.app-icon {
  width: 96px; height: 96px; border-radius: 22px; display: block;
  box-shadow: 0 10px 34px rgba(0,0,0,0.5); margin-bottom: 24px;
}
.app-logo { max-width: 320px; height: auto; display: block; margin-bottom: 8px; }

.specs { border-top: 1px solid var(--line); margin-top: 8px; }
.specs div {
  display: flex; gap: 18px; justify-content: space-between;
  padding: 13px 0; border-bottom: 1px solid var(--line);
  font-size: var(--step--1);
}
.specs dt, .specs .k { color: var(--muted); }
.specs .v { color: var(--cream); text-align: right; font-weight: 550; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 22px; font-size: var(--step--1); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.checks b { color: var(--cream); font-weight: 600; }

/* ---------- long-form legal / support copy ---------- */

.prose { max-width: 72ch; }
.prose h2 { font-size: var(--step-1); margin: 44px 0 12px; }
.prose h3 { font-size: var(--step-0); margin: 28px 0 8px; color: var(--cream); }
.prose ul { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--accent); }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em; padding: 2px 6px; border-radius: 6px;
  background: var(--navy-600); color: var(--cream);
}
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: var(--step--1); }
.prose th, .prose td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--cream); font-weight: 600; }
.prose td { color: var(--muted); }

.note {
  padding: 18px 20px; border-radius: var(--r-md);
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--navy-700); font-size: var(--step--1); color: var(--text);
}

.page-head { padding-bottom: 0; }
.page-head .updated { font-size: var(--step--1); color: var(--muted); margin-top: 14px; }

.crumbs { font-size: var(--step--1); color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--cream); }

/* ---------- CTA band ---------- */

.band {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background:
    radial-gradient(70% 140% at 12% 0%, rgba(134, 157, 93, 0.16), transparent 70%),
    var(--navy-700);
  padding: clamp(28px, 5vw, 48px);
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
}
.band p { color: var(--muted); max-width: 46ch; margin-top: 10px; }

/* ---------- footer ---------- */

.site-foot { border-top: 1px solid var(--line); background: var(--navy-900); padding: 56px 0 40px; }
.foot-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.foot-grid h4 {
  margin: 0 0 14px; color: var(--cream);
  font-size: var(--step--1); font-weight: 600; letter-spacing: 0.02em;
}
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot-grid a { color: var(--muted); font-size: var(--step--1); }
.foot-grid a:hover { color: var(--cream); text-decoration: none; }
.foot-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  font-size: var(--step--1); color: var(--muted);
}

/* ---------- responsive ---------- */

@media (max-width: 780px) {
  .app-hero { grid-template-columns: 1fr; }
  .app-hero .shot { order: -1; max-width: 420px; }
  .nav { gap: 18px; }
  .nav .hide-sm { display: none; }
}

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

/* Focus visibility for keyboard users */
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent-lit); outline-offset: 3px; border-radius: 4px;
}
