/* Luke Scowen — bespoke 3D sites | Direction A "Nebula" */

:root {
  --bg: #14082e;
  --bg-2: #1e0f3f;
  --line: #3d2a63;
  --ink: #f4efff;
  --muted: #c9bdf0;
  --faint: #8f7bc4;
  --purple: #7b2ff7;
  --lime: #c6ff5e;
  --lime-dim: #b0f03d;
  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

section[id], #top { scroll-margin-top: 88px; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .brand { font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif; }

a { color: var(--lime); text-decoration: none; }
a:hover { color: var(--lime-dim); }

.accent { color: var(--lime); }

/* The sky is rendered in WebGL (js/scene.js) so it can feed the bloom pass.
   This gradient is only what shows before the scene has booted. */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  background: radial-gradient(130% 90% at 68% 12%, #33196e 0%, #07030f 72%);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* width:100% matters — .section is a flex column, and without it the auto
   inline margins shrink .wrap to its content width and collapse the grids. */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad);
  transition: background .3s ease, padding .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: rgba(20, 8, 46, 0.72);
  backdrop-filter: blur(10px);
  padding-block: 14px;
  border-bottom-color: var(--line);
}
.nav__brand { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.nav__links { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 34px); }
.nav__links a { color: var(--muted); font-size: 0.95rem; }
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  color: var(--bg) !important;
  background: var(--lime);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
}
.nav__cta:hover { background: var(--lime-dim); }
@media (max-width: 620px) {
  .nav__links a:not(.nav__cta) { display: none; }
}

/* ---------- sections ---------- */
/* Each section owns a 3D world (js/scene.js), so give every one enough height
   for its scene to be read before the next takes over. */
.section {
  position: relative;
  z-index: 2;
  padding-block: clamp(90px, 14vh, 160px);
  min-height: 88svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero.section { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }

.eyebrow, .section__kicker {
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  color: var(--lime);
  margin: 0 0 18px;
}

.section__title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
  margin: 0 0 48px;
  font-weight: 700;
}

/* ---------- hero ---------- */
/* Full-width column, with the copy itself capped — so the text stays left-
   aligned against the 3D subject on the right rather than centring into it. */
.hero__inner { max-width: var(--maxw); }
.hero__title {
  font-size: clamp(2.3rem, 5.6vw, 4.2rem);
  line-height: 1.04;
  font-weight: 700;
  max-width: 13ch;   /* keeps the headline clear of the 3D subject */
  margin: 0 0 24px;
}
.hero__lead { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--muted); max-width: 34ch; margin: 0 0 36px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.hero__price { color: var(--muted); font-size: 0.95rem; }
.hero__price strong { color: var(--ink); }

.scroll-hint {
  position: absolute;
  left: var(--pad);
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  color: var(--faint);
}
.scroll-hint span {
  width: 22px; height: 34px;
  border: 1px solid var(--faint);
  border-radius: 12px;
  position: relative;
}
.scroll-hint span::after {
  content: "";
  position: absolute;
  left: 50%; top: 7px;
  width: 3px; height: 7px;
  background: var(--lime);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: dot 1.6s ease-in-out infinite;
}
@keyframes dot { 0%,100% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 70% { opacity: 0; transform: translate(-50%, 10px); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint span::after { animation: none; opacity: 1; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 15px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn--solid { background: var(--lime); color: var(--bg); }
.btn--solid:hover { background: var(--lime-dim); color: var(--bg); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--lime); color: var(--ink); }

/* ---------- cards ---------- */
.card {
  background: rgba(30, 15, 63, 0.55);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  backdrop-filter: blur(4px);
}

/* ---------- steps ---------- */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.step__n { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; color: var(--lime); font-weight: 700; }
.step h3 { font-size: 1.1rem; margin: 12px 0 8px; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---------- pricing ---------- */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; align-items: start; }
.price__label { font-family: 'Space Grotesk', sans-serif; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; color: var(--lime); margin: 0 0 10px; }
.price__amount { font-family: 'Space Grotesk', sans-serif; font-size: 3.2rem; font-weight: 700; margin: 0 0 6px; line-height: 1; }
.price__amount span { font-size: 1.1rem; color: var(--muted); }
.price__note { color: var(--muted); font-size: 0.95rem; margin: 0 0 18px; }
.price__list { list-style: none; margin: 0 0 24px; padding: 0; }
.price__list li { position: relative; padding-left: 24px; margin-bottom: 9px; color: var(--muted); font-size: 0.95rem; }
.price__list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 10px; height: 10px; border-radius: 3px; background: var(--lime); }
.price--feature { background: linear-gradient(150deg, rgba(123,47,247,0.35), rgba(198,255,94,0.10)); border-color: rgba(198,255,94,0.35); }

/* ---------- work ---------- */
.work { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.work__item { padding: 0; overflow: hidden; display: flex; flex-direction: column; color: var(--ink); transition: transform .2s ease, border-color .2s ease; }
a.work__item:hover { transform: translateY(-4px); border-color: var(--lime); }
/* Serves both the <img> screenshots and the gradient placeholder tiles. */
.work__item picture { display: block; }
.work__thumb {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: center top;
  background: radial-gradient(circle at 60% 35%, var(--purple), var(--bg) 70%);
}
.work__meta { padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.work__name { font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.05rem; }
.work__desc { color: var(--faint); font-size: 0.88rem; }
.work__item--empty { align-items: center; justify-content: center; min-height: 260px; border-style: dashed; color: var(--faint); }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 40px; align-items: start; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }
.contact__lead { color: var(--muted); }
.contact__alt { color: var(--faint); font-size: 0.9rem; }

.contact__form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 430px) { .field--row { grid-template-columns: 1fr; } }
.field--row > div { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.82rem; color: var(--muted); font-family: 'Space Grotesk', sans-serif; letter-spacing: 0.02em; }
.field input, .field select, .field textarea {
  background: rgba(20, 8, 46, 0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--lime); outline-offset: 1px; border-color: transparent; }
.field select option { color: #14082e; }
.website-only { display: flex; flex-direction: column; gap: 16px; animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-status { margin: 4px 0 0; font-size: 0.9rem; min-height: 1.2em; }
.form-status.is-ok { color: var(--lime); }
.form-status.is-err { color: #ff8fa3; }

/* ---------- footer ---------- */
.footer { position: relative; z-index: 2; border-top: 1px solid var(--line); padding-block: 34px; }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; color: var(--faint); font-size: 0.9rem; }
.footer__brand { font-family: 'Space Grotesk', sans-serif; color: var(--muted); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
}


/* ---------- supporting copy blocks ---------- */
.steps__note {
  margin: 26px 0 0;
  color: var(--faint);
  font-size: 0.95rem;
  max-width: 62ch;
}

.price__compare {
  margin: 30px 0 0;
  padding: 22px 24px;
  border-left: 2px solid var(--lime);
  background: rgba(30, 15, 63, 0.4);
  border-radius: 0 14px 14px 0;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 74ch;
}

/* "Quoted" sits where a number normally does, so it needs its own size. */
.price__amount--quote { font-size: 2.2rem; letter-spacing: -0.01em; }

.faq {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px 40px;
}
.faq__item h3 {
  font-size: 1.02rem;
  margin: 0 0 8px;
  color: var(--ink);
}
.faq__item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- work: this-site tile and the closing call to action ---------- */

.work__item--cta {
  border-style: dashed;
  border-color: var(--lime);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
}
a.work__item--cta:hover { background: rgba(198, 255, 94, 0.06); }
.work__cta-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
}
.work__cta-note { color: var(--muted); font-size: 0.92rem; }
.work__cta-link {
  margin-top: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--lime);
  font-size: 0.95rem;
}
