/* ============================================================================
   ideagram studio — design system
   ============================================================================

   The STUDIO's own visual language. Deliberately not Spora's.

   Spora's system (living in each of its pages) is a night garden: blue-black,
   teal glow, whispered lowercase type, everything soft-edged. That's the
   product's voice, and it should stay the product's alone. A studio that also
   makes film and sound for other brands needs a shell that doesn't look like
   one of its own products wearing a different hat.

   So this one is the opposite temperament: warm near-black, paper-white type,
   one loud accent, hard edges, big display type, generous space. Editorial
   rather than atmospheric.

   Only `index.html` (and future studio pages) should link this. Anything under
   /spora keeps Spora's own styling.

   Contents
     1. Tokens
     2. Reset & base
     3. Typography
     4. Layout
     5. Components
     6. Motion
   ========================================================================= */


/* 1. Tokens ---------------------------------------------------------------- */

:root {
  /* Colour. Warm near-black, not blue-black — that alone reads differently
     from Spora at a glance. */
  --ink:        #0a0a0b;
  --ink-raised: #131315;
  --ink-line:   rgba(239, 237, 232, 0.11);

  --paper:      #efede8;
  --paper-dim:  #9a978f;
  --paper-faint:#615f5a;

  /* One accent, used sparingly: links, the live marker, hover states. */
  --accent:     #ff5c2b;
  --accent-dim: rgba(255, 92, 43, 0.14);

  /* Type. Space Grotesk carries the wordmark and every display line; body
     copy stays on the system stack so pages render instantly and text at
     reading size keeps its neutrality. */
  --font-display: "Space Grotesk", "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, sans-serif;

  /* A fluid scale: these pages are mostly display type, so sizes track the
     viewport instead of stepping at breakpoints. */
  --t-hero:  clamp(3.4rem, 14vw, 9.5rem);
  --t-xl:    clamp(1.9rem, 5.2vw, 3.2rem);
  --t-lg:    clamp(1.25rem, 2.6vw, 1.65rem);
  --t-body:  1.0625rem;
  --t-sm:    0.875rem;
  --t-micro: 0.6875rem;

  --space-section: clamp(5rem, 12vw, 9rem);
  --radius: 4px;                 /* hard edges: a hint of one, not a pill */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}


/* 2. Reset & base ---------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* A faint warm vignette from the top — enough to keep a large black page
     from reading as an unstyled void. */
  background-image: radial-gradient(ellipse 120% 60% at 50% -10%,
                    rgba(255, 92, 43, 0.07), transparent 70%);
  background-repeat: no-repeat;
}

::selection { background: var(--accent); color: var(--ink); }

a { color: inherit; }

img { max-width: 100%; display: block; }


/* 3. Typography ------------------------------------------------------------ */

.display { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.03em; }

/* The wordmark. Tight tracking and a hard optical size — it should feel set,
   not typed. */
.wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--t-hero);
  line-height: 0.86;
  letter-spacing: -0.045em;
  margin: 0;
}
.wordmark em {
  font-style: normal;
  display: block;
  font-size: 0.26em;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin-top: 0.7em;
  padding-left: 0.24em;   /* optical: tracking pushes the block right */
}

h2.statement {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--t-xl);
  line-height: 1.16;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 20ch;
}

.eyebrow {
  font-size: var(--t-micro);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--paper-faint);
  font-weight: 600;
  margin: 0 0 2.2rem;
}

.lead { font-size: var(--t-lg); line-height: 1.45; color: var(--paper); max-width: 34ch; margin: 0; }
.muted { color: var(--paper-dim); }
.small { font-size: var(--t-sm); }


/* 4. Layout ---------------------------------------------------------------- */

/* `padding-inline`, never the `padding` shorthand: a `.wrap` is often also a
   `<section>`, and the shorthand would zero out that section's vertical
   padding (a class beats an element selector), collapsing the page's rhythm. */
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: clamp(1.25rem, 5vw, 3.5rem); }

section { padding-block: var(--space-section); }

.rule { height: 1px; background: var(--ink-line); border: 0; margin: 0; }

/* Two columns on wide screens: a sticky label beside its content — the
   editorial move that keeps long pages oriented without a nav bar. */
.split { display: grid; gap: 2.5rem; }
@media (min-width: 860px) {
  .split { grid-template-columns: 190px 1fr; gap: 4rem; }
  .split > .eyebrow { position: sticky; top: 2.5rem; align-self: start; margin: 0; }
}

.stack-lg > * + * { margin-top: 3.5rem; }
.stack   > * + * { margin-top: 1rem; }


/* 5. Components ------------------------------------------------------------ */

/* 5.1 Language switch — squared off, unlike Spora's pill. */
.lang {
  position: fixed; top: 1rem; right: 1rem; z-index: 30;
  display: flex; gap: 1px; background: var(--ink-line);
  border: 1px solid var(--ink-line); border-radius: var(--radius);
  backdrop-filter: blur(10px);
}
.lang button {
  border: 0; background: rgba(10,10,11,0.8); color: var(--paper-faint);
  font-family: var(--font-body); font-size: var(--t-micro); font-weight: 700;
  letter-spacing: 0.12em; padding: 0.5rem 0.7rem; cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.lang button:hover { color: var(--paper); }
.lang button.active { background: var(--paper); color: var(--ink); }

/* 5.2 Live badge — the "being rebuilt" marker, with a pulsing dot. */
.badge {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: var(--t-micro); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--paper-dim); font-weight: 600;
  border: 1px solid var(--ink-line); border-radius: 999px;
  padding: 0.45rem 0.9rem 0.45rem 0.75rem;
  background: var(--accent-dim);
}
.badge i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: pulse 2.4s var(--ease) infinite;
}

/* 5.3 Numbered practice block. */
.practice { border-top: 1px solid var(--ink-line); padding-top: 1.6rem; }
.practice .num {
  font-family: var(--font-display); font-size: var(--t-sm); color: var(--accent);
  letter-spacing: 0.06em; display: block; margin-bottom: 1.1rem;
}
.practice h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.35rem, 3vw, 1.9rem); letter-spacing: -0.02em;
  margin: 0 0 0.7rem; line-height: 1.2;
}
.practice p { margin: 0; color: var(--paper-dim); max-width: 40ch; }

/* 5.4 Client marquee — a long list read as one gesture instead of a table.
   The track is duplicated in the markup and translated by exactly -50%, so
   the loop is seamless whatever the content width. */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--ink-line);
  padding-block: 1.5rem;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex; width: max-content;
  animation: slide 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.4rem, 3.6vw, 2.4rem); letter-spacing: -0.02em;
  color: var(--paper-dim); white-space: nowrap;
  padding-inline: clamp(1rem, 3vw, 2.2rem);
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.2rem);
}
.marquee__item::after {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--paper-faint); flex: none;
}
.marquee__item.is-own { color: var(--accent); }

/* 5.5 Feature link — the Spora card. Hover lifts the arrow, not the box. */
.feature {
  display: block; text-decoration: none;
  border: 1px solid var(--ink-line); border-radius: var(--radius);
  background: var(--ink-raised);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.feature:hover { border-color: rgba(255,92,43,0.45); background: #17161a; }
.feature h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.6rem, 4vw, 2.3rem); letter-spacing: -0.025em;
  margin: 0 0 0.6rem;
}
.feature p { margin: 0; color: var(--paper-dim); max-width: 46ch; }
.feature .go {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 1.4rem; color: var(--accent); font-size: var(--t-sm);
  font-weight: 600; letter-spacing: 0.02em;
}
.feature .go span { transition: transform 0.3s var(--ease); }
.feature:hover .go span { transform: translateX(5px); }

/* 5.6 Big contact link. */
.contact-link {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.5rem, 5.5vw, 3.1rem); letter-spacing: -0.03em;
  text-decoration: none; color: var(--paper);
  display: inline-block; line-height: 1.1;
  border-bottom: 2px solid transparent;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
  overflow-wrap: anywhere;   /* a long address must never overflow a phone */
}
.contact-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* 5.7 Footer. */
footer.site {
  border-top: 1px solid var(--ink-line);
  padding-block: 2.2rem 3.5rem;
  color: var(--paper-faint); font-size: var(--t-sm);
}
footer.site a { color: var(--paper-dim); text-decoration: none; transition: color 0.2s var(--ease); }
footer.site a:hover { color: var(--accent); }
footer.site .row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }


/* 5.8 Product pages ---------------------------------------------------------
   Used by /spora — a studio product presented in the studio's voice, while its
   documentation (manual, privacy policy) keeps the product's own styling.

   Every screenshot in the library is 248×540, so these frames deliberately cap
   below that: blown up past their native size the app's fine type turns to
   mush, and a soft screenshot reads as a sloppy product. Small and crisp beats
   big and smeared. */

.phone {
  width: 100%;
  max-width: 232px;
  border-radius: 26px;
  border: 1px solid rgba(239,237,232,0.16);
  overflow: hidden;
  background: #05070c;                     /* matches the app's own backdrop */
  box-shadow: 0 24px 60px -24px rgba(0,0,0,0.9),
              0 0 0 1px rgba(0,0,0,0.6);
  flex: none;
}
.phone img { width: 100%; height: auto; display: block; }

/* Hero trio: the middle screen faces you, the outer two lean away. Overlapping
   them keeps the group compact enough that each stays at native size. */
.phone-fan {
  display: flex; align-items: center; justify-content: center;
  perspective: 1200px;
}
.phone-fan .phone { transition: transform 0.5s var(--ease); }
.phone-fan .phone:nth-child(1) { transform: rotate(-7deg) translateX(30%) scale(0.9); opacity: 0.72; z-index: 1; }
.phone-fan .phone:nth-child(2) { z-index: 3; }
.phone-fan .phone:nth-child(3) { transform: rotate(7deg) translateX(-30%) scale(0.9); opacity: 0.72; z-index: 1; }
.phone-fan:hover .phone:nth-child(1) { transform: rotate(-9deg) translateX(22%) scale(0.92); opacity: 0.85; }
.phone-fan:hover .phone:nth-child(3) { transform: rotate(9deg) translateX(-22%) scale(0.92); opacity: 0.85; }
/* On a narrow screen the fan becomes one screen: three overlapping phones at
   360px wide is a smudge, not a hero. */
@media (max-width: 620px) {
  .phone-fan .phone:nth-child(1),
  .phone-fan .phone:nth-child(3) { display: none; }
}

/* Alternating text/screenshot rows. */
.feature-row { display: grid; gap: 2.5rem; align-items: center; justify-items: center; }
.feature-row .copy { max-width: 42ch; }
.feature-row h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: -0.025em;
  margin: 0 0 0.8rem; line-height: 1.15;
}
.feature-row p { margin: 0; color: var(--paper-dim); }
.feature-row .kicker {
  font-family: var(--font-display); font-size: var(--t-sm); color: var(--accent);
  display: block; margin-bottom: 0.9rem; letter-spacing: 0.04em;
}
@media (min-width: 780px) {
  .feature-row { grid-template-columns: 1fr auto; gap: 4.5rem; justify-items: start; }
  .feature-row.reverse { grid-template-columns: auto 1fr; }
  .feature-row.reverse .copy { order: 2; }
  .feature-row.reverse .phone { order: 1; }
}

/* Horizontal gallery. Scroll-snap rather than a JS carousel: it keeps native
   momentum and keyboard scrolling, and there's no state to get out of sync. */
.gallery {
  display: flex; gap: 1.1rem;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-block: 0.5rem 1.6rem;
  padding-inline: clamp(1.25rem, 5vw, 3.5rem);
  scrollbar-width: none; -ms-overflow-style: none;
  scroll-padding-inline: clamp(1.25rem, 5vw, 3.5rem);
}
.gallery::-webkit-scrollbar { display: none; }
.gallery figure { margin: 0; scroll-snap-align: start; flex: none; width: 232px; }
.gallery figcaption {
  margin-top: 0.85rem; font-size: var(--t-sm); color: var(--paper-dim);
  line-height: 1.4;
}
.gallery figcaption b { display: block; color: var(--paper); font-weight: 600; }

/* Spec strip: the short factual answers, where a landing page usually buries
   them in prose. */
.specs {
  display: grid; gap: 1px; margin: 0; padding: 0; list-style: none;
  /* Fixed counts, not auto-fit. The 1px gaps are drawn by the container's own
     background showing through, so any leftover cell in a half-filled row
     shows up as a grey block. Column counts that divide the item count evenly
     are what keep the strip solid. */
  grid-template-columns: repeat(2, 1fr);
  background: var(--ink-line); border: 1px solid var(--ink-line);
  border-radius: var(--radius); overflow: hidden;
}
@media (min-width: 700px) { .specs { grid-template-columns: repeat(3, 1fr); } }
.specs li { background: var(--ink); padding: 1.15rem 1.25rem; }
.specs b {
  display: block; font-family: var(--font-display); font-weight: 500;
  font-size: 1.15rem; letter-spacing: -0.01em; margin-bottom: 0.2rem;
}
.specs span { font-size: var(--t-sm); color: var(--paper-dim); }

/* Small tile — used for the documentation links. */
.tiles { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile {
  display: block; text-decoration: none;
  border: 1px solid var(--ink-line); border-radius: var(--radius);
  background: var(--ink-raised); padding: 1.5rem;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.tile:hover { border-color: rgba(255,92,43,0.45); background: #17161a; }
.tile b { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; display: block; margin-bottom: 0.35rem; }
.tile span { color: var(--paper-dim); font-size: var(--t-sm); }


/* 6. Motion ---------------------------------------------------------------- */

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

@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Rise-in on scroll. The class is added by JS only when IntersectionObserver
   exists, so with JS off or unsupported the content is simply already there. */
.reveal { opacity: 0; transform: translateY(18px); }
.js-reveal .reveal { transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge i, .marquee__track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
