/* ------------------------------------------------------------------
   THE GEM HUNTER CLUB · DROP 001 · FOUNDING 77
   Waitlist page. A private invitation, not a landing page.

   World: warm, sunlit, sandstone. Two photographic plates, each in a
   hairline frame. Engraved stationery typography: Cormorant Garamond
   for every word, IBM Plex Mono only for the piece numeral and the
   email field. One accent (olive) used for focus and the filled hover.
   ------------------------------------------------------------------ */

@import url("assets/fonts/fonts.css");

:root {
  color-scheme: light;

  --sand: #e9dcc2;
  --paper: #f4ede0;
  --ink: #2b2723;
  --umber: #6f5238;
  --olive: #5a6839;
  --olive-deep: #404b28;
  --rust: #9a4527;
  --rust-light: #f0c2a3;

  --hair: rgba(43, 39, 35, 0.2);
  --hair-paper: rgba(244, 237, 224, 0.42);
  --scrim: 34, 26, 18;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --inset: clamp(14px, 2vw, 26px);      /* frame inset on the plates */
  --gutter: clamp(22px, 6vw, 96px);
  --edge: calc(var(--inset) + var(--gutter));
  --measure: 32rem;
}

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

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

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.45;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }

/* Light film grain over everything. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

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

.skip {
  position: absolute;
  top: 8px;
  left: -999px;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}
.skip:focus { left: 8px; }

/* ---------- Type roles ---------- */

.caps {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  line-height: 1.4;
  text-transform: uppercase;
}

.statement {
  margin: 0;
  font-weight: 300;
  font-size: clamp(2.5rem, 5.2vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.01em;
}

.lead {
  max-width: var(--measure);
  margin: 2rem 0 0;
  font-size: clamp(1.2rem, 1.6vw, 1.45rem);
  line-height: 1.5;
}

.whisper {
  margin: 1.6rem 0 0;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1.2;
  color: var(--umber);
}

.container {
  width: 100%;
  max-width: 88rem;
  margin: 0 auto;
  padding-inline: var(--edge);
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  top: calc(var(--inset) + 16px);
  left: calc(var(--inset) + 20px);
  right: calc(var(--inset) + 20px);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--paper);
}
.site-header--ink { color: var(--ink); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}
.brand svg {
  width: 16px;
  height: 16px;
  flex: none;
}

/* ---------- Plate one: the hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: var(--paper);
}
.hero::before {
  content: "";
  position: absolute;
  inset: var(--inset);
  z-index: 2;
  border: 1px solid var(--hair-paper);
  pointer-events: none;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;   /* Club mark right of centre and above the form, chin out of frame */
  filter: brightness(1.05) contrast(1.03) saturate(1.05);
  animation: settle 9s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
@media (max-width: 900px) {
  .hero__media img { object-position: 70% 50%; }  /* the phone crop: mark in the upper right, words below */
}
/* Scrims sit where the words are (top bar, lower left). The garment on the
   right keeps its light so the cotton reads as cotton, not as a black shape. */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(var(--scrim), 0.34) 0%, rgba(var(--scrim), 0) 28%),
    linear-gradient(90deg, rgba(var(--scrim), 0.5) 0%, rgba(var(--scrim), 0.22) 48%, rgba(var(--scrim), 0) 78%),
    linear-gradient(180deg, rgba(var(--scrim), 0) 40%, rgba(var(--scrim), 0.42) 76%, rgba(var(--scrim), 0.66) 100%),
    radial-gradient(60% 50% at 82% 30%, rgba(255, 214, 160, 0.16), rgba(255, 214, 160, 0) 70%);
}
@media (max-width: 640px) {
  .hero__media::after {
    background:
      linear-gradient(180deg, rgba(var(--scrim), 0.34) 0%, rgba(var(--scrim), 0) 26%),
      linear-gradient(180deg, rgba(var(--scrim), 0) 36%, rgba(var(--scrim), 0.56) 72%, rgba(var(--scrim), 0.78) 100%),
      radial-gradient(70% 40% at 70% 22%, rgba(255, 214, 160, 0.14), rgba(255, 214, 160, 0) 70%);
  }
}

@keyframes settle {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-bottom: calc(var(--inset) + clamp(40px, 8vh, 92px));
  text-shadow: 0 1px 30px rgba(var(--scrim), 0.3);
}

.hero__eyebrow {
  margin: 0 0 1.6rem;
  opacity: 0.88;
}

.hero__title {
  max-width: 12ch;
  margin: 0;
  font-weight: 300;
  font-size: clamp(3.1rem, 8.6vw, 7.6rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
}

.hero__support {
  margin: 1.3rem 0 0;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  line-height: 1.3;
  opacity: 0.92;
}

.hero__form { margin-top: 2.4rem; }

.js .hero__content > * {
  animation: rise 1.2s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}
.js .hero__content > :nth-child(1) { animation-delay: 0.3s; }
.js .hero__content > :nth-child(2) { animation-delay: 0.45s; }
.js .hero__content > :nth-child(3) { animation-delay: 0.6s; }
.js .hero__content > :nth-child(4) { animation-delay: 0.8s; }

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

/* ---------- Signup: hairline field, outlined button ---------- */

.signup-form { margin: 0; }

.signup {
  display: flex;
  align-items: flex-end;
  gap: 1.6rem;
  max-width: 36rem;
}

.field {
  flex: 1 1 auto;
  min-width: 0;
}
.field__input {
  width: 100%;
  height: 48px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(244, 237, 224, 0.5);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.field__input::placeholder {
  color: rgba(244, 237, 224, 0.62);
  opacity: 1;
}
.field__input:hover { border-color: rgba(244, 237, 224, 0.85); }
.field__input:focus {
  border-color: var(--paper);
  box-shadow: 0 1px 0 0 var(--paper);
}
.field__input[aria-invalid="true"] {
  border-color: var(--rust-light);
  box-shadow: 0 1px 0 0 var(--rust-light);
}

.button {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 1.6rem;
  border: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
}
.button:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}
.button:active { transform: translateY(1px); }
.button:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}
.button[disabled] { opacity: 0.6; cursor: default; }

.signup__error {
  margin: 0.8rem 0 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--rust-light);
}
.signup__error[hidden] { display: none; }

/* On sand. */
.signup--ink { color: var(--ink); }
.signup--ink .field__input { border-bottom-color: rgba(43, 39, 35, 0.38); }
.signup--ink .field__input::placeholder { color: rgba(43, 39, 35, 0.62); }
.signup--ink .field__input:hover { border-bottom-color: rgba(43, 39, 35, 0.7); }
.signup--ink .field__input:focus {
  border-bottom-color: var(--olive);
  box-shadow: 0 1px 0 0 var(--olive);
}
.signup--ink .field__input[aria-invalid="true"] {
  border-bottom-color: var(--rust);
  box-shadow: 0 1px 0 0 var(--rust);
}
.signup--ink .button:hover {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--paper);
}
.signup--ink .button:focus-visible { outline-color: var(--olive); }
.signup--ink ~ .signup__error { color: var(--rust); }

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(96px, 14vw, 200px);
}

.origin {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(3rem, 8vw, 9rem);
  align-items: center;
}

/* The number: an engraved line where your number will be written. */
.plate {
  display: grid;
  gap: 1.3rem;
  justify-items: start;
}
.plate__value {
  display: flex;
  align-items: baseline;
  gap: 0.28em;
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: clamp(3.4rem, 8vw, 7rem);
  line-height: 1;
  color: var(--ink);
}
.plate__prefix,
.plate__of {
  font-size: 0.34em;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--umber);
}
.plate__digits {
  position: relative;
  display: inline-block;
  min-width: 3ch;
  text-align: center;
}
.plate__digits::after {
  content: "";
  position: absolute;
  left: 0.06em;
  right: 0.06em;
  bottom: -0.08em;
  height: 1px;
  background: var(--ink);
  opacity: 0.55;
}
.plate__num {
  display: inline-block;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.plate__num.is-on { opacity: 1; }
.plate__note { color: var(--umber); }

@media (min-width: 861px) {
  .plate {
    justify-items: end;
    text-align: right;
  }
}

/* Plate two: the collar, artwork still hidden. */
.plate-photo {
  position: relative;
  height: clamp(300px, 46vw, 660px);
  margin: 0;
  overflow: hidden;
  isolation: isolate;
}
.plate-photo::before {
  content: "";
  position: absolute;
  inset: var(--inset);
  z-index: 2;
  border: 1px solid var(--hair-paper);
  pointer-events: none;
}
.plate-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
}

.rules { max-width: 44rem; }
.rules__list {
  display: grid;
  gap: 1.15rem;
  margin: 2.4rem 0 0;
  padding: 2.2rem 0 0;
  border-top: 1px solid var(--hair);
  list-style: none;
}
.rules__item {
  font-size: clamp(1.3rem, 1.9vw, 1.7rem);
  line-height: 1.35;
}

/* Sunlit haze: a cliff-only crop of the expedition photo, softened, under a sand veil. */
.haze {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--sand);
}
.haze::after {
  content: "";
  position: absolute;
  inset: -24px;
  z-index: -2;
  background: url("assets/haze-cliffs.jpg") 50% 40% / cover no-repeat;
  filter: blur(12px) saturate(1.35) brightness(1.04);
  transform: scale(1.04);
}
.haze::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(233, 220, 194, 0.86) 0%, rgba(233, 220, 194, 0.68) 55%, rgba(233, 220, 194, 0.5) 100%),
    linear-gradient(180deg, rgba(214, 170, 110, 0.18), rgba(214, 170, 110, 0) 60%);
}

.intertitle { text-align: center; }
.intertitle .lead { margin-inline: auto; }

.join { text-align: center; }
.join .signup { margin: 2.6rem auto 0; }
.join__note {
  margin: 1.5rem 0 0;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--umber);
}

/* ---------- Footer ---------- */

.site-footer { padding: 0 0 3rem; }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2.5rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--hair);
  color: var(--umber);
}
.site-footer__inner a {
  text-decoration: none;
  text-underline-offset: 0.4em;
}
.site-footer__inner a:hover,
.site-footer__inner a:focus-visible { text-decoration: underline; }
.site-footer__inner a:focus-visible { outline: 1px solid var(--olive); outline-offset: 4px; }
.site-footer__privacy {
  flex-basis: 100%;
  margin: 0.4rem 0 0;
  font-style: italic;
  font-size: 1.05rem;
}

/* ---------- Simple pages (thanks, confirmed) ---------- */

.page {
  display: grid;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: clamp(110px, 18vh, 180px) clamp(64px, 10vh, 120px);
}
.page__note {
  margin: 1.5rem 0 0;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--umber);
}
.page__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.4rem;
  margin: 2.8rem 0 0;
}
.page__links a {
  text-decoration: none;
  text-underline-offset: 0.4em;
}
.page__links a:hover,
.page__links a:focus-visible { text-decoration: underline; }
.page__links a:focus-visible { outline: 1px solid var(--olive); outline-offset: 4px; }

/* ---------- Scroll reveal ---------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Smaller screens ---------- */

@media (max-width: 860px) {
  .origin { grid-template-columns: 1fr; gap: 3.5rem; }
}

@media (max-width: 640px) {
  .caps { font-size: 0.68rem; letter-spacing: 0.26em; }
  .site-header {
    top: calc(var(--inset) + 12px);
    left: calc(var(--inset) + 14px);
    right: calc(var(--inset) + 14px);
  }
  .hero__content { padding-bottom: calc(var(--inset) + 30px); }
  .hero__form { margin-top: 2rem; }
  .signup {
    flex-direction: column;
    align-items: stretch;
    gap: 1.1rem;
  }
  .button { width: 100%; }
  .plate-photo { height: 62vw; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
