/* Emotional Machines — one page.
   The banner illustration is a fixed 3:2 "stage"; everything is positioned
   relative to it so the composition is identical at every viewport size. */

:root {
  --bg: #141414;            /* sampled from the illustration edges */
  --text: #d4c8b0;
  --dim: #8f8672;
  --heading: #f0e0c0;
  --gold: #d4a04a;
  --orange: #e85d4a;
  --font: "Averia Libre", "Quicksand", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: var(--font);
  /* slightly uneven corners, like a shape cut by hand */
  --hand: 14px 18px 12px 20px / 18px 12px 20px 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; background: var(--bg); }

body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  background: var(--bg); color: var(--text);
  font-family: var(--font); line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  display: grid; place-items: center;
  overflow-x: hidden;
}
/* fine grain over everything so type and illustration share one surface */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 10; pointer-events: none;
  opacity: 0.16; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23g)'/></svg>");
  background-size: 240px 240px;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }

/* ---- Stage ---- */
.stage {
  position: relative;
  width: min(100vw, 150vh);
  width: min(100vw, 150svh);
  aspect-ratio: 3 / 2;
  container-type: inline-size;
}
/* square painterly illustration, placed so the soldier sits in the left third
   and looks toward the wordmark; edges dissolve into the page */
.art {
  position: absolute; display: block;
  top: 6%; left: -6%; height: 88%; width: auto; aspect-ratio: 1;
  object-fit: contain;
  -webkit-mask-image: radial-gradient(circle, #000 42%, transparent 70%);
  mask-image: radial-gradient(circle, #000 42%, transparent 70%);
}

/* ---- Copy ---- */
.copy {
  position: absolute; z-index: 1;
  left: 45%; top: 27%; width: 47%;
}

.wordmark {
  margin: 0; color: var(--heading); font-family: var(--font-brand);
  font-size: 7cqw; line-height: 1; letter-spacing: -0.01em;
}
.wordmark .em { font-weight: 700; display: block; }
.wordmark .ma { font-weight: 300; color: var(--gold); display: block; letter-spacing: 0.03em; }

.tagline {
  margin: 2.2cqw 0 0; max-width: 34ch; text-wrap: pretty;
  font-size: max(15px, 1.55cqw); font-weight: 400; line-height: 1.5; color: var(--text);
}

.tagline strong { font-weight: 700; color: var(--heading); }

/* primary actions: painted shapes. The fill lives on a pseudo-element so the
   rough-edge filter never blurs the label. */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1cqw; margin-top: 2.8cqw; }
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.7em 1.35em;
  font-size: max(14px, 1.15cqw); font-weight: 700; letter-spacing: 0.01em; white-space: nowrap;
  transition: transform .18s ease, color .18s ease;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  border-radius: var(--hand);
  filter: url(#rough);
  transition: opacity .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn svg { width: 1.15em; height: 1.15em; fill: currentColor; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-fill { color: #2a100b; }
.btn-fill::before {
  background:
    radial-gradient(120% 140% at 20% 0%, rgba(255, 190, 120, 0.45), transparent 55%),
    linear-gradient(160deg, #ef6a55, #d9503d 70%, #c8452f);
  box-shadow: 0 10px 28px -12px rgba(232, 93, 74, 0.75), inset 0 0 0 1px rgba(255, 160, 120, 0.25);
}
.btn-fill:hover::before { box-shadow: 0 14px 32px -12px rgba(232, 93, 74, 0.95), inset 0 0 0 1px rgba(255, 190, 150, 0.4); }

.btn-line { color: var(--gold); }
.btn-line::before {
  background: radial-gradient(120% 140% at 30% 0%, rgba(212, 160, 74, 0.16), rgba(212, 160, 74, 0.04) 60%);
  box-shadow: inset 0 0 0 1.5px rgba(212, 160, 74, 0.75);
}
.btn-line:hover { color: var(--heading); }
.btn-line:hover::before { box-shadow: inset 0 0 0 1.5px var(--gold), 0 8px 24px -14px rgba(212, 160, 74, 0.6); background: rgba(212, 160, 74, 0.14); }

/* quiet links: no separators, each word placed by hand with its own tilt,
   and an ink underline that soaks in on hover rather than sliding across */
.quiet {
  list-style: none; margin: 2.6cqw 0 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5em 1.6em;
  font-size: max(13px, 1.05cqw); font-weight: 400; color: var(--dim);
}
.quiet a {
  position: relative; display: inline-block;
  color: var(--text); opacity: 0.8; transition: opacity .2s ease, color .2s ease;
}
.quiet a::after {
  content: ""; position: absolute; left: -3%; right: -3%; bottom: -0.32em; height: 0.42em;
  background: var(--ink) no-repeat center / 100% 100%;
  opacity: 0; transform: translateY(2px);
  transition: opacity .28s ease, transform .28s ease;
}
.quiet a:hover { opacity: 1; color: var(--heading); }
.quiet a:hover::after { opacity: 0.9; transform: none; }

/* three different strokes, rotated through the list */
.quiet li:nth-child(3n+1) a { --ink: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'><path d='M2 5 C 18 2.5, 34 6.5, 50 4.5 S 80 2.5, 98 4' fill='none' stroke='%23d4a04a' stroke-width='2.2' stroke-linecap='round'/></svg>"); }
.quiet li:nth-child(3n+2) a { --ink: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'><path d='M3 3.5 C 22 6, 40 2.5, 58 5 S 86 3, 97 5.5' fill='none' stroke='%23d4a04a' stroke-width='2' stroke-linecap='round'/></svg>"); }
.quiet li:nth-child(3n) a   { --ink: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'><path d='M2 4.5 C 15 6.5, 30 2, 48 3.5 S 70 6.5, 98 3' fill='none' stroke='%23d4a04a' stroke-width='2.4' stroke-linecap='round'/></svg>"); }

/* hand placement: small individual tilts, offsets and uneven gaps */
.quiet li:nth-child(1) a { transform: rotate(-1deg) translateY(0.5px); }
.quiet li:nth-child(2) a { transform: rotate(0.7deg) translateY(-1px); }
.quiet li:nth-child(3) a { transform: rotate(-0.5deg) translateY(1px); }
.quiet li:nth-child(4) a { transform: rotate(0.9deg) translateY(0); }
.quiet li:nth-child(5) a { transform: rotate(-0.8deg) translateY(-0.5px); }
.quiet li:nth-child(2) { margin-left: 0.15em; }
.quiet li:nth-child(4) { margin-left: -0.25em; }
.quiet li:nth-child(5) { margin-left: 0.3em; }

/* entrance */
@media (prefers-reduced-motion: no-preference) {
  .art { animation: fade 1.2s ease both; }
  .copy > * { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .copy > :nth-child(1) { animation-delay: .25s; }
  .copy > :nth-child(2) { animation-delay: .4s; }
  .copy > :nth-child(3) { animation-delay: .55s; }
  .copy > :nth-child(4) { animation-delay: .7s; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- Small screens: stacked, centered ---- */
@media (max-width: 760px) {
  body { display: block; }
  .stage { width: auto; aspect-ratio: auto; padding: 2.5rem 1.5rem 3.5rem; container-type: normal; }
  .art { position: static; width: min(240px, 58vw); height: auto; margin: 0 auto 1.5rem; }
  .copy { position: static; width: auto; text-align: center; }
  .wordmark { font-size: clamp(2.6rem, 12.5vw, 3.4rem); }
  .tagline { font-size: 1.05rem; margin: 1.1rem auto 0; max-width: 30ch; }
  .actions { flex-direction: column; align-items: center; gap: 0.7rem; margin-top: 1.8rem; }
  .btn { font-size: 0.95rem; width: min(100%, 300px); justify-content: center; }
  .quiet { justify-content: center; font-size: 0.9rem; margin-top: 2rem; gap: 0.7em 1.4em; max-width: 300px; margin-inline: auto; }
}
