/* Hannah & Daniel — landing page
   Palette from the moodboard: fig, blood red, orange rust, tarragon, cream. */

:root {
  --cream:  #f5ece0;
  --fig:    #3b1730;
  --plum:   #2e1329;
  --blood:  #6e1521;
  --rust:   #b5502a;
  --olive:  #7f8a3c;

  --ink:        rgba(59, 23, 48, .85);
  --ink-soft:   rgba(59, 23, 48, .70);
  --rule:       rgba(59, 23, 48, .30);
  --rule-solid: rgba(59, 23, 48, .18);

  --serif:  Petrona, Georgia, "Times New Roman", serif;
  --display: Gloock, Petrona, Georgia, serif;          /* countdown numerals */
  --names:  "Caveat Brush", Caveat, "Segoe Script", cursive;  /* the couple's names */
  --hand:   Caveat, "Segoe Script", cursive;

  --pad: 44px;          /* horizontal padding inside the sheet */
  --sheet: 1120px;
}

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

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

body {
  margin: 0;
  background: var(--plum);
  color: var(--fig);
  font-family: var(--serif);
  font-weight: 400;
}

img { max-width: 100%; }

a { color: inherit; text-decoration: none; }
a:hover { opacity: .72; }
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-radius: 2px;
}

.sheet {
  max-width: var(--sheet);
  margin: 0 auto;
  background: var(--cream);
  overflow: hidden;
  /* Fill the window so the cream never stops short and leaves a plum band. */
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  /* Cream gap above the painting, as a % of WIDTH so it scales with the sheet.
     It has to be padding, not a margin on the wrapper: a top margin there
     collapses out through .hero and drags the whole block down, image and
     title together, which moves nothing relative to anything. Padding pushes
     the in-flow image down while the absolutely-positioned topbar and title
     stay pinned to the top edge of the padding box. */
  --art-drop: 4%;
  padding-top: var(--art-drop);
}

.hero__art-wrap { position: relative; }

.hero__art {
  display: block;
  width: 100%;
  height: auto;
}

/* Cream wash so the ink reads against the sky. */
.hero__wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg,
    rgba(245, 236, 224, .92) 0%,
    rgba(245, 236, 224, .55) 26%,
    rgba(245, 236, 224, 0)   46%);
  pointer-events: none;
}

/* topbar and hero__title are offset with margin-top, not top. Percentage
   margins resolve against the containing block's WIDTH, percentage `top`
   against its HEIGHT — using `top` here is what made both sit wrong, and it
   would break again every time the art gap changes. */
.topbar {
  position: absolute;
  z-index: 3;          /* above .hero__title, so the open mobile menu is not covered */
  top: 0;
  margin-top: 1.8%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 0 var(--pad);
  font-family: var(--hand);
}

.topbar__names {
  font-size: clamp(18px, 2.3vw, 23px);
  color: var(--blood);
  white-space: nowrap;
}

.topbar__toggle { display: none; }

.topbar__links {
  display: flex;
  gap: clamp(12px, 2vw, 20px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(16px, 2.1vw, 21px);
  color: var(--ink-soft);
}

.topbar__links .is-rsvp { color: var(--rust); }

.hero__title {
  position: absolute;
  z-index: 2;
  top: 0;
  margin-top: 6.4%;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 16px;
}

.hero__title h1 {
  margin: 0;
  font-family: var(--names);
  font-weight: 400;
  /* Caveat Brush sits optically smaller than Gloock did at the same size, so
     this runs larger to hold the same weight in the composition. */
  font-size: clamp(40px, 8vw, 80px);
  line-height: 1;
  color: var(--fig);
}

.hero__title h1 span { color: var(--blood); }

.hero__date {
  margin: 6px 0 0;
  font-family: var(--hand);
  font-size: clamp(16px, 2.5vw, 25px);
  color: var(--blood);
}

.hero__venue-short { display: none; }

/* ---------- countdown ---------- */

.countdown {
  margin: 0;
  padding: 18px var(--pad) 0;
  text-align: center;
  font-family: var(--hand);
  font-size: clamp(18px, 2.3vw, 23px);
  line-height: 1.45;
  color: var(--ink-soft);
}

.countdown .num {
  font-family: var(--display);
  font-size: clamp(21px, 2.7vw, 27px);
  color: var(--blood);
  font-variant-numeric: tabular-nums;
}

/* ---------- details ---------- */

.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--pad);
  align-items: center;
  margin: 22px var(--pad) 0;
  padding-top: 24px;
  border-top: 1px dashed var(--rule);
}

.details__blurb {
  margin: 0;
  font-size: clamp(16px, 1.9vw, 20px);
  line-height: 1.6;
  color: var(--ink);
}

.details__rsvp {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.details__by {
  margin: 0;
  font-family: var(--hand);
  font-size: clamp(16px, 1.9vw, 20px);
  line-height: 1.25;
  color: var(--olive);
  text-align: right;
}

.btn {
  display: inline-block;
  background: var(--blood);
  color: var(--cream);
  padding: 15px 34px;
  font-family: var(--hand);
  font-size: clamp(20px, 2.4vw, 25px);
  line-height: 1;
  white-space: nowrap;
  transition: background .18s ease;
}

.btn:hover { background: #821827; opacity: 1; }

/* ---------- jump links ---------- */

.jump {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 26px var(--pad) 0;
  padding: 18px 0 34px;
  border-top: 1px solid var(--rule-solid);
  font-family: var(--hand);
  font-size: clamp(18px, 2.1vw, 22px);
  color: var(--blood);
}

/* ---------- mobile ---------- */

@media (max-width: 700px) {
  :root { --pad: 18px; }

  .hero { --art-drop: 5%; }

  /* Shorter hero, so the title block sits proportionally deeper — the wash has
     to reach past the porch cornice for the handwritten date to read. */
  .hero__wash {
    background: linear-gradient(180deg,
      rgba(245, 236, 224, .94) 0%,
      rgba(245, 236, 224, .72) 30%,
      rgba(245, 236, 224, .45) 48%,
      rgba(245, 236, 224, 0)   66%);
  }

  .topbar {
    margin-top: 2.6%;
    align-items: center;
  }

  .topbar__names { font-size: 19px; }

  .topbar__toggle {
    display: block;
    width: 44px;
    height: 44px;
    margin: -10px -10px -10px 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 22px;
    line-height: 1;
    color: var(--blood);
    text-align: right;
    cursor: pointer;
  }

  .topbar__links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: var(--pad);
    flex-direction: column;
    gap: 10px;
    padding: 14px 20px;
    background: var(--cream);
    box-shadow: 0 6px 24px rgba(46, 19, 41, .18);
    font-size: 20px;
    text-align: right;
  }

  .topbar__links.is-open { display: flex; }

  .hero__title { margin-top: 11.3%; }

  .hero__title h1 { font-size: clamp(30px, 9.8vw, 40px); line-height: 1.05; }

  .hero__date { margin-top: 2px; font-size: clamp(13px, 4.2vw, 17px); }

  .hero__venue-long  { display: none; }
  .hero__venue-short { display: inline; }

  .countdown {
    padding-top: 14px;
    font-size: 18px;
    line-height: 1.5;
  }
  .countdown .num { font-size: 21px; }

  .details {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 16px;
    padding-top: 14px;
  }

  .details__blurb { font-size: 16px; line-height: 1.55; }

  /* The design collapses the note and the button into one full-width bar. */
  .details__rsvp { display: block; }
  .details__by { display: none; }

  .btn {
    display: block;
    padding: 14px;
    text-align: center;
    font-size: 23px;
  }
  .btn::after { content: " — by the first of august"; }

  .jump {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 14px;
    padding: 14px 0 22px;
    font-size: 20px;
  }
}

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