/* ----- Tokens ----- */
:root {
  --bg: #0A0F1F;
  --bg-2: #0E1530;
  --ink: #F2EEE5;
  --ink-soft: #B6BAC9;
  --ink-muted: #6B7388;
  --line: rgba(242, 238, 229, 0.12);
  --line-soft: rgba(242, 238, 229, 0.06);

  --navy-deep: #202740;
  --navy: #224C7B;
  --blue: #1885C2;
  --blue-light: #1DBCE8;
  --cyan: #59E6F2;

  --display: 'Fraunces', 'Iowan Old Style', 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  --max: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --rail: 200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 900px 600px at 85% -5%, rgba(34, 76, 123, 0.22), transparent 65%),
    radial-gradient(ellipse 700px 500px at -5% 110%, rgba(89, 230, 242, 0.05), transparent 70%),
    radial-gradient(ellipse 1200px 800px at 50% 50%, rgba(14, 21, 48, 0.4), transparent 80%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}

::selection { background: var(--cyan); color: var(--bg); }

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

/* ----- Header ----- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  z-index: 5;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 2px 16px rgba(89, 230, 242, 0.25));
}
.brand-name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: 0.005em;
  font-variation-settings: "opsz" 20;
}

.site-nav {
  display: flex;
  gap: clamp(20px, 3vw, 36px);
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 0;
  transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--cyan); }

/* ----- Hero ----- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 9vw, 120px) var(--gutter) clamp(72px, 11vw, 140px);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  grid-template-areas:
    "meta mark"
    "title mark"
    "sub mark";
  gap: 28px clamp(32px, 6vw, 80px);
  align-items: start;
  position: relative;
}

.hero-meta {
  grid-area: meta;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  animation: rise 1s 0.05s cubic-bezier(.2,.8,.2,1) backwards;
}
.hero-meta .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.hero-title {
  grid-area: title;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 7.4vw, 96px);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 50;
  animation: rise 1.1s 0.15s cubic-bezier(.2,.8,.2,1) backwards;
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--cyan);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.hero-sub {
  grid-area: sub;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 8px 0 0;
  font-weight: 300;
  animation: rise 1.1s 0.3s cubic-bezier(.2,.8,.2,1) backwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Logo & orbits */
.hero-mark {
  grid-area: mark;
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 1;
  justify-self: end;
  align-self: center;
  display: grid;
  place-items: center;
  animation: rise 1.4s 0.1s cubic-bezier(.2,.8,.2,1) backwards;
}

.hero-mark-img {
  position: relative;
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 12px 48px rgba(89, 230, 242, 0.18));
  animation: float 7s ease-in-out infinite;
  z-index: 2;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.orbit {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.orbit-outer {
  inset: 0;
  border: 1px dashed rgba(89, 230, 242, 0.22);
  animation: spin 48s linear infinite;
}
.orbit-inner {
  inset: 11%;
  border: 1px solid rgba(34, 76, 123, 0.45);
  animation: spin-rev 90s linear infinite;
}
.orbit-dot {
  position: absolute;
  top: 50%;
  left: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  transform: translateY(-50%);
  box-shadow: 0 0 14px var(--cyan), 0 0 4px #fff;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "meta" "mark" "title" "sub";
    gap: 28px;
  }
  .hero-mark {
    justify-self: center;
    width: min(100%, 240px);
  }
}

/* ----- Now strip ----- */
.now-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  position: relative;
  flex-shrink: 0;
}
.status-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--cyan);
  opacity: 0.35;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  from { transform: scale(0.7); opacity: 0.5; }
  to { transform: scale(2.2); opacity: 0; }
}
.status-label {
  color: var(--cyan);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.status-rule {
  height: 1px;
  width: 60px;
  background: linear-gradient(to right, var(--line), transparent);
}
.status-product {
  letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  .now-strip { flex-wrap: wrap; gap: 10px 14px; }
  .status-rule { display: none; }
}

/* ----- Sections ----- */
.work,
.studio,
.contact {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 10vw, 140px) var(--gutter);
  border-bottom: 1px solid var(--line-soft);
}

.section-head {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  gap: clamp(24px, 4vw, 48px);
  margin-bottom: 56px;
  align-items: baseline;
}
.section-num {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-muted);
  padding-top: 14px;
}
.section-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.018em;
  margin: 0;
  font-variation-settings: "opsz" 96, "SOFT" 50;
}

@media (max-width: 720px) {
  .section-head {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 40px;
  }
  .section-num { padding-top: 0; }
}

/* ----- Product ----- */
.product {
  display: grid;
  grid-template-columns: var(--rail) 1fr;
  gap: clamp(24px, 4vw, 48px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.product-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}
.product-num { color: var(--cyan); }
.product-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-light);
  margin-right: 8px;
  vertical-align: 1px;
}

.product-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(48px, 7.5vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--ink);
  font-variation-settings: "opsz" 144, "SOFT" 70;
}
.product-tld {
  color: var(--ink-muted);
  font-style: italic;
  font-size: 0.42em;
  letter-spacing: -0.005em;
  margin-left: 4px;
  font-variation-settings: "opsz" 36;
}
.product-tagline {
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--ink);
  margin: 22px 0 26px;
  letter-spacing: -0.005em;
  font-variation-settings: "opsz" 36, "SOFT" 100;
}
.product-desc {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 36px;
  font-weight: 300;
}
.product-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: all 0.25s ease;
  background: rgba(255, 255, 255, 0.01);
}
.product-link:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(89, 230, 242, 0.04);
}
.product-link svg { transition: transform 0.25s ease; }
.product-link:hover svg { transform: translate(2px, -2px); }

@media (max-width: 720px) {
  .product { grid-template-columns: 1fr; gap: 18px; }
  .product-meta { flex-direction: row; flex-wrap: wrap; gap: 12px 18px; }
}

/* ----- Studio ----- */
.studio-body {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  margin-bottom: 64px;
}
.studio-body p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 18px;
  font-weight: 300;
  grid-column: 2;
}
.studio-body p:last-child { margin-bottom: 0; }

.studio-facts {
  display: grid;
  grid-template-columns: var(--rail) repeat(4, 1fr);
  gap: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  margin: 0;
}
.studio-facts > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  grid-column: span 1;
}
.studio-facts > div:first-child { grid-column-start: 2; }
.studio-facts dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.studio-facts dd {
  margin: 0;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.3;
  font-variation-settings: "opsz" 24;
}

@media (max-width: 860px) {
  .studio-body { grid-template-columns: 1fr; gap: 16px; }
  .studio-body p { grid-column: 1; }
  .studio-facts {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .studio-facts > div:first-child { grid-column-start: 1; }
}

/* ----- Contact ----- */
.contact-body {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
}
.contact-body > * { grid-column: 2; }
.contact-lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 50ch;
  margin: 0 0 28px;
  font-weight: 300;
  line-height: 1.6;
}
.contact-email {
  font-family: var(--display);
  font-size: clamp(34px, 5.5vw, 64px);
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.012em;
  font-style: italic;
  font-variation-settings: "opsz" 96, "SOFT" 100;
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
  transition: color 0.25s ease;
}
.contact-email::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 1px;
  background: currentColor;
  opacity: 0.25;
  transition: opacity 0.25s, background 0.25s;
}
.contact-email:hover { color: var(--cyan); }
.contact-email:hover::after { opacity: 1; background: var(--cyan); }

@media (max-width: 720px) {
  .contact-body { grid-template-columns: 1fr; gap: 16px; }
  .contact-body > * { grid-column: 1; }
}

/* ----- Footer ----- */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 36px var(--gutter) 56px;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-muted);
}
.footer-fact {
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.005em;
  font-family: var(--display);
  color: var(--ink-soft);
  font-size: 14px;
  font-variation-settings: "opsz" 18, "SOFT" 100;
}

@media (max-width: 600px) {
  .footer-row { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* ----- A11y ----- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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