/* ==========================================================================
   StageGlass — marketing site
   Cinematic editorial dark, blue practical-light bloom from the icon gradient.
   Display: Fraunces (variable serif, italic for impact moments)
   Body: Geist (refined modern sans)
   Mono: Geist Mono (beat timeline)
   ========================================================================== */

:root {
  /* Palette pulled from the StageGlass app icon gradient */
  --bg: #0A0A0B;
  --bg-soft: #0F0F12;
  --surface: #16161A;
  --surface-2: #1C1C22;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --fg: #FFFFFF;
  --fg-dim: #9CA0A8;
  --fg-faint: #5E626B;

  --blue-1: #5B7FD9;   /* icon gradient top */
  --blue-2: #4A6BC4;   /* icon gradient bottom */
  --blue-glow: rgba(91, 127, 217, 0.45);
  --blue-glow-soft: rgba(91, 127, 217, 0.18);

  --warm: #C9986A;     /* studio palette wood-tone, accent only */
  --red: #D14545;      /* on-air, used sparingly */

  /* Typography */
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-body: "Geist", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", monospace;

  /* Rhythm */
  --container: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-pad: clamp(80px, 12vw, 160px);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

::selection {
  background: var(--blue-1);
  color: #07080C;
}

/* Film-grain noise overlay across the whole page — keeps the dark areas
   from feeling flat-vector and adds the "real footage" quality. */
.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;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ==========================================================================
   Containers + shared
   ========================================================================== */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-dim);
  margin: 0 0 24px 0;
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-1);
  box-shadow: 0 0 14px var(--blue-glow);
}
.eyebrow--surface { color: var(--fg-faint); }

.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6.4vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 64px 0;
  max-width: 18ch;
}
.section__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--blue-1);
}
.section__title--left { max-width: 24ch; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 240ms var(--ease), background 240ms var(--ease), box-shadow 240ms var(--ease), color 240ms var(--ease);
}

.btn--primary {
  background: linear-gradient(140deg, var(--blue-1), var(--blue-2));
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 14px 40px -10px var(--blue-glow);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 22px 60px -10px var(--blue-glow);
}

.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--fg);
}
.btn--ghost:hover {
  border-color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
}

.btn--link {
  padding: 14px 6px;
  color: var(--fg-dim);
}
.btn--link:hover { color: var(--fg); }
.btn--link svg { transition: transform 240ms var(--ease); }
.btn--link:hover svg { transform: translateY(2px); }

.btn--large {
  padding: 22px 36px;
  font-size: 17px;
}

/* ==========================================================================
   Nav
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px var(--gutter);
  background: linear-gradient(to bottom, rgba(10, 10, 11, 0.85) 0%, rgba(10, 10, 11, 0) 100%);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  pointer-events: none;
}
.nav > * { pointer-events: auto; }

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.nav__brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 0 0 1px var(--line-strong);
}

.nav__links {
  display: flex;
  gap: 28px;
  justify-self: center;
  font-size: 14px;
  color: var(--fg-dim);
}
.nav__links a {
  position: relative;
  transition: color 200ms var(--ease);
}
.nav__links a:hover { color: var(--fg); }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--blue-1);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); }

.nav__cta {
  justify-self: end;
  padding: 10px 18px;
  font-size: 14px;
}

@media (max-width: 880px) {
  .nav__links { display: none; }
  .nav { grid-template-columns: 1fr auto; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  padding: 140px var(--gutter) 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: -10%;
  right: -20%;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(circle at center, var(--blue-glow) 0%, var(--blue-glow-soft) 28%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  animation: heroBreathe 9s ease-in-out infinite alternate;
}
@keyframes heroBreathe {
  0%   { transform: scale(1) translate(0, 0); opacity: 1; }
  100% { transform: scale(1.08) translate(-2%, 2%); opacity: 0.78; }
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(56px, 9.5vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--fg);
}
.hero__title .line {
  display: block;
  opacity: 0;
  transform: translateY(28px);
  animation: heroLineIn 1100ms var(--ease) forwards;
}
.hero__title .line:nth-child(1) { animation-delay: 80ms; }
.hero__title .line:nth-child(2) { animation-delay: 240ms; }
.hero__title .line:nth-child(3) { animation-delay: 400ms; }
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--blue-1);
}
@keyframes heroLineIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero__sub {
  max-width: 32ch;
  margin: 36px 0 0 0;
  font-size: clamp(17px, 1.45vw, 22px);
  line-height: 1.45;
  color: var(--fg-dim);
  opacity: 0;
  animation: heroLineIn 900ms var(--ease) 600ms forwards;
}

.hero__cta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 44px;
  opacity: 0;
  animation: heroLineIn 900ms var(--ease) 780ms forwards;
}

/* Hero device — a stylized phone showing the Call Failed UI we just built */
.hero__device {
  position: relative;
  justify-self: end;
  width: clamp(280px, 32vw, 380px);
  opacity: 0;
  transform: translateY(40px);
  animation: heroLineIn 1200ms var(--ease) 500ms forwards;
}

.hero__device-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 50% 30%, var(--blue-glow) 0%, transparent 60%);
  filter: blur(50px);
  z-index: 0;
}

.hero__device-frame {
  position: relative;
  aspect-ratio: 9 / 19.5;
  background: #050507;
  border-radius: 48px;
  padding: 12px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 50px 100px -30px rgba(0, 0, 0, 0.8),
    0 0 80px -20px var(--blue-glow);
}

.hero__device-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  /* Inner-screen radius — picks up the iPhone "screen corner" curve
     just inside the device bezel (frame radius 48px, 12px padding). */
  border-radius: 36px;
  background: #000;
}

.hero__status {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.95;
}
.hero__status-right {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hero__status-right .bar {
  width: 2.5px;
  background: currentColor;
  border-radius: 1px;
}
.hero__status-right .bar:nth-child(1) { height: 4px; }
.hero__status-right .bar:nth-child(2) { height: 6px; }
.hero__status-right .bar:nth-child(3) { height: 8px; }

.hero__call {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  height: 100%;
  align-items: center;
  text-align: center;
}
.hero__call-label {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.85;
}
.hero__call-name {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 42px;
  letter-spacing: -0.02em;
  margin-top: 4px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.hero__call-spacer { flex: 1; }
.hero__call-buttons {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 0 6px;
}
.hero__call-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.hero__call-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
}
.hero__call-circle--cancel {
  background: rgba(255,255,255,0.32);
  backdrop-filter: blur(8px);
}
.hero__call-circle--callback {
  background: #2EC74A;
  box-shadow: 0 6px 20px -6px rgba(46, 199, 74, 0.6);
}
.hero__call-text {
  font-size: 11px;
  font-weight: 500;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.4); }
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  display: grid;
  place-items: center;
}
.hero__scroll span {
  width: 2px;
  height: 8px;
  background: var(--fg);
  border-radius: 1px;
  animation: scrollHint 1.8s ease-in-out infinite;
}
@keyframes scrollHint {
  0% { transform: translateY(-6px); opacity: 0; }
  35% { opacity: 1; }
  100% { transform: translateY(6px); opacity: 0; }
}

@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; gap: 60px; }
  .hero__device { justify-self: center; }
}
@media (max-width: 640px) {
  .hero { padding-top: 110px; }
}

/* ==========================================================================
   Sections (shared rhythm)
   ========================================================================== */

section {
  position: relative;
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   Capabilities strip
   ========================================================================== */

.caps { background: var(--bg-soft); }
.caps__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.caps__grid li {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 26px;
  background: var(--bg-soft);
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  min-height: 140px;
  transition: background 300ms var(--ease);
}
.caps__grid li:hover { background: var(--surface); }
.caps__grid li em {
  font-style: italic;
  font-weight: 400;
  color: var(--blue-1);
}
.caps__sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--fg-dim);
}
@media (max-width: 880px) {
  .caps__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .caps__grid { grid-template-columns: 1fr; }
}

/* "A taste of what you can program" — concrete beat-type chip grid */
.caps__inv-label {
  margin: 64px 0 20px 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-faint);
}
.caps__inventory {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.caps__inventory li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--fg-dim);
  font-size: 13.5px;
  letter-spacing: -0.005em;
  transition: border-color 240ms var(--ease), background 240ms var(--ease), color 240ms var(--ease);
}
.caps__inventory li:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  color: var(--fg);
}
.caps__inventory li:hover svg { color: var(--blue-1); }
.caps__inventory svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--blue-1);
  transition: color 240ms var(--ease);
}
.caps__inv-foot {
  margin: 28px 0 0 0;
  color: var(--fg-faint);
  font-size: 13.5px;
  font-style: italic;
}
@media (max-width: 1080px) {
  .caps__inventory { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
  .caps__inventory { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .caps__inventory { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Productions
   ========================================================================== */

.productions {
  text-align: center;
  background: var(--bg-soft);
  overflow: hidden;
}
.productions .eyebrow { margin-bottom: 56px; }
.productions__marquee {
  position: relative;
  overflow: hidden;
  margin: 0 calc(-1 * var(--gutter));
  padding: 12px 0;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.productions__track {
  display: inline-flex;
  align-items: center;
  gap: 60px;
  white-space: nowrap;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 6vw, 80px);
  letter-spacing: -0.02em;
  color: var(--fg);
  animation: marquee 32s linear infinite;
}
.productions__sep {
  color: var(--blue-1);
  font-style: normal;
  font-size: 0.4em;
  font-weight: 400;
  font-family: var(--font-body);
  opacity: 0.85;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.productions__note {
  margin-top: 36px;
  color: var(--fg-dim);
  font-size: 15px;
}
@media (prefers-reduced-motion: reduce) {
  .productions__track { animation: none; }
}

/* ==========================================================================
   Footer CTA
   ========================================================================== */

.cta {
  position: relative;
  padding: var(--section-pad) 0;
  border-top: 1px solid var(--line);
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  bottom: -40%;
  left: 50%;
  width: 120vw;
  height: 80vw;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--blue-glow) 0%, transparent 55%);
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.55;
}
.cta__inner {
  position: relative;
  text-align: center;
}
.cta__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 6.5vw, 88px);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 28px 0;
}
.cta__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--blue-1);
}
.cta__sub {
  color: var(--fg-dim);
  font-size: 18px;
  margin: 0 auto 48px;
  max-width: 50ch;
}
.cta__email {
  margin-top: 24px;
  color: var(--fg-faint);
  font-size: 14px;
}
.cta__email a {
  color: var(--fg-dim);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 1px;
}
.cta__email a:hover { color: var(--fg); }
.cta__foot {
  margin-top: 80px;
  color: var(--fg-faint);
  font-size: 12.5px;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.cta__foot-sep { margin: 0 12px; opacity: 0.4; }

/* ==========================================================================
   Reveal on scroll (IntersectionObserver target)
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}
.reveal--in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
