/* ==============================================================
   RAVENFORGE — Holding Page Stylesheet
   Premium gothic jewellery · ravenforgejewellery.co.uk

   Contents
   01. Design tokens
   02. Reset & base
   03. Typography helpers & ornaments
   04. Buttons
   05. Hero (atmosphere: mist, embers, vignette)
   06. About
   07. Collections (cards)
   08. Waiting list (form)
   09. Socials
   10. Footer
   11. Motion (entrance + scroll reveal)
   12. Accessibility & reduced motion
   ============================================================== */


/* --------------------------------------------------------------
   01. Design tokens — palette from the Ravenforge brand sheet
   -------------------------------------------------------------- */
:root {
  /* Colour */
  --ink:        #0b0b0c;  /* page background                     */
  --ink-soft:   #101012;  /* alternating section background      */
  --charcoal:   #1a1a1d;  /* raised surfaces                     */
  --line:       #2a2a2d;  /* borders, dividers                   */
  --silver:     #a7a7a9;  /* secondary text, ornaments           */
  --silver-dim: #7c7c80;  /* muted text (4.6:1 on --ink)         */
  --gold:       #b59c6a;  /* premium accent                      */
  --gold-bright:#cdb686;  /* accent hover                        */
  --white:      #f2f2f2;  /* headings, primary text              */
  --body:       #c9c9cc;  /* body copy (10:1 on --ink)           */

  /* Type */
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;

  /* Rhythm */
  --space-section: clamp(5rem, 12vw, 8.5rem);
  --container: 72rem;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --speed-ui: 300ms;
  --speed-reveal: 900ms;
}


/* --------------------------------------------------------------
   02. Reset & base
   -------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--ink);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--speed-ui) var(--ease-out);
}

a:hover {
  color: var(--gold-bright);
}

ul[role="list"] {
  list-style: none;
}

.container {
  width: min(100% - 3rem, var(--container));
  margin-inline: auto;
}

.container--narrow {
  max-width: 42rem;
}

/* Sections */
.section {
  padding-block: var(--space-section);
  position: relative;
}

.about      { background: var(--ink); }
.collections{ background: var(--ink-soft); }
.waitlist   { background: var(--ink); }
.socials    { background: var(--ink-soft); }

/* Hairline seams between sections */
.collections,
.socials {
  border-block: 1px solid var(--line);
}


/* --------------------------------------------------------------
   03. Typography helpers & ornaments
   -------------------------------------------------------------- */
.section__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  text-align: center;
}

/* Filigree divider: line — diamond — line */
.ornament {
  display: flex;
  justify-content: center;
  color: var(--gold);
  opacity: 0.85;
  margin-block: 1.5rem 0;
}

.ornament--small {
  margin-block: 1.25rem 2.5rem;
  color: var(--silver-dim);
}

/* Skip link — visible on keyboard focus only */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--charcoal);
  color: var(--white);
  border: 1px solid var(--gold);
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 1rem;
}


/* --------------------------------------------------------------
   04. Buttons
   -------------------------------------------------------------- */
.btn {
  display: inline-block;
  min-height: 3rem;                    /* 48px touch target */
  padding: 0.9rem 2.5rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

.btn--primary {
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold);
  transition:
    color var(--speed-ui) var(--ease-out),
    background-color var(--speed-ui) var(--ease-out),
    box-shadow var(--speed-ui) var(--ease-out);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  color: var(--ink);
  background: var(--gold);
  box-shadow: 0 0 32px rgba(181, 156, 106, 0.25);
}

.btn--primary:active {
  transform: scale(0.98);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}


/* --------------------------------------------------------------
   05. Hero
   -------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;                    /* fallback */
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 70% at 50% -10%, #17171a 0%, var(--ink) 60%);
}

.hero__inner {
  position: relative;
  z-index: 3;
  padding: 6rem 1.5rem;
  will-change: transform;
}

.hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2.25rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 11vw, 6.5rem);
  letter-spacing: clamp(0.08em, 2vw, 0.18em);
  text-transform: uppercase;
  line-height: 1.05;
  margin-right: -0.18em;                /* optically recentre letterspaced text */
  /* Engraved-silver effect, matching the brand logotype */
  background: linear-gradient(180deg, #f4f4f4 0%, #bdbdc0 45%, #86868a 75%, #d9d9db 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .ornament {
  margin-block: 1.75rem;
}

.hero__subtitle {
  font-size: clamp(0.75rem, 2.4vw, 0.9375rem);
  font-weight: 400;
  letter-spacing: 0.5em;
  margin-right: -0.5em;                 /* optically recentre */
  text-transform: uppercase;
  color: var(--silver);
}

.hero__tagline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.05rem, 3vw, 1.375rem);
  letter-spacing: 0.06em;
  line-height: 1.8;
  color: var(--body);
  margin-block: 2.75rem;
}

/* Scroll cue: slim vertical line that breathes */
.hero__scroll-cue {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 44px;
  height: 64px;
}

.hero__scroll-line {
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, var(--silver-dim), transparent);
  transform-origin: top;
  animation: scroll-breathe 2.6s var(--ease-out) infinite;
}

@keyframes scroll-breathe {
  0%, 100% { transform: scaleY(0.45); opacity: 0.4; }
  50%      { transform: scaleY(1);    opacity: 1;   }
}

/* --- Atmosphere layers (decorative, CSS only) ----------------- */
.hero__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Slow drifting mist — two soft radial fields moving in opposition */
.mist {
  position: absolute;
  inset: -30%;
  opacity: 0.5;
  will-change: transform;
}

.mist--one {
  background:
    radial-gradient(ellipse 42% 30% at 28% 68%, rgba(167, 167, 169, 0.055), transparent 70%),
    radial-gradient(ellipse 36% 26% at 75% 40%, rgba(167, 167, 169, 0.04), transparent 70%);
  animation: mist-drift-a 42s ease-in-out infinite alternate;
}

.mist--two {
  background:
    radial-gradient(ellipse 40% 26% at 62% 76%, rgba(181, 156, 106, 0.035), transparent 70%),
    radial-gradient(ellipse 30% 24% at 22% 30%, rgba(167, 167, 169, 0.045), transparent 70%);
  animation: mist-drift-b 56s ease-in-out infinite alternate;
}

@keyframes mist-drift-a {
  from { transform: translate3d(-3%, 1%, 0) scale(1); }
  to   { transform: translate3d(4%, -2%, 0) scale(1.08); }
}

@keyframes mist-drift-b {
  from { transform: translate3d(3%, -1%, 0) scale(1.06); }
  to   { transform: translate3d(-4%, 2%, 0) scale(1); }
}

/* Embers — faint silver motes rising slowly through the dark */
.embers i {
  position: absolute;
  bottom: -3vh;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--silver);
  opacity: 0;
  animation: ember-rise linear infinite;
  will-change: transform, opacity;
}

@keyframes ember-rise {
  0%   { transform: translate3d(0, 0, 0);            opacity: 0; }
  8%   { opacity: var(--glow, 0.35); }
  85%  { opacity: var(--glow, 0.35); }
  100% { transform: translate3d(var(--sway, 2rem), -108vh, 0); opacity: 0; }
}

/* Each mote: position, scale, sway, timing */
.embers i:nth-child(1)  { left: 6%;  --sway: 2.5rem;  --glow: 0.30; animation-duration: 26s; animation-delay: 0s;   }
.embers i:nth-child(2)  { left: 14%; --sway: -2rem;   --glow: 0.20; animation-duration: 34s; animation-delay: 6s;  transform: scale(0.6); }
.embers i:nth-child(3)  { left: 22%; --sway: 3rem;    --glow: 0.35; animation-duration: 29s; animation-delay: 12s; }
.embers i:nth-child(4)  { left: 31%; --sway: -1.5rem; --glow: 0.25; animation-duration: 38s; animation-delay: 3s;  transform: scale(0.7); }
.embers i:nth-child(5)  { left: 39%; --sway: 2rem;    --glow: 0.30; animation-duration: 31s; animation-delay: 17s; }
.embers i:nth-child(6)  { left: 47%; --sway: -3rem;   --glow: 0.20; animation-duration: 27s; animation-delay: 9s;  transform: scale(0.5); }
.embers i:nth-child(7)  { left: 54%; --sway: 1.5rem;  --glow: 0.35; animation-duration: 36s; animation-delay: 1s;  }
.embers i:nth-child(8)  { left: 61%; --sway: -2.5rem; --glow: 0.25; animation-duration: 30s; animation-delay: 14s; transform: scale(0.8); }
.embers i:nth-child(9)  { left: 68%; --sway: 2.5rem;  --glow: 0.30; animation-duration: 40s; animation-delay: 7s;  transform: scale(0.6); }
.embers i:nth-child(10) { left: 75%; --sway: -2rem;   --glow: 0.20; animation-duration: 28s; animation-delay: 19s; }
.embers i:nth-child(11) { left: 82%; --sway: 3rem;    --glow: 0.35; animation-duration: 33s; animation-delay: 4s;  transform: scale(0.7); }
.embers i:nth-child(12) { left: 89%; --sway: -1.5rem; --glow: 0.25; animation-duration: 37s; animation-delay: 11s; }
.embers i:nth-child(13) { left: 94%; --sway: 2rem;    --glow: 0.30; animation-duration: 25s; animation-delay: 16s; transform: scale(0.5); }
.embers i:nth-child(14) { left: 50%; --sway: -2.5rem; --glow: 0.15; animation-duration: 44s; animation-delay: 21s; transform: scale(0.9); }

/* Vignette — draws the eye to the centre */
.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 90% 80% at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
}


/* --------------------------------------------------------------
   06. About
   -------------------------------------------------------------- */
.about__copy {
  font-size: clamp(1rem, 2.4vw, 1.125rem);
  line-height: 1.9;
  text-align: center;
  color: var(--body);
}

.about__copy + .about__copy {
  margin-top: 1.5rem;
}


/* --------------------------------------------------------------
   07. Collections
   -------------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .cards { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
}

.card {
  position: relative;
  padding: 2.75rem 1.75rem 2.5rem;
  text-align: center;
  background: linear-gradient(180deg, var(--charcoal) 0%, #141416 100%);
  border: 1px solid var(--line);
  transition:
    transform var(--speed-ui) var(--ease-out),
    border-color var(--speed-ui) var(--ease-out),
    box-shadow var(--speed-ui) var(--ease-out);
}

/* Fine gold keyline that emerges on hover */
.card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid transparent;
  transition: border-color var(--speed-ui) var(--ease-out);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(181, 156, 106, 0.45);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

.card:hover::before {
  border-color: rgba(181, 156, 106, 0.18);
}

.card__icon {
  display: inline-flex;
  color: var(--silver-dim);
  margin-bottom: 1.5rem;
  transition: color var(--speed-ui) var(--ease-out);
}

.card:hover .card__icon {
  color: var(--gold);
}

.card__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 0.875rem;
}

.card__copy {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--silver);
}


/* --------------------------------------------------------------
   08. Waiting list
   -------------------------------------------------------------- */
.waitlist__copy {
  text-align: center;
  color: var(--silver);
  max-width: 34rem;
  margin-inline: auto;
}

.waitlist__form {
  margin-top: 3rem;
  display: grid;
  gap: 1.75rem;
  max-width: 26rem;
  margin-inline: auto;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field__label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--silver);
}

.field__input {
  width: 100%;
  min-height: 3rem;                     /* 48px touch target */
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;                      /* ≥16px avoids iOS zoom */
  font-weight: 300;
  color: var(--white);
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-radius: 0;
  transition:
    border-color var(--speed-ui) var(--ease-out),
    box-shadow var(--speed-ui) var(--ease-out);
}

.field__input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.field__input[aria-invalid="true"] {
  border-color: #c96a5f;
}

.field__error {
  font-size: 0.8125rem;
  font-weight: 400;
  color: #d98a80;                       /* 5.5:1 on --ink */
}

.waitlist__submit {
  justify-self: center;
  min-width: 14rem;
  margin-top: 0.5rem;
}

.waitlist__success {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  color: var(--gold);
}

/* Success state swap */
.waitlist__form.is-complete .field,
.waitlist__form.is-complete .waitlist__submit {
  display: none;
}


/* --------------------------------------------------------------
   09. Socials
   -------------------------------------------------------------- */
.socials {
  text-align: center;
}

.socials__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 3.5vw, 1.6rem);
  letter-spacing: 0.12em;
  color: var(--white);
  margin-bottom: 2.25rem;
}

.socials__list {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.socials__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;                          /* 48px touch target */
  height: 3rem;
  color: var(--silver);
  border: 1px solid var(--line);
  border-radius: 50%;
  transition:
    color var(--speed-ui) var(--ease-out),
    border-color var(--speed-ui) var(--ease-out),
    transform var(--speed-ui) var(--ease-out);
}

.socials__link:hover,
.socials__link:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
  transform: translateY(-3px);
}


/* --------------------------------------------------------------
   10. Footer
   -------------------------------------------------------------- */
.footer {
  padding-block: 4rem calc(2.5rem + env(safe-area-inset-bottom));
  text-align: center;
  background: var(--ink);
}

.footer__brand {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.375rem;
  letter-spacing: 0.3em;
  margin-right: -0.3em;
  text-transform: uppercase;
  color: var(--white);
}

.footer__strapline {
  font-size: 0.6875rem;
  letter-spacing: 0.35em;
  margin-right: -0.35em;
  text-transform: uppercase;
  color: var(--silver-dim);
  margin-top: 0.625rem;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.875rem;
  margin-top: 2.25rem;
  font-size: 0.8125rem;
}

.footer__nav a {
  color: var(--silver);
  padding: 0.5rem 0.25rem;              /* generous tap area */
}

.footer__nav a:hover,
.footer__nav a:focus-visible {
  color: var(--gold);
}

.footer__sep {
  color: var(--line);
}

.footer__copyright {
  font-size: 0.75rem;
  color: var(--silver-dim);
  margin-top: 1.75rem;
}


/* --------------------------------------------------------------
   11. Motion
   -------------------------------------------------------------- */

/* Entrance: hero elements rise in sequence on page load */
.rise {
  opacity: 0;
  transform: translateY(26px);
  animation: rise-in 1s var(--ease-out) forwards;
  animation-delay: calc(0.35s + var(--d, 0) * 0.13s);
}

@keyframes rise-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal: elements fade up as they enter the viewport.
   JS (script.js) adds .in-view via IntersectionObserver. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--speed-reveal) var(--ease-out),
    transform var(--speed-reveal) var(--ease-out);
  transition-delay: calc(var(--d, 0) * 0.1s);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* No-JS fallback: content must never stay hidden */
.no-js .reveal {
  opacity: 1;
  transform: none;
}


/* --------------------------------------------------------------
   12. Accessibility & reduced motion
   -------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .rise,
  .reveal {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .mist,
  .embers i,
  .hero__scroll-line {
    animation: none;
  }

  .embers {
    display: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
