/* ---------------------------------------------------------------
   Formwork Studios — landing page
   Light, paper-like. One screen, three elements, nothing else.
   --------------------------------------------------------------- */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2122, U+2212, U+FEFF, U+FFFD;
}

:root {
  --paper:  #f2efe9;   /* warm off-white ground */
  --ink:    #141210;   /* near-black, slightly warm */
  --muted:  #6f685d;   /* secondary type */
  --rule:   rgba(20, 18, 16, 0.13);
  --grid:   rgba(20, 18, 16, 0.035);

  --space:  clamp(1.5rem, 5vw, 3rem);
  --stack:  clamp(1.75rem, 4.5vw, 2.75rem);

  --font: "Archivo", ui-sans-serif, -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background-color: var(--paper);

  /* Barely-there survey grid — a drafting sheet, not a pattern. */
  background-image:
    repeating-linear-gradient(to right,  var(--grid) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(to bottom, var(--grid) 0 1px, transparent 1px 64px);
  background-position: center center;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---- layout ---------------------------------------------------- */

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: var(--space);
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stack);
  text-align: center;
  max-width: 34rem;
}

/* ---- mark ------------------------------------------------------ */

.mark {
  display: block;
  color: var(--ink);
  line-height: 0;
  border-radius: 4px;
  transition: color 320ms var(--ease);
}

/* The icon is a CSS mask, so assets/mark.svg is the single source of truth:
   swap that one file and the logo changes everywhere, no markup edits. The
   mask takes its colour from currentColor, keeping the hover transition. */
.mark__glyph {
  display: block;
  width: clamp(64px, 13vw, 88px);
  aspect-ratio: 1 / 1;
  background-color: currentColor;
  -webkit-mask: url("/assets/mark.svg") center / contain no-repeat;
          mask: url("/assets/mark.svg") center / contain no-repeat;
}

.mark:hover,
.mark:focus-visible { color: var(--muted); }

/* ---- wordmark -------------------------------------------------- */

.wordmark {
  margin: 0;
  font-size: clamp(2rem, 7.5vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.04;
  text-wrap: balance;
}

/* ---- contact --------------------------------------------------- */

.contact {
  margin: 0;
  padding-top: calc(var(--stack) * 0.15);
  border-top: 1px solid var(--rule);
  width: min(100%, 26rem);
}

.email {
  --line: var(--rule);

  display: inline-block;
  color: var(--muted);
  font-size: clamp(0.9375rem, 2.4vw, 1.0625rem);
  font-weight: 400;
  letter-spacing: 0.045em;
  text-decoration: none;
  padding: 0.5rem 0.125rem 0.375rem;

  background-image: linear-gradient(var(--line), var(--line));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;

  transition: color 260ms var(--ease), background-size 320ms var(--ease),
              background-image 260ms var(--ease);
}

.email:hover,
.email:focus-visible {
  color: var(--ink);
  --line: currentColor;
}

/* ---- focus ----------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

/* ---- entrance -------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .card > * {
    animation: rise 760ms var(--ease) backwards;
  }
  .mark     { animation-delay:  60ms; }
  .wordmark { animation-delay: 180ms; }
  .contact  { animation-delay: 300ms; }

  @keyframes rise {
    from { opacity: 0; transform: translateY(0.75rem); }
    to   { opacity: 1; transform: none; }
  }
}
