/* Mira — the site.

   The thesis, and the one thing everything else serves: the app is a violet night, and what it
   gives you is a pencil portrait on warm paper. So the page is dark and quiet, and the drawings
   are the only warm thing on it. Nothing else gets to be bright.

   Which means, deliberately: no gradients, no glass, no card with a 1px grey border around every
   paragraph, no accent colour on one word of the headline. The portraits carry the page. */

:root {
  /* From the app's own tokens (docs/ARCHITECTURE.md § Design system). */
  --bg: #0d051a;
  --bg-deep: #090312;
  --surface: #17102a;
  --line: #241a3c;
  --ink: #f9f9f9;
  --ink-2: #afafaf;
  --ink-3: #7e7791;
  --violet: #7139fd;
  --violet-bright: #9b6bff;

  /* The paper the drawings arrive on, taken from the artwork itself. The only warm value here. */
  --paper: #f4efe4;
  --paper-edge: #d9d0bd;

  --measure: 34rem;        /* ~65 characters of body text */
  --page: 68rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--violet-bright); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

h1, h2, h3 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); letter-spacing: -0.015em; }
h3 { font-size: 1.125rem; }

p { margin: 0 0 1.1em; }

.wrap {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- Masthead ---------------------------------------------------------- */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: "Bricolage Grotesque", "Plus Jakarta Sans", sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.wordmark img { width: 34px; height: auto; opacity: 0.95; }

.masthead nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9375rem;
}
.masthead nav a { color: var(--ink-2); text-decoration: none; }
.masthead nav a:hover { color: var(--ink); }

/* ---- Hero -------------------------------------------------------------- */

.hero { padding-block: clamp(2.5rem, 8vw, 5.5rem) clamp(2rem, 6vw, 4rem); }
.hero p.lede {
  max-width: var(--measure);
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  margin-top: 1.25rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--violet);
  color: #fff;
  font-family: "Bricolage Grotesque", "Plus Jakarta Sans", sans-serif;
  font-weight: 500;
  text-decoration: none;
}
.cta:hover { background: var(--violet-bright); color: #fff; }
.cta[aria-disabled="true"] {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
  cursor: default;
}

/* ---- The drawings: the warm things ------------------------------------- */

/* A drawing is shown as what it is — a sheet of paper. The frame is the paper, not a UI card:
   no radius to speak of, no shadow pretending to be elevation, just the edge of the sheet. */
.sheet {
  background: var(--paper);
  padding: 0.75rem;
  border-radius: 2px;
  box-shadow: 0 1px 0 var(--paper-edge), 0 18px 40px -24px rgb(0 0 0 / 0.9);
}
.sheet img { width: 100%; height: auto; }

.hero-sheet { max-width: 23rem; margin-top: clamp(2rem, 5vw, 3rem); }

/* Past this width the headline and the drawing share the fold, and the drawing is the larger of
   the two — the page is about what it hands you, not about the sentence describing it. */
@media (min-width: 56rem) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: clamp(2.5rem, 6vw, 5rem);
    align-items: center;
  }
  .hero > h1, .hero > p.lede, .hero > .cta { grid-column: 1; }
  /* A grid item stretches; inline-flex does not survive that on its own. */
  .hero > .cta { justify-self: start; }
  .hero > h1 { align-self: end; }
  .hero-sheet {
    grid-column: 2;
    grid-row: 1 / span 3;
    max-width: none;
    margin-top: 0;
    align-self: center;
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: clamp(1.25rem, 3vw, 2.25rem);
  margin-top: 2.5rem;
  align-items: start;
}
.gallery figure { margin: 0; }
.gallery figcaption { margin-top: 0.9rem; }
.gallery figcaption strong { color: var(--ink); display: block; font-weight: 600; }
.gallery figcaption span { font-size: 0.9375rem; color: var(--ink-3); }

/* ---- Sections ---------------------------------------------------------- */

section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
section + section { border-top: 1px solid var(--line); }
section > p, section > ol, section > ul { max-width: var(--measure); }
section > h2 + p { margin-top: 1.1rem; }

/* The steps are prose, not a row of numbered tiles: three things in an order, which is what an
   ordered list already is. */
.steps {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  max-width: var(--measure);
}
.steps li {
  counter-increment: step;
  padding-left: 2.5rem;
  position: relative;
  margin-bottom: 1.5rem;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  font-size: 0.9375rem;
}
.steps strong { color: var(--ink); font-weight: 600; }

/* ---- Legal pages ------------------------------------------------------- */

.doc { padding-block: 2rem 4rem; }
.doc > * { max-width: var(--measure); }
.doc h1 { font-size: clamp(1.875rem, 4.5vw, 2.5rem); }
.doc h3 {
  margin-top: 2.25rem;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.doc .updated { color: var(--ink-3); font-size: 0.9375rem; margin-bottom: 2rem; }
.doc ul, .doc ol { padding-left: 1.25rem; }
.doc li { margin-bottom: 0.5rem; }
.doc strong { color: var(--ink); font-weight: 600; }

/* ---- Contact ----------------------------------------------------------- */

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 2rem;
}
.contact p { margin: 0; font-size: 1.0625rem; }
.contact a { color: var(--ink); text-decoration-color: var(--violet-bright); }
.contact button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 0.875rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
}
.contact button:hover { color: var(--ink); border-color: var(--violet); }

/* ---- Footer ------------------------------------------------------------ */

footer {
  border-top: 1px solid var(--line);
  background: var(--bg-deep);
  padding-block: 2.5rem 3.5rem;
  font-size: 0.9375rem;
  color: var(--ink-3);
}
footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 1rem; }
footer nav a { color: var(--ink-2); text-decoration: none; }
footer nav a:hover { color: var(--ink); }
footer p { margin: 0 0 0.5em; }

.disclaimer { color: var(--ink-3); }

@media (prefers-reduced-motion: no-preference) {
  a, .cta { transition: color 120ms ease, background-color 120ms ease; }
}
