/* ==========================================================================
   felipenipper.com
   Dark-first, Apple-flavoured. Light theme follows the system unless the
   visitor has explicitly chosen one (stored on <html data-theme>).
   ========================================================================== */

:root {
  --bg: #0b0d12;
  --bg-elev: #11141c;
  --bg-card: #12161f;
  --bg-card-hover: #171c27;
  --line: #222836;
  --line-soft: #1a1f2b;

  --text: #e9edf5;
  --text-soft: #a3adc0;
  --text-mute: #6e7889;

  --accent: #5b8cff;
  --accent-2: #22b3ff; /* gradient partner — stays in the blue family */
  --accent-text: #fff;
  /* Custom properties are substituted at computed-value time, so --glow has to
     be redeclared anywhere --accent is overridden (see .app-card / .app-page). */
  --glow-pct: 30%;
  --glow: color-mix(in srgb, var(--accent) var(--glow-pct), transparent);

  --radius: 16px;
  --radius-lg: 24px;
  --wrap: 1120px;
  --pad: clamp(1.15rem, 4vw, 2rem);

  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 30px rgb(0 0 0 / 0.25);
  --shadow-lg: 0 2px 6px rgb(0 0 0 / 0.35), 0 24px 60px rgb(0 0 0 / 0.35);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter,
    Roboto, Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Inter, Roboto, Helvetica, Arial, sans-serif;

  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fdfdfe;
    --bg-elev: #fff;
    --bg-card: #fff;
    --bg-card-hover: #fff;
    --line: #e3e7ee;
    --line-soft: #eef1f6;

    --text: #10141c;
    --text-soft: #4c5567;
    --text-mute: #7b8497;

    --accent-text: #fff;
    --glow-pct: 18%;

    --shadow: 0 1px 2px rgb(16 20 28 / 0.06), 0 8px 24px rgb(16 20 28 / 0.06);
    --shadow-lg: 0 2px 6px rgb(16 20 28 / 0.08), 0 24px 50px rgb(16 20 28 / 0.1);

    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #fdfdfe;
  --bg-elev: #fff;
  --bg-card: #fff;
  --bg-card-hover: #fff;
  --line: #e3e7ee;
  --line-soft: #eef1f6;

  --text: #10141c;
  --text-soft: #4c5567;
  --text-mute: #7b8497;

  --accent-text: #fff;
  --glow-pct: 18%;

  --shadow: 0 1px 2px rgb(16 20 28 / 0.06), 0 8px 24px rgb(16 20 28 / 0.06);
  --shadow-lg: 0 2px 6px rgb(16 20 28 / 0.08), 0 24px 50px rgb(16 20 28 / 0.1);

  color-scheme: light;
}

/* Elements that set their own --accent must recompute the derived glow. */
.app-card,
.app-page {
  --glow: color-mix(in srgb, var(--accent) var(--glow-pct), transparent);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

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

/* `clip` on both html and body, not `overflow-x: hidden` on body alone: iOS
   Safari still lets you pan a body-only `hidden` sideways, and `hidden` would
   also turn the element into a scroll container (forcing overflow-y to auto),
   which breaks the sticky header. Decorative bleed is clipped at its own
   section — see .hero — so this is only a safety net. */
html, body { overflow-x: clip; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.022em;
  margin: 0;
  font-weight: 640;
}

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 50%;
  translate: -50% -150%;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 12px 12px;
  font-weight: 600;
  transition: translate 0.2s;
}
.skip:focus { translate: -50% 0; }

.muted { color: var(--text-mute); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}
.site-header.is-scrolled { border-bottom-color: var(--line-soft); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 640;
  letter-spacing: -0.02em;
  margin-right: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px var(--glow);
}

.nav ul { display: flex; gap: 0.25rem; }

.nav a {
  display: block;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: color 0.18s, background 0.18s;
}
.nav a:hover { color: var(--text); background: var(--line-soft); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 0.4rem; }

.theme-toggle, .menu-toggle {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}
.theme-toggle:hover, .menu-toggle:hover {
  color: var(--text);
  background: var(--line-soft);
  border-color: var(--line);
}
.theme-toggle svg { width: 1.05rem; height: 1.05rem; }
.theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun,
:root:not([data-theme="dark"]) .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon,
:root:not([data-theme="dark"]) .theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}

/* justify-content is required here: the shared rule above uses place-items,
   which only centres the cross axis once this becomes a column flexbox — the
   bars would otherwise stack against the top of the button. */
.menu-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; }
.menu-toggle span {
  display: block;
  width: 17px; height: 1.7px;
  background: currentColor;
  border-radius: 2px;
  transition: translate 0.22s, rotate 0.22s, opacity 0.22s;
}
.menu-toggle[aria-expanded="true"] span:first-child { translate: 0 3.35px; rotate: 45deg; }
.menu-toggle[aria-expanded="true"] span:last-child { translate: 0 -3.35px; rotate: -45deg; }

.mobile-nav { display: none; border-top: 1px solid var(--line-soft); }
.mobile-nav ul { padding: 0.5rem var(--pad) 1rem; }
.mobile-nav a {
  display: block;
  padding: 0.75rem 0.25rem;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--text-soft);
  border-bottom: 1px solid var(--line-soft);
}
.mobile-nav li:last-child a { border-bottom: 0; }
.mobile-nav a[aria-current="page"] { color: var(--text); }

@media (max-width: 800px) {
  .nav { display: none; }
  .menu-toggle { display: flex; }
  /* :not([hidden]) so the toggle's `hidden` attribute still wins — a plain
     `display: block` here would override the UA rule and pin the menu open. */
  .mobile-nav:not([hidden]) { display: block; }
}

/* --------------------------------------------------------------------------
   Buttons & bits
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.3rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 590;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s, background 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: 0 6px 20px var(--glow);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, #fff);
  box-shadow: 0 8px 26px var(--glow);
}
.btn-primary .i-apple { fill: currentColor; stroke: none; }

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover { background: var(--line-soft); border-color: var(--text-mute); }

.kicker {
  margin: 0 0 0.6rem;
  font-size: 0.775rem;
  font-weight: 660;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
}

.chip {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.74rem;
  font-weight: 560;
  letter-spacing: 0.01em;
  color: var(--text-soft);
}

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.section-intro {
  max-width: 62ch;
  color: var(--text-soft);
  font-size: 1.05rem;
  margin-bottom: 2.5rem;
}

.section-more { margin-top: 2.5rem; display: flex; justify-content: center; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

/* overflow-x: clip (not hidden) so the glow's vertical bleed survives while the
   -20% horizontal bleed of .hero-bg stops creating page-wide scrollable overflow.
   `hidden` would force overflow-y to auto and trap the bleed in a scroll box. */
.hero {
  position: relative;
  overflow-x: clip;
  padding: clamp(3rem, 9vw, 6.5rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}

.hero-bg {
  position: absolute;
  inset: -30% -20% auto;
  height: 130%;
  background:
    radial-gradient(46% 44% at 22% 18%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    radial-gradient(40% 40% at 82% 8%, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 70%);
  filter: blur(24px);
  pointer-events: none;
  z-index: -1;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero-bg { opacity: 0.5; }
}
:root[data-theme="light"] .hero-bg { opacity: 0.5; }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding: 0.35rem 0.85rem 0.35rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-card);
  font-size: 0.82rem;
  font-weight: 560;
  color: var(--text-soft);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 0 3px color-mix(in srgb, #34c759 22%, transparent);
}

.hero h1 { margin: 0 0 1.25rem; }

.hero-greeting {
  display: block;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  font-weight: 500;
  color: var(--text-mute);
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
}

.hero-name {
  display: block;
  font-size: clamp(2.6rem, 7.5vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  background: linear-gradient(135deg, var(--text) 30%, color-mix(in srgb, var(--text) 45%, var(--accent)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 52ch;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--text-soft);
  margin-bottom: 2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 3rem; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line-soft);
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 680;
  letter-spacing: -0.03em;
}
.stat-label {
  display: block;
  font-size: 0.83rem;
  color: var(--text-mute);
  line-height: 1.4;
}

/* Hero visual — a slow drift of app icons */
.hero-visual { display: grid; place-items: center; min-height: 380px; }

.orbit { position: relative; width: min(100%, 380px); aspect-ratio: 1; }
.orbit::before {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px dashed var(--line);
  opacity: 0.65;
}
.orbit::after {
  content: "";
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  border: 1px dashed var(--line);
  opacity: 0.45;
}

.orbit-icon {
  position: absolute;
  width: clamp(52px, 15vw, 76px);
  height: auto;
  border-radius: 22%;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.28), 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
  animation: float 7s ease-in-out infinite;
}
.orbit-1 { top: 4%;  left: 34%; animation-delay: 0s; }
.orbit-2 { top: 26%; right: 2%; animation-delay: -1.4s; }
.orbit-3 { bottom: 20%; right: 12%; animation-delay: -2.8s; }
.orbit-4 { bottom: 6%; left: 22%; animation-delay: -4.2s; }
.orbit-5 { top: 40%; left: 0%;  animation-delay: -5.6s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(-1.5deg); }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
}
@media (max-width: 520px) {
  .hero-stats { grid-template-columns: 1fr; gap: 1.25rem; text-align: left; }
}

/* --------------------------------------------------------------------------
   App cards
   -------------------------------------------------------------------------- */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.15rem;
}

.app-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
}
.app-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}
.app-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow-lg);
  background: var(--bg-card-hover);
}
.app-card:hover::before { opacity: 1; }
.app-card:focus-within { border-color: var(--accent); }

.app-card-link { display: flex; gap: 1.1rem; padding: 1.4rem; height: 100%; }

.app-icon {
  flex: none;
  width: 62px;
  height: 62px;
  border-radius: 22%;
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.22), 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent);
}

.app-card-body { min-width: 0; display: flex; flex-direction: column; }
.app-card-body h3 { font-size: 1.12rem; margin-bottom: 0.1rem; }

.app-tagline {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  font-weight: 560;
  color: var(--accent);
}

.app-summary {
  margin: 0 0 1rem;
  font-size: 0.91rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.app-meta {
  margin: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.app-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 570;
  color: var(--accent);
}
.app-more svg { width: 0.95em; height: 0.95em; transition: translate 0.2s; }
.app-card:hover .app-more svg { translate: 3px 0; }

/* --------------------------------------------------------------------------
   About & timeline
   -------------------------------------------------------------------------- */

.section-about { border-top: 1px solid var(--line-soft); }

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}
.about-copy p { color: var(--text-soft); max-width: 60ch; }
.about-copy strong { color: var(--text); font-weight: 600; }

.timeline {
  --tl-dot: 9px;
  --tl-indent: 1.5rem;
  --tl-dot-top: 0.55rem;
  position: relative;
  padding-left: var(--tl-indent);
}
.timeline::before {
  content: "";
  position: absolute;
  left: calc(var(--tl-dot) / 2);
  translate: -50% 0;
  top: calc(var(--tl-dot-top) + var(--tl-dot) / 2);
  bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(var(--accent), var(--line) 65%);
}

.tl-item { position: relative; padding-bottom: 1.85rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: calc(var(--tl-indent) * -1);
  top: var(--tl-dot-top);
  width: var(--tl-dot); height: var(--tl-dot);
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.tl-year {
  display: block;
  font-size: 0.78rem;
  font-weight: 660;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 0.15rem;
}
.tl-body h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.tl-body p { font-size: 0.9rem; color: var(--text-soft); margin: 0; }

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Skills
   -------------------------------------------------------------------------- */

.section-skills { border-top: 1px solid var(--line-soft); }

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

.skill-group {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.2s, background 0.2s;
}
.skill-group:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }

.skill-group h3 {
  font-size: 0.79rem;
  font-weight: 660;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 0.9rem;
}

.skill-group ul { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.skill-group li {
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  background: var(--line-soft);
  font-size: 0.845rem;
  font-weight: 520;
  color: var(--text-soft);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.section-contact { border-top: 1px solid var(--line-soft); }

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

.contact-card {
  display: grid;
  gap: 0.15rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.contact-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: var(--shadow);
}
.contact-card svg { width: 1.4rem; height: 1.4rem; color: var(--accent); margin-bottom: 0.75rem; }
.contact-label { font-size: 0.78rem; font-weight: 640; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-mute); }
.contact-value { font-size: 1rem; font-weight: 560; color: var(--text); overflow-wrap: anywhere; }
.contact-card.is-primary { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }

/* --------------------------------------------------------------------------
   Interior pages
   -------------------------------------------------------------------------- */

.page-head { padding: clamp(2.5rem, 7vw, 4.5rem) 0 0; }
.page-head h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  letter-spacing: -0.032em;
  margin-bottom: 1rem;
}
.page-lead {
  max-width: 60ch;
  font-size: clamp(1rem, 2vw, 1.12rem);
  color: var(--text-soft);
}
.error-page { padding-bottom: clamp(4rem, 12vw, 8rem); }
.error-page .hero-actions { margin-top: 2rem; margin-bottom: 0; }

.breadcrumb { padding-top: 1.5rem; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 0.45rem; font-size: 0.85rem; color: var(--text-mute); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.45rem; color: var(--line); }
.breadcrumb a { color: var(--text-mute); transition: color 0.18s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] { color: var(--text-soft); }

/* App detail */
.app-page { position: relative; }
.app-hero-bg {
  position: absolute;
  inset: 0 0 auto;
  height: 520px;
  background: radial-gradient(60% 60% at 50% 0%, var(--glow), transparent 72%);
  pointer-events: none;
  z-index: -1;
}

.app-hero { padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(1rem, 3vw, 2rem); }
.app-hero-inner {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
}
.app-hero-icon {
  width: clamp(84px, 18vw, 124px);
  height: auto;
  border-radius: 23%;
  box-shadow: 0 14px 40px rgb(0 0 0 / 0.3), 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}
.app-hero-copy { flex: 1 1 320px; }
.app-hero-copy h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); letter-spacing: -0.035em; }
.app-hero-tagline {
  margin: 0.4rem 0 0.9rem;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  font-weight: 560;
  color: var(--accent);
}
.app-hero-summary { max-width: 58ch; color: var(--text-soft); margin-bottom: 1.6rem; }

.app-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.app-body-main p { color: var(--text-soft); max-width: 66ch; font-size: 1.02rem; }
.app-note {
  margin-top: 1.75rem;
  padding: 1.1rem 1.25rem;
  border-left: 2px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--bg-card);
  font-size: 0.92rem;
}

.app-body-aside {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  position: sticky;
  top: 5.5rem;
}
.app-body-aside h2 {
  font-size: 0.78rem;
  font-weight: 660;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 0.9rem;
}
.tech-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }
.tech-list li {
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
  background: var(--line-soft);
  font-size: 0.82rem;
  color: var(--text-soft);
}

.app-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  margin: 0 0 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.88rem;
}
.app-facts dt { color: var(--text-mute); }
.app-facts dd { margin: 0; color: var(--text); font-weight: 520; }

.app-body-aside > a {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 560;
  color: var(--accent);
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-soft);
  width: 100%;
}

@media (max-width: 860px) {
  .app-body { grid-template-columns: 1fr; }
  .app-body-aside { position: static; }
}

.section-features { border-top: 1px solid var(--line-soft); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}
.feature-grid li {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.2s, transform 0.2s;
}
.feature-grid li:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  transform: translateY(-2px);
}
.feature-grid h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.feature-grid p { font-size: 0.9rem; color: var(--text-soft); margin: 0; }

.section-cta { border-top: 1px solid var(--line-soft); }
.cta-inner {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  text-align: center;
  padding: clamp(2.5rem, 6vw, 3.5rem) var(--pad);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(70% 120% at 50% 0%, var(--glow), transparent 70%),
    var(--bg-card);
}
.cta-inner h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
.cta-inner p { color: var(--text-soft); margin-bottom: 1.35rem; }

/* Prose (policies) */
.prose-page { padding-bottom: clamp(2rem, 5vw, 3rem); }
.prose-head { padding: clamp(1.5rem, 4vw, 2.5rem) var(--pad) clamp(1.75rem, 4vw, 2.5rem); }
.prose-head h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.032em; margin-bottom: 0.85rem; }

.prose { max-width: 72ch; }
.prose > * { max-width: 68ch; }
.prose p { color: var(--text-soft); font-size: 1.04rem; line-height: 1.75; }
.prose h2 {
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  margin: 2.5rem 0 0.85rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-soft);
}
.prose h3 { font-size: 1.08rem; margin: 1.75rem 0 0.6rem; }
.prose ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1.1em; }
.prose li { color: var(--text-soft); margin-bottom: 0.4rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.policy-back { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line-soft); }

/* Policy index */

/* The page lead already sits close above, so the full .section top padding
   leaves the first group stranded. */
.policy-section { padding-top: clamp(2.25rem, 5vw, 3.25rem); }
.policy-group + .policy-group { margin-top: clamp(2.75rem, 6vw, 4rem); }
.policy-group .section-title { font-size: clamp(1.35rem, 3vw, 1.75rem); margin-bottom: 1.25rem; }

.policy-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0.75rem; }
.policy-list a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.2s, transform 0.2s;
}
.policy-list a:hover { border-color: var(--accent); transform: translateY(-2px); }
.policy-list img { width: 40px; height: 40px; border-radius: 22%; flex: none; }
.policy-list strong { display: block; font-size: 0.98rem; font-weight: 580; }
.policy-list small { display: block; font-size: 0.8rem; color: var(--text-mute); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: clamp(2.5rem, 6vw, 4rem) 0 2rem;
  margin-top: clamp(2rem, 6vw, 4rem);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: clamp(2rem, 5vw, 3rem);
  padding-bottom: 2.5rem;
}
.footer-brand { display: grid; gap: 0.9rem; justify-items: start; }
.footer-brand p { font-size: 0.92rem; color: var(--text-mute); max-width: 30ch; }

.footer-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.footer-links h2 {
  font-size: 0.76rem;
  font-weight: 660;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 0.85rem;
}
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { font-size: 0.92rem; color: var(--text-soft); transition: color 0.18s; }
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.85rem;
  color: var(--text-mute);
}
.footer-bottom p { margin: 0; }

@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

/* --------------------------------------------------------------------------
   Motion
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .hero-visual, .skip { display: none; }
  body { background: #fff; color: #000; }
}
