/* OFEEND — design system. No external libraries; one optional font request. */

:root {
  color-scheme: dark;

  --bg: #050507;
  --bg-raise: #0b0b10;
  --ink: #f2f2f5;
  --ink-2: #a3a5b1;
  --ink-3: #6b6d79;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.16);
  --glow-a: #4f5dff;
  --glow-b: #9a6bff;
  --glow-c: #2bb6c9;

  --sans: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --max: 1200px;
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* film grain, very low opacity */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

::selection { background: rgb(154 107 255 / 0.4); }

.wrap { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }

.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

/* ───────── Header ───────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(5 5 7 / 0.6);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-block-end: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  font-size: 0.82rem;
}

.wordmark::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 18px 2px rgb(154 107 255 / 0.7);
}

.site-nav ul { display: flex; gap: clamp(1rem, 3vw, 2.2rem); }

.site-nav a {
  font-size: 0.88rem;
  color: var(--ink-2);
  padding-block: 0.4rem;
  transition: color 0.25s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ink); }

/* ───────── Ambient background ───────── */
.ambient {
  position: absolute;
  inset: 0 0 auto 0;
  height: 110vh;
  min-height: 720px;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.ambient i {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.42;
}

.ambient i:nth-child(1) { width: 46vw; height: 46vw; left: -8vw; top: -14vw; background: var(--glow-a); }
.ambient i:nth-child(2) { width: 38vw; height: 38vw; right: -10vw; top: 4vw; background: var(--glow-b); opacity: 0.32; }
.ambient i:nth-child(3) { width: 30vw; height: 30vw; left: 38vw; top: 22vw; background: var(--glow-c); opacity: 0.16; }

@media (prefers-reduced-motion: no-preference) {
  .ambient i:nth-child(1) { animation: drift 26s ease-in-out infinite alternate; }
  .ambient i:nth-child(2) { animation: drift 32s ease-in-out infinite alternate-reverse; }
  .ambient i:nth-child(3) { animation: drift 38s ease-in-out infinite alternate; }
}

@keyframes drift {
  to { transform: translate3d(5vw, 4vw, 0) scale(1.12); }
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 20%, transparent 75%);
  opacity: 0.55;
}

.page { position: relative; }

/* ───────── Type & buttons ───────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--line-strong);
}

.display {
  font-size: clamp(2.9rem, 8.2vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 500;
  text-wrap: balance;
}

.display .serif { font-size: 1.06em; }

.h2 {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 500;
  text-wrap: balance;
}

.h2 .serif { font-size: 1.05em; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.28rem);
  color: var(--ink-2);
  max-width: 54ch;
  line-height: 1.55;
  text-wrap: pretty;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  height: 3rem;
  padding-inline: 1.5rem;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  transition: transform 0.35s var(--ease), background 0.25s, border-color 0.25s, color 0.25s;
}

.btn-solid { background: var(--ink); color: #08080b; border-color: var(--ink); }
.btn-solid:hover { transform: translateY(-2px); background: #fff; }
.btn-ghost { background: rgb(255 255 255 / 0.03); }
.btn-ghost:hover { background: rgb(255 255 255 / 0.08); border-color: rgb(255 255 255 / 0.3); }

.arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(4px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.92rem;
  color: var(--ink);
  border-block-end: 1px solid var(--line-strong);
  padding-block-end: 2px;
  transition: border-color 0.25s;
}
.link-arrow:hover { border-color: var(--ink); }

/* ───────── Hero ───────── */
.hero { padding-block: clamp(5rem, 13vw, 10rem) clamp(3rem, 7vw, 6rem); }

.hero .display { margin-block: 1.6rem 1.8rem; max-width: 14ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-block-start: 2.4rem; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-block-start: clamp(3.5rem, 8vw, 6.5rem);
  border-block-start: 1px solid var(--line);
}

.stat { padding: 1.6rem 1.2rem 0 0; }
.stat + .stat { padding-inline-start: 1.6rem; border-inline-start: 1px solid var(--line); }
.stat b { display: block; font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.stat span { display: block; margin-block-start: 0.6rem; font-size: 0.85rem; color: var(--ink-3); }

/* ───────── Sections ───────── */
.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.section-head { display: grid; gap: 1.2rem; margin-block-end: clamp(2.5rem, 5vw, 4rem); }

/* ───────── Bento ───────── */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }

.card {
  --mx: 50%;
  --my: 0%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.035), rgb(255 255 255 / 0.012));
  border: 1px solid var(--line);
  transition: border-color 0.35s, transform 0.5s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgb(255 255 255 / 0.09), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.card:hover { border-color: var(--line-strong); }
.card:hover::before { opacity: 1; }

.card h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; }
.card p { color: var(--ink-2); margin-block-start: 0.8rem; max-width: 46ch; }

.tag {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-block-end: 1.1rem;
}

.card-foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; margin-block-start: 1.8rem; }

.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
.span-2 { grid-column: span 2; }

.card-feature { min-height: 440px; display: flex; flex-direction: column; justify-content: flex-end; }

/* radar visual */
.radar {
  position: absolute;
  inset-inline-end: -8%;
  inset-block-start: -10%;
  width: min(62%, 440px);
  aspect-ratio: 1;
  z-index: -1;
  mask-image: radial-gradient(circle, #000 35%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle, #000 35%, transparent 72%);
}

.radar span {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.18);
}
.radar span:nth-child(1) { width: 100%; height: 100%; }
.radar span:nth-child(2) { width: 68%; height: 68%; }
.radar span:nth-child(3) { width: 36%; height: 36%; background: radial-gradient(circle, rgb(154 107 255 / 0.4), transparent 70%); border-color: rgb(154 107 255 / 0.5); }

.radar i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 14px 2px rgb(255 255 255 / 0.5);
}
.radar i:nth-of-type(1) { left: 62%; top: 24%; }
.radar i:nth-of-type(2) { left: 28%; top: 62%; }
.radar i:nth-of-type(3) { left: 74%; top: 70%; }

@media (prefers-reduced-motion: no-preference) {
  .radar span:nth-child(3) { animation: beacon 3.6s ease-in-out infinite; }
  .radar i { animation: twinkle 4s ease-in-out infinite; }
  .radar i:nth-of-type(2) { animation-delay: -1.3s; }
  .radar i:nth-of-type(3) { animation-delay: -2.6s; }
}

@keyframes beacon { 50% { transform: scale(1.14); opacity: 0.7; } }
@keyframes twinkle { 50% { opacity: 0.35; } }

/* ───────── Principles ───────── */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); border-block-start: 1px solid var(--line); }
.principle { padding: 2.2rem 2rem 0 0; }
.principle + .principle { padding-inline-start: 2rem; border-inline-start: 1px solid var(--line); }
.principle small { color: var(--ink-3); font-size: 0.8rem; letter-spacing: 0.14em; }
.principle h3 { font-size: 1.35rem; font-weight: 500; letter-spacing: -0.02em; margin-block: 1rem 0.7rem; }
.principle p { color: var(--ink-2); max-width: 34ch; }

/* ───────── CTA ───────── */
.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
  border-radius: calc(var(--radius) + 8px);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.04), transparent);
}

.cta::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 -60% 0;
  height: 100%;
  background: radial-gradient(ellipse at 50% 100%, rgb(110 100 255 / 0.5), transparent 65%);
  filter: blur(30px);
}

.cta .h2 { max-width: 16ch; margin-inline: auto; }
.cta .btn { margin-block-start: 2.4rem; }
.cta-mail { display: block; margin-block-start: 1.4rem; color: var(--ink-3); font-size: 0.9rem; }

/* ───────── Footer ───────── */
.site-footer { border-block-start: 1px solid var(--line); padding-block: 2.2rem 3rem; color: var(--ink-3); font-size: 0.86rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; }
.footer-links a { transition: color 0.25s; }
.footer-links a:hover { color: var(--ink); }

/* ───────── ADAM page ───────── */
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }

.phone {
  position: relative;
  width: min(100%, 330px);
  margin-inline: auto;
  aspect-ratio: 9 / 18.5;
  padding: 10px;
  border-radius: 46px;
  background: linear-gradient(160deg, #23232c, #0c0c11 50%);
  border: 1px solid var(--line-strong);
  box-shadow: 0 60px 120px -30px rgb(80 70 255 / 0.45), 0 0 0 1px rgb(0 0 0 / 0.6);
}

.phone-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 37px;
  background: radial-gradient(ellipse at 50% 28%, #15152a, #07070b 70%);
  display: flex;
  flex-direction: column;
  padding: 2.1rem 1.1rem 1.1rem;
}

.phone-screen::before {
  content: "";
  position: absolute;
  inset-block-start: 10px;
  inset-inline: 0;
  margin-inline: auto;
  width: 84px;
  height: 22px;
  border-radius: 99px;
  background: #000;
}

.phone .radar { position: relative; inset: auto; width: 82%; margin: 1.2rem auto 0; z-index: 0; mask-image: none; -webkit-mask-image: none; }

.phone-title { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); text-align: center; margin-block-start: 0.6rem; }

.nearby { margin-block-start: auto; display: grid; gap: 0.5rem; }
.nearby li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: 14px;
  background: rgb(255 255 255 / 0.05);
  border: 1px solid var(--line);
  font-size: 0.8rem;
}
.nearby .av { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #5b6bff, #b98aff); flex: none; }
.nearby .nm { flex: 1; }
.nearby .sc { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.nearby small { display: block; color: var(--ink-3); font-size: 0.68rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: s; }
.step { counter-increment: s; }
.step::before {
  content: "0" counter(s);
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 3rem;
  line-height: 1;
  color: var(--ink-3);
  margin-block-end: 1.2rem;
}

.rows { border-block-start: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 11rem 1fr auto;
  gap: 1rem 2rem;
  align-items: baseline;
  padding-block: 1.6rem;
  border-block-end: 1px solid var(--line);
}
.row .tag { margin: 0; }
.row h3 { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.02em; }
.row p { color: var(--ink-2); margin-block-start: 0.35rem; max-width: 52ch; }

/* ───────── Legal prose ───────── */
.prose { max-width: 720px; padding-block: clamp(4rem, 9vw, 7rem) clamp(4rem, 8vw, 6rem); }
.prose h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -0.04em; line-height: 1; font-weight: 500; margin-block: 1.2rem 1rem; }
.prose .meta { color: var(--ink-3); font-size: 0.9rem; padding-block-end: 2rem; border-block-end: 1px solid var(--line); margin-block-end: 1rem; }
.prose h2 { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.02em; margin-block: 2.4rem 0.7rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-block-start: 0.9rem; }
.prose ul { list-style: none; display: grid; gap: 0.6rem; margin-block-start: 0.6rem; }
.prose li { position: relative; padding-inline-start: 1.3rem; }
.prose li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 6px; height: 1px; background: var(--ink-3); }
.prose strong { color: var(--ink); font-weight: 500; }
.prose a { color: var(--ink); border-block-end: 1px solid var(--line-strong); }
.prose a:hover { border-color: var(--ink); }

/* ───────── Scroll-driven reveal (progressive enhancement) ───────── */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes rise {
      from { opacity: 0; translate: 0 36px; }
    }

    .reveal {
      animation: rise auto cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}

/* ───────── Responsive ───────── */
@media (max-width: 900px) {
  .bento { grid-template-columns: 1fr; }
  .span-6, .span-4, .span-3, .span-2 { grid-column: auto; }
  .card-feature { min-height: 400px; }
  .principles, .steps { grid-template-columns: 1fr; }
  .principle, .principle + .principle { padding: 1.8rem 0; border-inline-start: 0; border-block-end: 1px solid var(--line); }
  .split { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .radar { width: 78%; inset-inline-end: -20%; }
}

@media (max-width: 560px) {
  .site-nav li:nth-child(n+3) { display: none; }
  .hero-stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 1.2rem 0; border-inline-start: 0; border-block-end: 1px solid var(--line); }
}
