/* ── MailHalla launch page ──────────────────────────────────────────────
   Same design language as the app (web/apps/mail/src/styles/base.css):
   warm paper, near-black ink, gold accent, Instrument Serif display,
   Spline Sans Mono for postal labels. Keep tokens in step with the app. */

:root {
  --paper: #faf8f3;
  --paper-raised: #fffefb;
  --ink: #1c1a15;
  --ink-soft: #5c574b;
  --ink-faint: #8f897a;
  --hairline: #e6e1d5;
  --hairline-strong: #d5cfbf;
  --brand: #c9a227;
  --brand-wash: #faf3df;
  --brand-deep: #8a6d14;
  --on-brand: #1c1a15;
  --danger: #b3402e;
  --postmark: #8b3a2e;
  --font-ui: 'Instrument Sans', sans-serif;
  --font-display: 'Instrument Serif', serif;
  --font-mono: 'Spline Sans Mono', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16140f;
    --paper-raised: #1d1a14;
    --ink: #eae4d6;
    --ink-soft: #b3ac9a;
    --ink-faint: #837c6b;
    --hairline: #2c2820;
    --hairline-strong: #3d382c;
    --brand-wash: #241e13;
    --brand-deep: #d9b84c;
    --postmark: #c2604f;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(ellipse 60% 50% at 50% -10%, var(--brand-wash), transparent),
    var(--paper);
}

.top {
  padding: 26px clamp(20px, 6vw, 56px);
}

.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 26px;
  letter-spacing: -0.01em;
}

.star {
  color: var(--brand-deep);
  font-style: normal;
}

main {
  flex: 1;
  width: min(660px, calc(100vw - 40px));
  margin: 0 auto;
  padding: clamp(24px, 7vh, 80px) 0 48px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  margin-bottom: 14px;
}

h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(44px, 9vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-bottom: 22px;
}

.lede {
  max-width: 34em;
  color: var(--ink-soft);
  margin-bottom: 44px;
}

/* ── The envelope ─────────────────────────────────────────────────── */

.envelope {
  position: relative;
  background: var(--paper-raised);
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  padding: 30px 34px 30px;
  box-shadow: 0 18px 40px -24px rgba(28, 26, 21, 0.35);
  overflow: hidden;
}

.stamp {
  position: absolute;
  top: 18px;
  right: 20px;
  width: 62px;
  height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 2px dashed var(--hairline-strong);
  border-radius: 3px;
  background: var(--brand-wash);
  color: var(--brand-deep);
}

.stamp-star {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
}

.stamp-eu {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
}

/* Postmark: hidden until the signup lands, then stamped over the corner. */
.postmark {
  position: absolute;
  top: 12px;
  right: 8px;
  width: 220px;
  color: var(--postmark);
  opacity: 0;
  transform: rotate(-8deg) scale(1.35);
  pointer-events: none;
}

.postmark-town {
  font: 500 13px var(--font-mono);
  letter-spacing: 0.08em;
  fill: currentColor;
}

.postmark-date {
  font: 500 14px var(--font-mono);
  fill: currentColor;
}

.envelope.stamped .postmark {
  opacity: 0.75;
  transform: rotate(-8deg) scale(1);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.envelope.stamped .stamp {
  border-color: var(--hairline);
}

@media (prefers-reduced-motion: reduce) {
  .envelope.stamped .postmark {
    transition: none;
  }
}

.env-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  max-width: calc(100% - 90px);
}

.env-label {
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  flex-shrink: 0;
  width: 52px;
}

.env-from {
  cursor: text;
}

.env-from input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  outline: none;
}

.env-from input::placeholder {
  color: var(--ink-faint);
}

.env-from:focus-within {
  border-bottom-color: var(--brand-deep);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.send {
  margin-top: 24px;
  padding: 11px 22px;
  border: none;
  border-radius: 6px;
  background: var(--brand);
  color: var(--on-brand);
  font: 600 16px var(--font-ui);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.1s var(--ease-out), opacity 0.15s;
}

.send:hover {
  opacity: 0.92;
}

.send:active {
  transform: scale(0.985);
}

.send:disabled {
  opacity: 0.5;
  cursor: default;
}

.send:focus-visible,
.env-from input:focus-visible {
  outline: 2px solid var(--brand-deep);
  outline-offset: 2px;
}

.form-note {
  margin-top: 14px;
  font-size: 16px;
  color: var(--danger);
  min-height: 1.4em;
}

.envelope.stamped .form-note {
  color: var(--ink-soft);
}

.promise {
  margin-top: 18px;
  font-size: 15px;
  color: var(--ink-faint);
}

/* ── Status bar footer, like the app's ────────────────────────────── */

.statusbar {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 10px clamp(20px, 6vw, 56px);
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
}

.statusbar a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.statusbar a:hover {
  color: var(--ink);
}

.eu-tag {
  margin-left: auto;
  color: var(--brand-deep);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .envelope {
    padding: 24px 20px;
  }

  .stamp {
    width: 52px;
    height: 62px;
  }

  .env-line {
    max-width: 100%;
  }

  .env-line:first-of-type {
    max-width: calc(100% - 66px);
  }

  .statusbar {
    gap: 14px;
    font-size: 12px;
  }
}
