/* ==========================================================================
   Wedding site styles. Mobile first: base styles target small phones (375px),
   media queries add space and columns on wider screens.
   ========================================================================== */

:root {
  /* Colours */
  --color-bg:       #FBF7F0;  /* page background */
  --color-card:     #FFFDF9;  /* card background */
  --color-border:   #E4D7BE;  /* card borders */
  --color-text:     #5A4228;  /* body text */
  --color-heading:  #8A6538;  /* headings (4.9:1 on the background) */
  --color-gold:     #C8A46E;  /* accents and dividers only: too light for text */
  --color-button:   #8E3A3D;  /* button background (white text, 7.4:1) */
  --color-button-text: #FFFFFF;

  /* Fonts */
  --font-display: "Marcellus", Georgia, "Times New Roman", serif;
  --font-body: "Cormorant Garamond", Georgia, "Times New Roman", serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 2rem;
  --space-l: 4rem;
  --content-width: 46rem;
}

/* ---------- Base ---------- */

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

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1.25rem;     /* Cormorant runs small, so the base size is generous */
  font-weight: 500;
  line-height: 1.6;
}

[hidden] {
  display: none !important;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-heading);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  line-height: 1.3;
  margin: 0 0 var(--space-s);
}

h2 { font-size: 1.6rem; }
h3 { font-size: 1.1rem; }

p { margin: 0 0 var(--space-s); }

a {
  color: var(--color-button);
  text-underline-offset: 0.2em;
}

a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--color-button);
  outline-offset: 3px;
}

.centred { text-align: center; }

/* Thin gold divider under headings */
.divider {
  width: 4rem;
  height: 0;
  margin: 0 auto var(--space-m);
  border: 0;
  border-top: 1px solid var(--color-gold);
}

/* Visible only when focused by keyboard */
.skip-link {
  position: absolute;
  left: var(--space-s);
  top: -100px;
  z-index: 10;
  padding: var(--space-xs) var(--space-s);
  background: var(--color-card);
  border: 1px solid var(--color-border);
}

.skip-link:focus { top: var(--space-s); }

/* ---------- 1. Header ---------- */

.hero {
  padding: var(--space-m) var(--space-s) var(--space-l);
  text-align: center;
  background: var(--color-bg);
}

/* Home header: floral arch artwork with the names inside the arch. */
.hero--arch {
  padding: 0 0 var(--space-l);
}

.arch {
  display: grid;
  grid-template-columns: 100%;  /* the column never grows to fit the widened artwork */
  overflow: hidden;           /* crops the widened artwork on phones */
}

/* Artwork and text share the same grid cell, stacked on top of each other. */
.arch > * {
  grid-area: 1 / 1;
}

.arch-art {
  /* On phones the artwork is shown 150% wide and centred, so the arch is big
     enough to frame the names; the outer flowers are cropped off. */
  width: 150%;
  max-width: none;
  margin-left: -25%;
  /* Blends any white in the artwork into the cream page background. */
  mix-blend-mode: multiply;
}

.arch-text {
  position: relative;          /* keeps the text above the artwork */
  align-self: start;
  /* Padding in % is relative to the width, so the text starts just under the
     top of the arch at every screen size. */
  padding: 34% var(--space-s) 0;
}

/* Plain square couple photo, right below the arch. */
.hero-picture {
  display: block;
  width: calc(100% - 2 * var(--space-s));
  max-width: 28rem;
  aspect-ratio: 1 / 1;
  margin: var(--space-l) auto 0;
  object-fit: cover;          /* any photo is cropped to a square from the centre */
}

/* Shown until the real photo is added. */
.hero-picture--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-heading);
  letter-spacing: 0.15em;
}

.names {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  font-size: 2rem;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-m);
}

.names .amp {
  font-family: var(--font-body);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.6rem;
}

.names-small {
  font-family: var(--font-display);
  color: var(--color-heading);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 1.3rem;
  margin: 0;
}

.hero-meta {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 1rem;
}

/* Countdown: a big number between thin gold rules, small italic label below. */
.countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: var(--space-m) auto 0;
}

.countdown-number {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  color: var(--color-heading);
}

.countdown-number::before,
.countdown-number::after {
  content: "";
  width: 2rem;
  border-top: 1px solid var(--color-gold);
}

/* "Tomorrow!" / "Today!" are longer than a number, so set them smaller to fit phones. */
.countdown-word { font-size: 2rem; }

.countdown-label {
  margin-top: var(--space-xs);
  font-style: italic;
  font-size: 1.35rem;
  letter-spacing: 0.05em;
}

/* ---------- 2. Menu ---------- */

.site-nav {
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 var(--space-xs);
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-xs) var(--space-s);
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;           /* comfortable tap target */
  padding: 0 var(--space-xs);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--color-text);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--color-button);
  text-decoration: underline;
}

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

.section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-l) var(--space-s);
  scroll-margin-top: var(--space-s);
}

.prose {
  max-width: 36rem;
  margin: 0 auto;
}

.subheading { margin-top: var(--space-l); }

/* ---------- 3. Our Story ---------- */

.photo-placeholder,
.story-photo {
  width: 100%;
  max-width: 22rem;
  margin: 0 auto var(--space-m);
}

.photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  color: var(--color-heading);
  letter-spacing: 0.1em;
}

/* ---------- Cards (The Day, Travel & Stay) ---------- */

.cards {
  display: grid;
  grid-template-columns: 1fr;  /* stacked on phones */
  gap: var(--space-s);
}

.card {
  padding: var(--space-m) var(--space-s);
  background: var(--color-card);
  border: 1px solid var(--color-border);
  text-align: center;
}

.card p:last-child { margin-bottom: 0; }

.card-time {
  font-family: var(--font-display);
  letter-spacing: 0.1em;
}

.plain-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.plain-list li + li { margin-top: var(--space-xs); }

/* ---------- Timeline ---------- */

.timeline {
  max-width: 24rem;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  border-left: 1px solid var(--color-gold);
}

.timeline li {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-s);
  padding: 0 0 var(--space-s) var(--space-m);
}

/* Small gold dot on the line */
.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.6em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-gold);
}

.timeline-time {
  font-family: var(--font-display);
  color: var(--color-heading);
  letter-spacing: 0.1em;
  min-width: 5rem;
}

/* ---------- Button ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.6rem 2rem;
  background: var(--color-button);
  color: var(--color-button-text);
  font-family: var(--font-display);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  text-decoration: none;
  border-radius: 2px;
}

.button:hover { background: #7A3134; }

/* ---------- 7. Footer ---------- */

.site-footer {
  padding: var(--space-m) var(--space-s) var(--space-l);
  text-align: center;
  font-style: italic;
  font-size: 1.35rem;
}

/* ---------- 404 ---------- */

.not-found { min-height: 50vh; }

.not-found h1 { font-size: 1.6rem; }

/* ---------- Wider screens ---------- */

@media (min-width: 40rem) {
  .names {
    flex-direction: row;
    justify-content: center;
    gap: var(--space-s);
    font-size: 2.75rem;
  }

  /* Full-width artwork; the text block narrows to fit inside the arch. */
  .arch-art {
    width: 100%;
    margin-left: 0;
  }

  .arch-text {
    justify-self: center;
    width: 64%;
    padding-top: 22%;              /* clears the centre flower hanging from the arch */
  }

  .countdown-number { font-size: 3.75rem; }
  .countdown-word { font-size: 2.75rem; }

  .countdown-number::before,
  .countdown-number::after { width: 5rem; }

  /* Keep the menu in view once there is room for it on one line */
  .site-nav {
    position: sticky;
    top: 0;
    z-index: 5;
  }

  .section { scroll-margin-top: 4rem; }

  .cards { grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
}
