/* ARMB — Timeline-based motion design site
   Dark, premium, refined. Editorial serif + clean sans + mono callouts.
   Scroll-driven 3D parallax intro.
*/

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@300;400;500&display=swap');

:root {
  --bg: #08090B;
  --bg-2: #0d0e11;
  --bg-3: #14161b;
  --fg: #EDECE7;
  --fg-2: rgba(237, 236, 231, 0.65);
  --fg-3: rgba(237, 236, 231, 0.42);
  --fg-4: rgba(237, 236, 231, 0.18);
  --line: rgba(237, 236, 231, 0.08);
  --line-2: rgba(237, 236, 231, 0.14);
  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Geist', ui-sans-serif, -apple-system, system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
::selection { background: rgba(91, 140, 255, 0.35); color: var(--fg); }
a { color: inherit; text-decoration: none; }

/* Subtle film grain across whole page */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ── Entry Stage ──────────────────────────────────────────────────────── */
.entry-stage {
  position: fixed;
  inset: 0;
  z-index: 100;
  perspective: 1400px;
  perspective-origin: 50% 45%;
  background:
    radial-gradient(80% 60% at 50% 40%, rgba(91,140,255,0.06), transparent 60%),
    radial-gradient(120% 80% at 50% 100%, rgba(0,0,0,0.6), transparent 60%),
    var(--bg);
  overflow: hidden;
  transition: opacity 0.2s ease;
}

.entry-camera {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.layer {
  position: absolute;
  top: 50%; left: 50%;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

/* far grid */
.layer-grid { width: 220vmax; height: 220vmax; }
.grid-inner {
  width: 100%; height: 100%;
  background-image:
    linear-gradient(to right, rgba(237,236,231,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(237,236,231,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(closest-side at 50% 50%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(closest-side at 50% 50%, black 30%, transparent 75%);
}

/* mid frame */
.layer-frame { width: min(70vw, 920px); height: min(48vw, 560px); }
.frame-inner {
  position: relative;
  width: 100%; height: 100%;
  border: 1px solid rgba(91,140,255,0.35);
  border-radius: 2px;
}
.frame-tag {
  position: absolute;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg);
  padding: 2px 8px;
}
.frame-tag    { top: -8px; left: 18px; }
.frame-tag-r  { top: -8px; right: 18px; left: auto; color: var(--fg-3); }
.frame-tag-bl { bottom: -8px; left: 18px; top: auto; color: var(--fg-3); }
.frame-tag-br { bottom: -8px; right: 18px; left: auto; top: auto; color: var(--fg-3); }

/* near rules */
.layer-rules { width: 100vw; height: 100vh; }
.rule-h {
  position: absolute; top: 50%; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, transparent, rgba(237,236,231,0.18) 20%, rgba(237,236,231,0.18) 80%, transparent);
}
.rule-v {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(237,236,231,0.18) 20%, rgba(237,236,231,0.18) 80%, transparent);
}

/* letters */
.layer-letters {
  width: 100vw;
  height: 40vh;
  display: flex; align-items: center; justify-content: center;
  gap: 0;
  pointer-events: none;
}
.entry-letter {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(120px, 22vw, 360px);
  line-height: 0.9;
  color: var(--fg);
  display: inline-block;
  will-change: transform, opacity, filter, letter-spacing;
}

/* Final assembled mark */
.entry-final {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  pointer-events: none;
  gap: 18px;
}
.entry-final-mark {
  font-family: var(--serif);
  font-size: clamp(120px, 22vw, 360px);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.entry-final-sub {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--fg-3);
  text-transform: uppercase;
}

/* HUD */
.entry-hud {
  position: absolute;
  inset: 0 32px auto 32px;
  top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  z-index: 2;
}
.hud-l { display: flex; align-items: center; gap: 10px; }
.hud-dot { width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.hud-r { display: flex; align-items: baseline; gap: 6px; }
.hud-num { color: var(--fg); font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: 0.1em; }

.entry-progress {
  position: absolute;
  left: 32px; right: 32px; bottom: 28px;
  height: 1px;
  background: var(--line);
  z-index: 2;
}
.entry-progress-fill {
  height: 100%;
  width: 0;
  background: #5B8CFF;
  box-shadow: 0 0 10px currentColor;
}

/* Spacer that gives the intro scroll-room */
.intro-spacer { width: 100%; }

/* ── Nav ──────────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  background: transparent;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, padding 0.3s ease;
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav-scrolled {
  background: rgba(8, 9, 11, 0.7);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  padding: 14px 32px;
}
.nav-logo {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 28px; color: var(--fg-2); text-transform: uppercase; }
.nav-links a:hover { color: var(--fg); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  text-transform: uppercase;
  color: var(--fg-2);
}

@media (max-width: 720px) {
  .nav { padding: 14px 18px; }
  .nav-links { display: none; }
}

/* ── Main content ─────────────────────────────────────────────────────── */
.content {
  position: relative;
  z-index: 10;
  background: var(--bg);
}

section {
  padding: 140px 32px;
  max-width: 1320px;
  margin: 0 auto;
}

.sect-head {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 48px;
}
.sect-head::before {
  content: "";
  width: 32px; height: 1px;
  background: var(--fg-3);
}
.sect-num { color: var(--fg); font-weight: 500; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding-top: 120px;
  padding-bottom: 80px;
  position: relative;
}
.hero-meta {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.meta-line { width: 32px; height: 1px; background: var(--fg-3); }

.hero-h {
  font-family: var(--serif);
  font-size: clamp(56px, 9vw, 148px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  font-weight: 400;
  margin: 60px 0 0;
  text-wrap: pretty;
}
.hero-line {
  display: block;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1s ease, transform 1s ease;
}
.hero-line:nth-child(1) { transition-delay: 0.1s; }
.hero-line:nth-child(2) { transition-delay: 0.25s; }
.hero-line:nth-child(3) { transition-delay: 0.4s; }
.hero.in .hero-line { opacity: 1; transform: translateY(0); }
.hero-h em { font-style: italic; }

.hero-foot {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: end;
  margin-top: 80px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease 0.6s, transform 1s ease 0.6s;
}
.hero.in .hero-foot { opacity: 1; transform: translateY(0); }
.hero-blurb {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 52ch;
  margin: 0;
}
.hero-actions { display: flex; gap: 14px; justify-content: flex-end; flex-wrap: wrap; }

.hero-corners {
  position: absolute;
  bottom: 32px; left: 32px; right: 32px;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-4);
  border-top: 1px solid var(--line);
  padding-top: 18px;
  opacity: 0;
  transition: opacity 1s ease 0.9s;
}
.hero.in .hero-corners { opacity: 1; }

@media (max-width: 820px) {
  .hero-foot { grid-template-columns: 1fr; gap: 32px; }
  .hero-actions { justify-content: flex-start; }
  .hero-corners { gap: 12px; flex-wrap: wrap; position: static; margin-top: 40px; }
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #5B8CFF; color: #08090B; }
.btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(237,236,231,0.06); }

/* ── About ────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-h {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
  opacity: 0; transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}
.about-h em { font-style: italic; }
.about-body {
  display: flex; flex-direction: column; gap: 24px;
  opacity: 0; transform: translateY(20px);
  transition: opacity 1s ease 0.2s, transform 1s ease 0.2s;
}
.about.in .about-h, .about.in .about-body { opacity: 1; transform: translateY(0); }
.about-body p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--fg-2);
  max-width: 50ch;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 16px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
}
.about-stats > div { display: flex; flex-direction: column; gap: 4px; }
.about-stats dt {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.about-stats dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}

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

/* ── Services ─────────────────────────────────────────────────────────── */
.services-h {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 80px;
  text-wrap: balance;
}
.services-h em { font-style: italic; }

.services-list {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
}

.service {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr 280px 40px;
  gap: 32px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease, padding 0.3s ease;
}
.services.in .service { opacity: 1; transform: translateY(0); }
.service-hover { padding: 38px 0; }

.service-n {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--fg-3);
  transition: color 0.25s ease;
}
.service-t {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.service-d {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 56ch;
}
.service-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.service-tags span {
  padding: 4px 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg-3);
}
.service-arrow {
  font-family: var(--serif);
  font-size: 28px;
  text-align: right;
  color: var(--fg-3);
  transition: color 0.25s ease, transform 0.25s ease;
}
.service-hover .service-arrow { transform: translateX(6px); }
.service-line {
  position: absolute;
  bottom: -1px; left: 0;
  width: 0; height: 1px;
  background: var(--fg);
  transition: width 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.service-hover .service-line { width: 100%; }

@media (max-width: 900px) {
  .service { grid-template-columns: 60px 1fr 32px; }
  .service-tags { display: none; }
}

/* ── Contact ──────────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.contact-h {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}
.contact-h em { font-style: italic; }
.contact-blurb {
  font-size: 17px;
  line-height: 1.6;
  color: var(--fg-2);
  max-width: 42ch;
  margin: 0 0 36px;
}
.contact-meta {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  border-top: 1px solid var(--line);
}
.contact-meta li {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.contact-meta li span {
  color: var(--fg-3);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.18em;
}
.contact-meta li b { color: var(--fg); font-weight: 500; }

.contact-form {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  display: flex; flex-direction: column; gap: 18px;
  position: relative;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-l {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.field-e { color: #ff8a6c; text-transform: none; letter-spacing: 0.04em; font-size: 11px; }
.field input, .field textarea, .field select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  padding: 10px 0;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--fg-4); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent, #5B8CFF);
}
.field select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='rgba(237,236,231,0.5)' d='M0 0h10L5 6z'/></svg>");
  background-repeat: no-repeat; background-position: right 4px center;
  cursor: pointer;
}
.field select option { background: var(--bg-3); color: var(--fg); }
.field-err input, .field-err textarea { border-bottom-color: #ff8a6c; }

.form-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; gap: 16px;
}
.form-meta {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.form-success {
  display: flex; flex-direction: column; align-items: flex-start; gap: 18px;
  padding: 12px 0;
}
.success-mark {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border: 1px solid;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 500;
  animation: pop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.form-success h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.015em;
  margin: 0;
}
.form-success p { margin: 0; color: var(--fg-2); font-size: 15px; line-height: 1.55; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 10;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 60px 32px 40px;
  max-width: 1320px;
  margin: 80px auto 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 60px;
  align-items: center;
}
.footer-mark {
  font-family: var(--serif);
  font-size: 36px;
  letter-spacing: -0.02em;
}
.footer-cols { display: flex; gap: 60px; }
.footer-cols > div { display: flex; flex-direction: column; gap: 4px; }
.footer-l {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.footer-cols > div > span:last-child {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--fg);
}
.footer-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-3);
  text-align: right;
}
@media (max-width: 820px) {
  .footer { grid-template-columns: 1fr; gap: 24px; text-align: left; }
  .footer-cols { flex-wrap: wrap; gap: 24px; }
  .footer-tag { text-align: left; }
}
