/* Adorn — coming soon. "Velvet tray": Adornment theme, dark mode, gold catching the light. */

@font-face {
  font-family: 'Noto Serif Display';
  src: url('/fonts/NotoSerifDisplay-Italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('/fonts/Lato-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Lato';
  src: url('/fonts/Lato-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  /* Adornment dark tokens (theme-kit/styles/themes/adornment.css) */
  --velvet: #1a1815;          /* --color-parchment (dark) */
  --velvet-deep: #0f0d0b;
  --well: #24211d;
  --text: #e8e3dc;            /* --color-text-primary */
  --text-soft: #d6cfc4;       /* --color-text-secondary */
  --text-muted: #b5a896;      /* --color-text-muted */
  --taupe: #b5a18a;           /* --color-accent-primary */
  --gold: #daa520;            /* --color-highlight */
  --gold-pale: #f4d293;       /* --color-node-main */
  --gold-deep: #b8860b;
  --line: #4a443c;
  --error: #d4a3a3;           /* --color-error, lifted for contrast on velvet */

  --font-display: 'Noto Serif Display', 'Playfair Display', Didot, Georgia, serif;
  --font-brand: 'Lato', 'Helvetica Neue', Arial, sans-serif;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-brand);
  color: var(--text);
  background-color: var(--velvet);
  /* A pool of light on the tray, falling off into the corners, over a fine velvet nap. */
  background-image:
    radial-gradient(ellipse 70% 55% at 50% 32%, rgba(244, 210, 147, 0.10), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 40%, transparent 45%, var(--velvet-deep) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.42 0 0 0 0 0.30 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(218, 165, 32, 0.35); color: #fff; }

.tray {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.75rem, 5vh, 3rem);
  padding: max(2rem, env(safe-area-inset-top)) 1.25rem max(2.5rem, env(safe-area-inset-bottom));
}

/* ---------- The mark: hexagon, clasp, wordmark ---------- */

.mark {
  position: relative;
  width: min(78vw, 22rem, 46vh);
  aspect-ratio: 866 / 1000;
}

.mark__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 18px rgba(218, 165, 32, 0.12));
}

.mark__body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Lift the group above the geometric centre so it reads as centred (optical centre).
     Percent padding is of the width, so this scales with the hexagon. */
  padding-bottom: 6%;
  /* type scales with the hexagon */
  container-type: inline-size;
}

.mark__icon {
  width: 39%; /* the viewBox has padding so the apex is centred; this keeps the drawing its old size */
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 14px rgba(244, 210, 147, 0.18));
}

.mark__maker {
  margin: 7cqi 0 0;
  font-weight: 700;
  font-size: 4cqi;
  letter-spacing: 0.42em;
  margin-right: -0.42em; /* re-centre: tracking adds space after the last letter */
  text-transform: uppercase;
  color: var(--taupe);
}

.mark__name {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 18cqi;
  line-height: 1.05;
  color: var(--text);
}

/* ---------- Sign-up ---------- */

.signup {
  width: min(100%, 26rem);
  text-align: center;
  text-wrap: balance;
}

.signup__lede {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.35rem, 5.2vw, 1.6rem);
  line-height: 1.25;
  color: var(--gold-pale);
}

.signup__copy {
  margin: 0.5rem 0 1.4rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-soft);
}

.signup__label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--taupe);
  text-align: left;
}

.signup__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.signup__row input {
  flex: 1 1 13rem;
  min-width: 0;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: 1rem; /* 16px+: stops iOS zooming on focus */
  color: var(--text);
  background: var(--well);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.signup__row input::placeholder { color: #7d7468; }
.signup__row input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(218, 165, 32, 0.28);
}
.signup__row input[aria-invalid="true"] { border-color: var(--error); }

.signup__row button {
  flex: 1 0 auto;
  min-height: 3rem;
  padding: 0.7rem 1.3rem;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: #1f1a12;
  /* faceted: a hard break between the lit and shaded halves, like the clasp's bevels */
  background: linear-gradient(170deg, var(--gold-pale) 0%, #e7bd5c 48%, var(--gold) 52%, var(--gold-deep) 100%);
  border: 1px solid #8a6508;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  transition: filter 0.15s, transform 0.05s;
}
@media (min-width: 26rem) {
  .signup__row button { flex-grow: 0; }
}
.signup__row button:hover { filter: brightness(1.08); }
.signup__row button:active { transform: translateY(1px); }
.signup__row button:focus-visible {
  outline: 2px solid var(--gold-pale);
  outline-offset: 3px;
}
.signup__row button:disabled { filter: saturate(0.6) brightness(0.85); cursor: progress; }

.signup__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.signup__status {
  min-height: 1.4em;
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  color: var(--error);
  text-align: left;
}

.signup__fine {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* After a successful sign-up the form is swapped for this. */
.signup__done {
  padding: 1.1rem 1rem;
  border-top: 1px solid rgba(184, 134, 11, 0.5);
  border-bottom: 1px solid rgba(184, 134, 11, 0.5);
}
.signup__done strong {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--gold-pale);
}
.signup__done span { display: block; margin-top: 0.3rem; color: var(--text-soft); }
.signup__done:focus { outline: none; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
