/* Aidan Grant v2: bold 3D, Midnight Violet */
@font-face {
  font-family: "Alfarn 2";
  src: url("fonts/Alfarn-2.woff2") format("woff2"),
       url("fonts/Alfarn-2.otf") format("opentype"),
       url("fonts/Alfarn-2.ttf") format("truetype");
  font-display: swap;
}

:root {
  --canvas: #0B0A12;
  --surface: #17131F;
  --surface-2: #211A2E;
  --ink: #F3EEF8;
  --ink-soft: #A79FB5;
  --accent: #B07CFF;
  --accent-deep: #9560EE;
  --accent-press: #7E4BD8;
  --accent-ink: #0B0A12;
  --line: rgb(243 238 248 / 0.12);
  --display: "Alfarn 2", "Archivo", system-ui, sans-serif;
  --text: "Alegreya", Georgia, serif;
  --gutter: clamp(1.1rem, 4vw, 4rem);
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --r: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-width: none; }
/* No side scrollbar: the violet progress line at the top shows how far down you are */
html::-webkit-scrollbar { display: none; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font-family: var(--text); font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
::selection { background: var(--accent); color: var(--accent-ink); }
:root { caret-color: var(--accent); accent-color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { margin: 0; }

.display, .hero__line, .ring__word, .card__big, .services__title, .process__title, .contact__title, .about__label, .step h3 {
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-stretch: 112%; letter-spacing: -0.045em; line-height: 0.86;
}

/* ------------------------------------------------------------ chrome -- */
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 70; opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>"); }
.progress { position: fixed; inset: 0 0 auto; height: 2px; z-index: 80; }
.progress span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

.bar {
  position: fixed; inset: 0 0 auto; z-index: 60;
  display: flex; align-items: center; gap: 2rem;
  padding: clamp(0.8rem, 1.6vw, 1.2rem) var(--gutter);
  background: linear-gradient(to bottom, rgb(11 10 18 / 0.85), rgb(11 10 18 / 0.4) 60%, transparent);
}
.bar__mark { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none;
  font-family: var(--display); font-weight: 800; font-size: 1rem; letter-spacing: -0.01em; }
/* Aidan's AG terminal monogram (assets/logo.png, resized from assets/AG terminal monogram@2x.png; same art as the tab icon) */
.bar__logo { display: block; height: clamp(2.2rem, 3vw, 2.7rem); width: auto; border-radius: 22%; }
.bar__nav { display: flex; gap: 1.6rem; margin-left: auto; font-family: var(--display); font-weight: 600; font-size: 0.95rem; }
.bar__nav a { text-decoration: none; color: var(--ink-soft); padding: 0.4rem 0; transition: color 150ms var(--ease); }
.bar__nav a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--display); font-weight: 800; font-size: 1rem; white-space: nowrap;
  text-decoration: none; cursor: pointer; border: 0; border-radius: 999px;
  padding: 0.9em 1.7em; min-height: 46px;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 18px -8px rgb(0 0 0 / 0.6), inset 0 1px 0 rgb(255 255 255 / 0.3);
  transition: background-color 150ms var(--ease), transform 120ms var(--ease);
}
.btn--small { font-size: 0.9rem; padding: 0.6em 1.2em; min-height: 40px; }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--accent-deep); } }
.btn:active { background: var(--accent-press); transform: scale(0.96); }
.btn:disabled { opacity: 0.6; cursor: progress; }


/* -------------------------------------------------------------- hero -- */
.hero { position: relative; }
.hero__stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; }
.hero__poster, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__video { opacity: 0; transition: opacity 400ms var(--ease); }
.hero__video.is-ready { opacity: 1; }
.hero__glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(40% 45% at 50% 52%, rgb(176 124 255 / 0.10), transparent 70%),
              linear-gradient(to top, var(--canvas), transparent 22%); }
.hero__title { position: absolute; inset: 0; display: grid; align-content: center; padding-inline: var(--gutter); pointer-events: none; }
.hero__line { display: block; white-space: nowrap; font-size: clamp(3.4rem, 13.2vw, 15rem); will-change: transform; }
.hero__line--b { justify-self: end; color: transparent; -webkit-text-stroke: 2px var(--ink); }
.hero__meta { position: absolute; left: var(--gutter); top: 22vh; margin: 0;
  font-family: var(--display); font-weight: 700; font-size: 0.95rem; line-height: 1.3; }
.hero__meta em { font-family: var(--text); font-weight: 500; color: var(--accent); }
.hero__foot { position: absolute; inset: auto var(--gutter) clamp(1.5rem, 6vh, 3.5rem); display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; }
.hero__sub { margin: 0; max-width: 30ch; color: var(--ink-soft); font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem); line-height: 1.4; }

/* ----------------------------------------------------------- marquee -- */
.marquee { padding-block: clamp(2.5rem, 6vw, 5rem); border-block: 1px solid var(--line); overflow: hidden; display: grid; gap: 0.6rem; }
.marquee__row { display: flex; white-space: nowrap; }
.marquee__track { display: flex; align-items: center; gap: 2.2rem; padding-right: 2.2rem; flex: 0 0 auto; will-change: transform; }
.marquee__track span { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-stretch: 110%;
  letter-spacing: -0.035em; font-size: clamp(2.4rem, 7vw, 6.5rem); line-height: 1; }
.marquee__track span.o { color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
.marquee__track i { width: clamp(0.8rem, 1.6vw, 1.4rem); aspect-ratio: 1; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }

/* -------------------------------------------------------------- work -- */
.work__stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.ring__scene { perspective: 1500px; perspective-origin: 50% 40%; width: 100%; height: 100%; display: grid; place-items: center; }
.ring { position: relative; width: 0; height: 0; transform-style: preserve-3d; --n: 9; --R: min(540px, 60vh); --cw: min(290px, 32vh); --ch: min(370px, 41vh); }
.ring__probe { position: absolute; width: var(--R); height: 0; visibility: hidden; pointer-events: none; }
.ring__word { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); font-size: clamp(5rem, 24vw, 26rem); color: var(--ink); white-space: nowrap; }
.card {
  position: absolute; left: calc(var(--cw) / -2); top: calc(var(--ch) / -2);
  width: var(--cw); height: var(--ch); border-radius: var(--r); overflow: hidden;
  transform: rotateY(calc(var(--i) * 360deg / var(--n))) translateZ(var(--R)); /* --n cards spaced evenly */
  backface-visibility: hidden; text-decoration: none;
  display: flex; flex-direction: column; justify-content: flex-end; gap: calc(var(--cw) * 0.028); padding: calc(var(--cw) * 0.075);
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.7), inset 0 1px 0 rgb(255 255 255 / 0.08);
}
.card--shot { padding: 0; justify-content: flex-start; background: #fff; }
.card--shot img { width: 100%; height: 72%; object-fit: cover; object-position: 30% 0; }
.card--shot .card__tag, .card--shot .card__name { margin-inline: calc(var(--cw) * 0.07); color: #14101c; }
.card--shot .card__tag { margin-top: calc(var(--cw) * 0.055); }
.card__tag { font-family: var(--display); font-weight: 700; font-size: max(0.65rem, calc(var(--cw) * 0.041)); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.card__name { font-family: var(--display); font-weight: 800; font-size: calc(var(--cw) * 0.06); line-height: 1.1; }
.card__big { font-size: calc(var(--cw) * 0.118); font-stretch: 100%; }
.card__note { color: var(--ink-soft); font-size: max(0.78rem, calc(var(--cw) * 0.054)); line-height: 1.35; }
.card--shot-left img { object-position: 0 0; } /* HA: keep its logo and headline in view */
.card--accent { background: var(--accent); border-color: transparent; }
.card--accent .card__big { color: var(--accent-ink); }
.card--accent .card__note { color: #2A1847; }
.work__links { position: absolute; bottom: clamp(1.2rem, 5vh, 2.5rem); left: 0; right: 0; text-align: center; margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.work__links a { color: var(--ink); }

/* ------------------------------------------------------------- about -- */
.about__stage { min-height: 100vh; min-height: 100svh; display: grid; align-content: center; gap: 2rem; padding: 6rem var(--gutter); max-width: 92rem; margin-inline: auto; }
.about__label { font-size: 1rem; letter-spacing: 0.02em; color: var(--accent); }
.about__text { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 100%; text-transform: none;
  font-size: clamp(1.9rem, 1rem + 3.4vw, 4.4rem); line-height: 1.18; letter-spacing: -0.03em; text-wrap: pretty; }
.about__text em { font-family: var(--text); font-style: italic; font-weight: 500; color: var(--accent); letter-spacing: 0; }
.about__text .w { opacity: 0.16; transition: none; }

/* ---------------------------------------------------------- services -- */
.services {
  max-width: 92rem; margin-inline: auto; padding: clamp(5rem, 10vw, 9rem) var(--gutter);
  display: grid; gap: clamp(1.5rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line); overflow-x: clip;
}
.services__title { font-size: clamp(3rem, 10.5vw, 10rem); color: transparent; -webkit-text-stroke: 2px var(--accent); }
.services__text { margin: 0; justify-self: end; max-width: 30ch; font-family: var(--display); font-weight: 800; font-size: clamp(1.5rem, 1rem + 2vw, 2.9rem);
  line-height: 1.18; letter-spacing: -0.03em; text-wrap: pretty; }
.services__text em { font-family: var(--text); font-style: italic; font-weight: 500; color: var(--accent); letter-spacing: 0; }

/* ----------------------------------------------------------- process -- */
.process { padding: clamp(5rem, 10vw, 9rem) var(--gutter) 0; max-width: 80rem; margin-inline: auto; }
.process__title { font-size: clamp(3rem, 10vw, 9rem); margin-bottom: clamp(2rem, 5vw, 4rem); }
.stack { list-style: none; margin: 0; padding: 0; }
.step {
  position: sticky; top: calc(14vh + var(--k, 0) * 1.6rem);
  min-height: 52vh; margin-bottom: 18vh; padding: clamp(1.6rem, 4vw, 3.2rem);
  border-radius: calc(var(--r) * 1.4); border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--surface-2), var(--surface));
  box-shadow: 0 -20px 60px -20px rgb(0 0 0 / 0.8), inset 0 1px 0 rgb(255 255 255 / 0.07);
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; gap: 0.5rem 2rem; align-items: start;
  transform-origin: 50% 0;
}
.step:nth-child(1) { --k: 0; } .step:nth-child(2) { --k: 1; } .step:nth-child(3) { --k: 2; } .step:nth-child(4) { --k: 3; margin-bottom: 10vh; }
.step:nth-child(even) { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.step:nth-child(even) p { color: #2A1847; }
.step:nth-child(even) .step__n { color: var(--accent-ink); }
.step__n { grid-row: 1 / 3; font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 5vw, 4rem); line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.step h3 { font-size: clamp(3rem, 9vw, 8rem); }
.step p { margin: 0; align-self: end; max-width: 34ch; color: var(--ink-soft); font-size: clamp(1.1rem, 1rem + 0.6vw, 1.5rem); line-height: 1.4; }

/* ----------------------------------------------------------- contact -- */
.contact { position: relative; padding: clamp(5rem, 10vw, 9rem) var(--gutter) 0; max-width: 92rem; margin-inline: auto; }
.contact__title { font-size: clamp(3.2rem, 14vw, 15rem); display: grid; }
.contact__title span:last-child { color: var(--accent); }
.contact__grid { margin-top: clamp(2.5rem, 6vw, 5rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact__intro { margin: 0; color: var(--ink-soft); max-width: 46ch; }
.contact__side { display: grid; gap: 1.2rem; align-content: start; }
.contact__lede { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 1rem + 2vw, 2.8rem); line-height: 1.2; letter-spacing: -0.03em; }
.contact__mail { margin: 0; color: var(--ink-soft); }
.contact__mail a { color: var(--ink); }
.form { margin-top: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: 0.35rem; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: 0.95rem; color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%; min-height: 50px; background: var(--surface); border: 1px solid rgb(243 238 248 / 0.2);
  border-radius: 12px; padding: 0.7em 0.9em; color: var(--ink); resize: vertical;
  transition: border-color 150ms var(--ease);
}
.field input:hover, .field textarea:hover { border-color: rgb(176 124 255 / 0.5); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: transparent; }
#cf-business { font-family: var(--display); font-weight: 800; font-size: 1.15rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; margin-top: 0.4rem; }
.form__status { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.form__status.is-error { color: #FF9DB0; }
.thanks { position: absolute; inset: 0 0 auto; min-height: 100%; background: var(--canvas); z-index: 5; display: grid; place-content: center; justify-items: center; gap: 1.2rem; text-align: center; padding: var(--gutter); }
.thanks[hidden] { display: none; }
.foot { margin-top: clamp(4rem, 8vw, 7rem); padding-block: 2rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.92rem; color: var(--ink-soft); }
.foot a { color: var(--ink); }

/* ------------------------------------------------------------ mobile -- */
@media (max-width: 860px) {
  .bar__nav { display: none; }
  .bar .btn--small { margin-left: auto; }
  .hero__line { font-size: 17vw; white-space: normal; }
  .hero__line--b { -webkit-text-stroke-width: 1.5px; }
  .hero__meta { top: 16vh; }
  .hero__foot { flex-direction: column; align-items: flex-start; }
  .ring { --R: min(300px, 36vh); --cw: min(200px, 24vh); --ch: min(260px, 31vh); }
  .services__text { justify-self: start; }
  .services__title { -webkit-text-stroke-width: 1.5px; }
  .step { grid-template-columns: 1fr; min-height: 46vh; }
  .step__n { grid-row: auto; }
  .contact__grid { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------- reduced motion -- */
@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }
  .about__text .w { opacity: 1; }
  .step { position: relative; top: auto; margin-bottom: 1.5rem; min-height: 0; }
  /* the ring becomes a plain swipeable row of cards */
  .work__stage { height: auto; display: block; padding: 6rem 0 4rem; }
  .ring__scene { perspective: none; display: block; height: auto; }
  .ring { width: auto; height: auto; transform: none !important; display: flex; gap: 1rem; overflow-x: auto; padding: 0 var(--gutter) 1rem; scroll-snap-type: x mandatory; }
  .ring__word { position: static; transform: none; font-size: clamp(3rem, 12vw, 8rem); align-self: center; padding-right: 1rem; }
  .card { position: relative; left: auto; top: auto; transform: none; flex: 0 0 auto; scroll-snap-align: start; }
  .work__links { position: static; margin-top: 1rem; }
}
