/* ==========================================================================
   The Karims — shared base styles
   --------------------------------------------------------------------------
   This file IS the design system: tokens, reset, typography and the small set
   of reusable components the brand uses. It is deliberately page-agnostic.

   REUSE: copy this file as-is into the future wedding / RSVP site at
   thekarims.ca. Nothing in here knows about the coming-soon page — anything
   page-specific belongs in its own stylesheet (see css/coming-soon.css).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   Change a value here and it changes everywhere, on every page.
   -------------------------------------------------------------------------- */
:root {
  /* Colour — ivory ground, muted champagne accents, deep neutral ink.
     Two golds on purpose:
       --c-gold      decorative strokes only (too light for text contrast)
       --c-gold-deep text-safe on ivory (~5.8:1, passes WCAG AA)            */
  --c-ivory: #fdfbf7;
  --c-cream: #f6f1e7;
  --c-ink: #2e2a26;
  --c-ink-soft: #6b6259;
  --c-gold: #b08d57;
  --c-gold-deep: #7a5f33;
  --c-rule: rgba(176, 141, 87, 0.4);

  /* Type — one serif for display, one quiet sans for everything else. */
  --font-display: "Cormorant Garamond", Cormorant, Garamond, Georgia,
    "Times New Roman", serif;
  --font-body: Jost, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  --tracking-wide: 0.3em; /* small caps eyebrows */
  --tracking-mid: 0.14em; /* buttons, footer */

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 0.875rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  /* Measure + motion */
  --measure: 34ch;
  --ease-soft: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   2. Reset / element defaults
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  /* Column shell: the page content grows, the footer settles at the bottom. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh; /* keeps mobile browser chrome from cropping the layout */
  background-color: var(--c-ivory);
  /* Barely-there warm halo behind the content; falls back to flat ivory. */
  background-image: radial-gradient(
    ellipse at 50% 38%,
    var(--c-cream) 0%,
    var(--c-ivory) 62%
  );
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p {
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
}

/* Visible focus for keyboard users, in the brand's own colour. */
:focus-visible {
  outline: 2px solid var(--c-gold-deep);
  outline-offset: 4px;
}

/* --------------------------------------------------------------------------
   3. Typography components
   -------------------------------------------------------------------------- */

/* Small letterspaced caps — used above a heading. */
.eyebrow {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  /* letter-spacing adds a trailing gap; nudge back to stay optically centred */
  text-indent: var(--tracking-wide);
  color: var(--c-gold-deep);
}

/* The big serif moment: names, or a page title on future pages. */
.display {
  font-family: var(--font-display);
  font-size: clamp(3rem, 13vw, 6.5rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: 0.01em;
  color: var(--c-ink);
}

/* Italic gold ampersand inside a .display heading. */
.display__amp {
  font-style: italic;
  font-size: 0.62em;
  color: var(--c-gold-deep);
}

/* Warm intro sentence under a heading. */
.lede {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4.5vw, 1.6rem);
  font-weight: 400;
  line-height: 1.55;
  color: var(--c-ink);
}

.text-soft {
  color: var(--c-ink-soft);
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Constrain body copy to a comfortable reading measure, centred. */
.measure {
  max-width: var(--measure);
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   4. Divider — hairline rules with a small diamond between them.
   The brand's one decorative motif. Purely presentational.
   -------------------------------------------------------------------------- */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: min(15rem, 62%);
  margin-inline: auto;
  border: 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--c-rule) 35%,
    var(--c-rule) 65%,
    transparent
  );
}

.divider__mark {
  width: 6px;
  height: 6px;
  rotate: 45deg;
  background-color: var(--c-gold);
}

/* --------------------------------------------------------------------------
   5. Button — used live on future pages (RSVP), and in a disabled
   "coming soon" state today.
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.85rem 2.25rem;
  border: 1px solid var(--c-gold);
  border-radius: 2px;
  background-color: transparent;
  color: var(--c-gold-deep);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: var(--tracking-mid);
  text-transform: uppercase;
  text-indent: var(--tracking-mid);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.4s var(--ease-soft),
    color 0.4s var(--ease-soft);
}

.btn:hover,
.btn:focus-visible {
  background-color: var(--c-gold-deep);
  color: var(--c-ivory);
}

/* Not yet available. Kept legible rather than washed out, so the label is
   still readable — it is information, not decoration. */
.btn:disabled,
.btn[aria-disabled="true"] {
  border-color: var(--c-rule);
  background-color: transparent;
  color: var(--c-ink-soft);
  cursor: default;
}

/* --------------------------------------------------------------------------
   6. Inline text link
   -------------------------------------------------------------------------- */
.link {
  color: var(--c-gold-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--c-rule);
  padding-bottom: 1px;
  transition: border-color 0.3s var(--ease-soft);
}

.link:hover,
.link:focus-visible {
  border-bottom-color: var(--c-gold-deep);
}

/* --------------------------------------------------------------------------
   7. Site footer — the quiet brand line at the foot of every page.
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 0 var(--space-md) var(--space-lg);
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: var(--tracking-mid);
  text-indent: var(--tracking-mid);
  text-transform: uppercase;
  color: var(--c-ink-soft);
}

/* --------------------------------------------------------------------------
   8. Page chrome — thin inset border framing the whole viewport,
   the way a printed invitation is framed. Add class="framed" to <body>.
   -------------------------------------------------------------------------- */
.framed::after {
  content: "";
  position: fixed;
  inset: 0.75rem;
  border: 1px solid var(--c-rule);
  pointer-events: none;
}

@media (min-width: 48em) {
  .framed::after {
    inset: 1.5rem;
  }
}

/* --------------------------------------------------------------------------
   9. Entrance animation — gentle stagger.
   Add class="reveal" to a container; its direct children fade up in order.
   -------------------------------------------------------------------------- */
@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.reveal > * {
  animation: fade-rise 1.1s var(--ease-soft) both;
}

.reveal > *:nth-child(1) {
  animation-delay: 0.1s;
}
.reveal > *:nth-child(2) {
  animation-delay: 0.28s;
}
.reveal > *:nth-child(3) {
  animation-delay: 0.46s;
}
.reveal > *:nth-child(4) {
  animation-delay: 0.64s;
}
.reveal > *:nth-child(5) {
  animation-delay: 0.82s;
}
.reveal > *:nth-child(6) {
  animation-delay: 1s;
}

/* Respect a reduced-motion preference: show everything immediately. */
@media (prefers-reduced-motion: reduce) {
  .reveal > * {
    animation: none;
  }

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