@layer reset, base, layout, components, motion;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { color-scheme: light; }
  body, h1, p { margin: 0; }
  img { display: block; max-width: 100%; }
  button, input { font: inherit; }
}

@layer base {
  :root {
    --red: #b31a20;
    --red-dark: #841016;
    --cream: #fff8ec;
    --cream-2: #f5ead7;
    --ink: #181311;
    --muted: #665b54;
    --rule: rgba(24, 19, 17, .24);
    --display: "Avenir Next Condensed", "Arial Narrow", "Franklin Gothic Condensed", Impact, sans-serif;
    --body: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  }
  html, body { min-height: 100%; max-width: 100%; overflow-x: clip; }
  body { background: var(--red); color: var(--ink); font-family: var(--body); }
  ::selection { background: var(--ink); color: var(--cream); }
}

@layer layout {
  .window { min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(27rem, .96fr); overflow: hidden; }
  .brand-pane { position: relative; isolation: isolate; min-width: 0; min-height: 100svh; display: grid; place-items: center; padding: clamp(2rem, 4.5vw, 5.5rem); background: var(--red); overflow: hidden; }
  .notice-pane { min-width: 0; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: clamp(1.25rem, 3vw, 3.25rem); background: var(--cream); position: relative; }
  .notice-copy { align-self: center; width: min(100%, 42rem); padding: clamp(3rem, 7vh, 6.5rem) 0; }
}

@layer components {
  .grain { position: absolute; inset: 0; z-index: -1; opacity: .13; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E"); mix-blend-mode: multiply; }
  .brand-lockup { width: 88%; max-width: 48rem; filter: drop-shadow(0 1.1rem 1.6rem rgba(73, 4, 8, .19)); }
  .window-note { position: absolute; top: clamp(1.25rem, 3vw, 3.25rem); left: clamp(1.25rem, 3vw, 3.25rem); color: var(--cream); font-family: var(--display); font-size: .8rem; font-weight: 800; letter-spacing: .13em; }
  .status-stamp { position: absolute; right: clamp(1.25rem, 3vw, 3.25rem); bottom: clamp(1.25rem, 3vw, 3.25rem); width: 7.6rem; aspect-ratio: 1; display: grid; align-content: center; justify-items: center; border: 2px solid var(--cream); border-radius: 50%; color: var(--cream); font-family: var(--display); transform: rotate(-9deg); box-shadow: inset 0 0 0 5px var(--red), inset 0 0 0 7px var(--cream); }
  .status-stamp span { font-size: .68rem; letter-spacing: .19em; }
  .status-stamp strong { font-size: 1.75rem; line-height: 1; letter-spacing: .05em; }
  .masthead { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--ink); font-family: var(--display); font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
  h1 { max-width: 10ch; font-family: var(--display); font-size: clamp(4rem, 7.2vw, 7.2rem); font-stretch: condensed; font-weight: 900; letter-spacing: -.04em; line-height: .82; text-transform: uppercase; text-wrap: balance; }
  h1 span { color: var(--red); }
  .lede { margin-top: clamp(1.7rem, 3.5vh, 2.75rem); max-width: 34rem; font-size: clamp(1.3rem, 1.8vw, 1.75rem); font-weight: 650; line-height: 1.25; letter-spacing: -.02em; }
  .promise { margin-top: .75rem; max-width: 35rem; color: var(--muted); font-size: 1rem; line-height: 1.55; }
  .signup { margin-top: clamp(2rem, 4vh, 3.5rem); }
  label { display: block; margin-bottom: .55rem; font-family: var(--display); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
  .input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; border-block: 2px solid var(--ink); }
  input { min-width: 0; border: 0; border-radius: 0; padding: 1rem 0; background: transparent; color: var(--ink); outline: 0; font-size: 1rem; }
  input::placeholder { color: #74675e; opacity: 1; }
  button { min-height: 3.5rem; display: inline-flex; align-items: center; gap: 1.3rem; border: 0; border-radius: 0; padding: .85rem 1rem .85rem 1.25rem; background: var(--ink); box-shadow: inset 2px 0 var(--ink); color: var(--cream); cursor: pointer; font-family: var(--display); font-size: .86rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; transition: color 180ms ease-out, background 180ms ease-out; }
  button:hover { background: var(--red); color: white; }
  button:disabled { cursor: wait; opacity: .62; }
  input:focus-visible, button:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
  .field-wrap:has(input[aria-invalid="true"]) .input-row { border-color: var(--red); }
  .field-help { margin-top: .6rem; color: var(--muted); font-size: .78rem; }
  .form-status { min-height: 1.5em; margin-top: .75rem; color: var(--red-dark); font-weight: 700; }
  .form-status.success { color: #365a30; }
  .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
  .notice-footer { display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--ink); font-family: var(--display); font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
  .notice-footer img { width: 2.7rem; height: auto; aspect-ratio: 155 / 146; object-fit: contain; }
  .notice-footer > span { text-align: right; color: var(--muted); }
}

@layer motion {
  @media (prefers-reduced-motion: no-preference) {
    .brand-lockup { animation: settle 760ms cubic-bezier(.2,.8,.2,1) both; }
    .notice-copy > * { animation: rise 620ms cubic-bezier(.16,1,.3,1) both; }
    .notice-copy > :nth-child(2) { animation-delay: 70ms; }
    .notice-copy > :nth-child(3) { animation-delay: 120ms; }
    .notice-copy > :nth-child(4) { animation-delay: 170ms; }
    @keyframes settle { from { opacity: .01; transform: scale(.94) rotate(-2deg); filter: blur(7px); } }
    @keyframes rise { from { opacity: .01; transform: translateY(1.2rem); filter: blur(4px); } }
  }
  @media (max-width: 900px) {
    .window { grid-template-columns: 1fr; overflow: visible; }
    .brand-pane { min-height: 58svh; padding: 4.5rem 1.5rem; }
    .brand-lockup { width: 82%; max-width: 33rem; max-height: 46svh; object-fit: contain; }
    .notice-pane { min-height: auto; padding: 1.25rem; }
    .notice-copy { padding: 4.5rem 0; }
    h1 { font-size: clamp(3.75rem, 16vw, 6.2rem); }
  }
  @media (max-width: 520px) {
    .brand-pane { min-height: 50svh; height: 50svh; padding: 4rem 1rem 2.5rem; }
    .brand-lockup { width: 74%; max-height: 39svh; }
    .window-note { font-size: .62rem; }
    .status-stamp { width: 4.8rem; right: 1rem; bottom: 1rem; }
    .status-stamp span { font-size: .5rem; }
    .status-stamp strong { font-size: 1.1rem; }
    .notice-copy { width: 100%; padding: 3.5rem 0 4rem; }
    .masthead { gap: .35rem; font-size: .58rem; }
    .masthead span { min-width: 0; }
    .masthead span:last-child { text-align: right; }
    h1 { width: 100%; max-width: 100%; font-size: clamp(3rem, 14vw, 3.45rem); letter-spacing: -.05em; }
    .lede, .promise { max-width: 100%; }
    .input-row { grid-template-columns: 1fr; border-bottom: 0; }
    input { border-bottom: 2px solid var(--ink); }
    button { justify-content: space-between; border-left: 0; }
    .notice-footer { grid-template-columns: auto 1fr; }
    .notice-footer > span { display: none; }
  }
}
