/* heyisoft — root site stylesheet
 * Scoped to the studio landing page only.
 * Each app under /<app>/* ships its own /<app>/assets/style.css.
 * Aesthetic direction: editorial dark studio — warm near-black canvas,
 * cream type, muted gold accent. Deliberately distinct from any
 * single product's design language.
 */

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ─── Tokens ─── */
:root {
  --ink: #F5F1EA;
  --ink-muted: rgba(245, 241, 234, 0.66);
  --ink-faint: rgba(245, 241, 234, 0.42);
  --paper: #0E0C0A;
  --paper-soft: #161310;
  --paper-tint: #1E1A15;
  --rule: rgba(245, 241, 234, 0.12);
  --rule-soft: rgba(245, 241, 234, 0.06);
  --gold: #E5BC52;
  --gold-soft: rgba(229, 188, 82, 0.14);
  --gold-deep: #C99F39;

  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body: 'Inter Tight', ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;

  --max-prose: 720px;
  --max-wide: 1100px;
}

/* ─── Base ─── */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(229, 188, 82, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 110%, rgba(229, 188, 82, 0.05), transparent 70%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: var(--paper); }

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

/* ─── Typography ─── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.03em; color: var(--ink); }
h1 { font-size: clamp(3.5rem, 8vw, 6.5rem); line-height: 0.94; font-variation-settings: "opsz" 144, "SOFT" 0; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.05; margin-bottom: 1rem; font-variation-settings: "opsz" 72; }
h3 { font-size: 1.5rem; line-height: 1.1; margin-bottom: 0.75rem; font-variation-settings: "opsz" 48; }

p { color: var(--ink-muted); margin-bottom: 1rem; }
p strong { color: var(--ink); font-weight: 500; }

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: var(--ink-faint); transition: text-decoration-color 0.2s ease, color 0.2s ease; }
a:hover { text-decoration-color: var(--gold); color: var(--gold); }

/* ─── Layout ─── */
.container { width: 100%; padding: 0 clamp(1.25rem, 5vw, 3rem); margin: 0 auto; position: relative; z-index: 2; }
.container.prose { max-width: var(--max-prose); }
.container.wide  { max-width: var(--max-wide); }

main { flex: 1 0 auto; padding: 3rem 0 6rem; position: relative; z-index: 2; }

/* ─── Header ─── */
.site-header {
  border-bottom: 1px solid var(--rule-soft);
  padding: 1.5rem 0;
  position: relative;
  z-index: 5;
}
.site-header .container {
  max-width: var(--max-wide);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
}
.brand {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -0.025em;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-variation-settings: "opsz" 48;
}
.brand:hover { color: var(--gold); text-decoration: none; }
.brand .ampersand { color: var(--gold); font-style: italic; font-weight: 400; }

.site-nav {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-faint);
}
.site-nav .marker { color: var(--gold); }

/* ─── Hero ─── */
.hero {
  padding: clamp(3rem, 10vw, 8rem) 0 clamp(3rem, 8vw, 6rem);
  position: relative;
}
.hero .kicker {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.hero .kicker::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--gold);
}
.hero h1 {
  margin-bottom: 2rem;
  max-width: 16ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.hero .lede {
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 52ch;
  margin-bottom: 0;
}

/* ─── Manifesto strip ─── */
.manifesto {
  margin: clamp(4rem, 9vw, 7rem) 0;
  padding: clamp(2rem, 5vw, 4rem) 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}
.manifesto .row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: baseline;
}
.manifesto .label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 0.4rem;
}
.manifesto p {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.4vw, 1.875rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  font-variation-settings: "opsz" 72;
}
.manifesto p em { font-style: italic; color: var(--gold); }

/* ─── App index ─── */
.app-index {
  margin-top: clamp(4rem, 10vw, 8rem);
}
.app-index .section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0;
}
.app-index .section-label .left {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.app-index .section-label .count {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold);
  font-size: 1rem;
  font-variation-settings: "opsz" 24, "SOFT" 100;
}

.app-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: end;
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none !important;
  transition: padding-left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}
.app-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.app-row:hover { padding-left: clamp(1rem, 3vw, 2rem); text-decoration: none; }
.app-row:hover::before { width: clamp(0.75rem, 2.5vw, 1.5rem); }

.app-row .meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.app-row .meta .tag {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.app-row .meta .name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--ink);
  font-variation-settings: "opsz" 144;
}
.app-row:hover .meta .name { color: var(--gold); }
.app-row .meta .desc {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink-muted);
  max-width: 52ch;
  margin-top: 0.5rem;
  line-height: 1.5;
}

.app-row .arrow {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3rem);
  color: var(--ink-faint);
  font-style: italic;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s ease;
  padding-bottom: 0.5rem;
  font-variation-settings: "opsz" 72, "SOFT" 100;
}
.app-row:hover .arrow {
  color: var(--gold);
  transform: translateX(0.5rem);
}

/* ─── Footer ─── */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--rule-soft);
  padding: 2rem 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: var(--ink-faint);
  position: relative;
  z-index: 2;
}
.site-footer .container {
  max-width: var(--max-wide);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-footer a { color: var(--ink-muted); }
.site-footer a:hover { color: var(--gold); }

/* ─── Motion ─── */
@keyframes liftIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero { animation: liftIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both; }
.manifesto { animation: liftIn 0.65s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both; }
.app-index { animation: liftIn 0.65s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both; }

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

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .manifesto .row { grid-template-columns: 1fr; gap: 0.5rem; }
  .app-row { grid-template-columns: 1fr; gap: 1rem; align-items: flex-start; }
  .app-row .arrow { display: none; }
  .site-nav { font-size: 0.7rem; letter-spacing: 0.12em; }
}
