:root {
  --field: #23477a;
  --ink: #eef3f9;
  --muted: #c3d2e4;
  --rule: rgba(238, 243, 249, .24);
  --accent: #eb7d1a;
  --accent-ink: #10203a;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", ui-serif, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

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

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

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(1.5rem, 4vh, 3rem);
  padding: var(--gutter);
  background: var(--field);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 1px;
}

/* Header */

header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding-bottom: clamp(1rem, 2.5vh, 1.5rem);
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: flex;
  gap: .6rem;
  align-items: center;
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -.005em;
}

.mark {
  width: 1.4rem;
  height: 1.4rem;
  flex: none;
}

.lang {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--rule);
  border-radius: 3px;
  font-size: .75rem;
  letter-spacing: .1em;
}

.lang button {
  min-width: 2.6rem;
  min-height: 2rem;
  padding: .35rem .5rem;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.lang button + button { border-left: 1px solid var(--rule); }
.lang button:hover { color: var(--ink); }

.lang button[aria-pressed="true"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 currentColor;
}

/* Stage */

main {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  overflow: clip;
  /* the CTA's focus ring sits on main's left edge; let the ring paint past the clip box */
  overflow-clip-margin: 6px;
  isolation: isolate;
}

.content {
  position: relative;
  z-index: 1;
  max-width: 46rem;
}

h1 {
  margin: 0 0 clamp(.9rem, 2.5vh, 1.5rem);
  max-width: 14ch;
  font-family: var(--serif);
  font-size: clamp(3rem, 10.5vw, 7.5rem);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.lede {
  max-width: 32ch;
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1.1rem;
  margin-top: clamp(1.75rem, 5vh, 2.75rem);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.35rem;
  border: 0;
  border-radius: 3px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease;
}

.cta:hover { background: #f08d33; }
.cta:focus-visible { outline-color: var(--ink); outline-offset: 4px; }

.cta .arrow { transition: transform .18s ease; }
.cta:hover .arrow { transform: translateX(3px); }

.addr {
  color: var(--muted);
  font-size: .875rem;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}

/* Sign-up */

.signup {
  margin-top: clamp(1.75rem, 5vh, 2.75rem);
  max-width: 34rem;
}

.signup-label {
  display: block;
  margin-bottom: .4rem;
  color: var(--muted);
  font-size: .875rem;
  letter-spacing: .01em;
}

.signup-row {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.signup input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  min-height: 2.75rem;
  padding: .55rem .8rem;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: rgba(238, 243, 249, .07);
  color: var(--ink);
  font: inherit;
}

.signup input[type="email"]:hover { border-color: rgba(238, 243, 249, .5); }
.signup input[type="email"]:focus-visible { border-color: var(--ink); }
.signup button { min-height: 2.75rem; }
.signup .addr { display: block; margin-top: .7rem; }

/* Out of the tab order and out of the flow, but not off the page */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Document-stack motif */

.motif {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: -30vw;
  width: 100vw;
  aspect-ratio: 1 / 1.24;
  margin: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.sheet {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(238, 243, 249, .55);
  border-radius: 3px;
  background: rgba(238, 243, 249, .1);
  opacity: .8;
}

/* only the front sheet carries ruled lines, so the stack stays quiet */
.sheet:first-child::before {
  content: "";
  position: absolute;
  inset: 18% 11% 8%;
  background: repeating-linear-gradient(to bottom,
    rgba(238, 243, 249, .38) 0 1px,
    transparent 1px 1.9rem);
  mask-image: linear-gradient(to bottom, #000 65%, transparent);
}

.head {
  position: absolute;
  top: 9%;
  left: 11%;
  width: 42%;
  height: 1px;
  background: rgba(238, 243, 249, .7);
  box-shadow: 0 6px 0 rgba(238, 243, 249, .45);
}

.sheet:nth-child(1) { transform: rotate(-6deg) translate(-6%, 4%); z-index: 2; }
.sheet:nth-child(2) { transform: rotate(2.5deg) translate(2%, 1%); }
.sheet:nth-child(3) { transform: rotate(-1.5deg) translate(6%, -3%); }

.tab {
  position: absolute;
  z-index: 3;
  top: 30%;
  right: calc(6% - .4rem);
  width: .85rem;
  height: 2.6rem;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
  transform: rotate(-6deg);
  transform-origin: right center;
}

/* Footer */

footer {
  padding-top: clamp(1rem, 2.5vh, 1.5rem);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: .8125rem;
  letter-spacing: .01em;
}

footer p span { padding-inline: .15rem; }

/* Service-rendered /tak and error pages */

.page { grid-template-rows: 1fr; }
.page main { justify-content: center; overflow: visible; }
.page h1 { max-width: 20ch; font-size: clamp(2.5rem, 8vw, 5rem); }
.page .lede { max-width: 34ch; }

/* Small screens: sheet corner above the copy, copy sits low */
@media (max-width: 43.999rem) {
  main { justify-content: flex-end; padding-bottom: 1rem; }
  .motif {
    top: 0;
    right: -2vw;
    width: 58vw;
    transform: none;
  }
  .sheet { opacity: .55; }
  .head { display: none; }
}

@media (min-width: 44rem) {
  h1 { max-width: 9ch; }
  .motif {
    right: 1vw;
    width: min(40vw, 24rem);
  }
}

/* Tablet: the motif runs under the headline, so keep it quiet there */
@media (min-width: 44rem) and (max-width: 68rem) {
  .sheet { opacity: .5; }
}

@media (prefers-reduced-motion: no-preference) {
  .content > * {
    animation: rise .6s cubic-bezier(.2, .7, .3, 1) backwards;
  }
  .content > :nth-child(2) { animation-delay: .08s; }
  .content > :nth-child(3) { animation-delay: .16s; }
  .sheet:nth-child(1) { animation: settle 1s cubic-bezier(.2, .7, .3, 1) backwards; }
  .sheet:nth-child(2) { animation: settle 1s .07s cubic-bezier(.2, .7, .3, 1) backwards; }
  .sheet:nth-child(3) { animation: settle 1s .14s cubic-bezier(.2, .7, .3, 1) backwards; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(.6rem); }
}

@keyframes settle {
  from { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cta, .cta .arrow { transition: none; }
}

@media (forced-colors: active) {
  .cta { border: 1px solid ButtonText; }
  .lang button[aria-pressed="true"] { outline: 1px solid; }
}

@media print {
  body { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .content > *, .sheet { animation: none !important; }
}