/* Lucy & Rob — wedding website
   Tokens come from the "Rob & Lucy" design system: burgundy ink on ivory paper, set in Rector. */

/* Rector is a licensed typeface. Drop your licensed files into /fonts using these names
   and they'll be picked up automatically; until then the Georgia fallback is used. */
@font-face { font-family: 'Rector Medium'; src: local('Rector Medium'), url('fonts/rector-medium.woff2') format('woff2'), url('fonts/rector-medium.otf') format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Rector Light'; src: local('Rector Light'), url('fonts/rector-light.woff2') format('woff2'), url('fonts/rector-light.otf') format('opentype'); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Rector'; src: local('Rector'), url('fonts/rector-regular.woff2') format('woff2'), url('fonts/rector-regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --burgundy: #82171d;
  --burgundy-deep: #5c0f14;
  --paper: #f4efe0;

  --line: rgba(130, 23, 29, 0.2);
  --wash: rgba(130, 23, 29, 0.05);
  --muted: rgba(130, 23, 29, 0.8);

  --font-display: 'Rector Medium', Georgia, 'Times New Roman', serif;
  --font-accent: 'Rector Light', Georgia, 'Times New Roman', serif;
  --font-text: 'Rector', Georgia, 'Times New Roman', serif;

  --gutter: 28px;
  --section-pad: 56px;
  --column: 640px;
}

@media (min-width: 720px) {
  :root {
    --section-pad: 88px;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 64px; /* clear the sticky nav when jumping to a section */
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--burgundy);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--burgundy); }
a:hover { color: var(--burgundy-deep); }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

p { margin: 0; }

/* ---------- Shared type ---------- */

.label {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.italic {
  font-family: var(--font-accent);
  font-weight: 300;
  font-style: italic;
}

.link {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: underline;
}

.todo { color: var(--muted); }

@media (min-width: 720px) {
  body { font-size: 16px; }
  .label { font-size: 15px; letter-spacing: 0.16em; }
  .link { font-size: 14px; }
}

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

.section {
  padding: var(--section-pad) var(--gutter);
}

.section--wash { background: var(--wash); }

.section__inner {
  width: 100%;
  max-width: var(--column);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section__inner--roomy { gap: 24px; }

.section__lede {
  font-size: 15px;
  line-height: 1.6;
}

@media (min-width: 720px) {
  .section__lede { font-size: 17px; line-height: 1.7; }
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  overflow-x: auto;
  white-space: nowrap;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav a {
  display: inline-block;
  padding: 4px 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

.nav .long { display: none; }

@media (min-width: 720px) {
  .nav { justify-content: center; gap: 32px; padding: 22px 20px; }
  .nav a { font-size: 12px; letter-spacing: 0.14em; }
  .nav .long { display: inline; }
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 64px var(--gutter) 56px;
  text-align: center;
  background: var(--burgundy);
  color: var(--paper);
}

.hero__eyebrow {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.hero__names {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 7.6vw, 60px);
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.hero__names span { display: block; }

.hero__rule {
  width: 60px;
  height: 3px;
  background: var(--paper);
}

.hero__date {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.06em;
}

.hero__where {
  font-size: 15px;
  line-height: 1.6;
}
.hero__where span { display: block; }
.hero__where .sep { display: none; }

@media (min-width: 720px) {
  .hero { gap: 24px; padding: 100px var(--gutter) 88px; }
  .hero__eyebrow { font-size: 20px; }
  .hero__names span { display: inline; }
  .hero__rule { width: 72px; }
  .hero__date { font-size: 20px; }
  .hero__where { font-size: 17px; line-height: 1.7; }
  .hero__where span { display: inline; }
  .hero__where .sep { display: inline; }
}

/* ---------- The day ---------- */

.schedule {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.schedule li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.schedule time,
.schedule .when {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.schedule li > span:last-child { text-align: right; }

@media (min-width: 720px) {
  .schedule li { padding: 14px 0; font-size: 15px; }
}

/* ---------- Venue ---------- */

.venue__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
}

.venue__address {
  font-size: 14px;
  line-height: 1.6;
}

.map {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 220px;
  background: var(--wash);
  border: 1px dashed rgba(130, 23, 29, 0.4);
  border-radius: 4px;
  font-size: 13px;
  color: var(--muted);
}

@media (min-width: 720px) {
  .venue__name { font-size: 22px; }
  .venue__address { font-size: 15px; }
  .map { height: 280px; font-size: 14px; }
}

/* ---------- Travel ---------- */

.travel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.travel h3,
.hotel h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (min-width: 720px) {
  .travel { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
  .travel h3 { margin-bottom: 8px; }
}

/* ---------- Stay ---------- */

.hotels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.hotel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.6;
}

.hotel h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}

.hotel .todo { font-size: 13px; }

@media (min-width: 720px) {
  .hotels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hotel { gap: 10px; padding: 24px; }
  .hotel h3 { font-size: 16px; }
}

/* ---------- RSVP ---------- */

.rsvp {
  background: var(--burgundy);
  color: var(--paper);
  padding: var(--section-pad) var(--gutter) 64px;
}

.rsvp .section__inner { max-width: 480px; gap: 20px; }

.rsvp strong { font-weight: 700; }

.form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--paper);
  color: var(--burgundy);
  border: 1px solid var(--paper);
  border-radius: 2px;
  font-family: var(--font-text);
  font-size: 16px; /* 16px stops iOS zooming into the field */
}

.field textarea { resize: vertical; }

.rsvp :focus-visible { outline-color: var(--paper); }

.form__submit {
  min-height: 44px;
  padding: 16px 20px;
  background: var(--paper);
  color: var(--burgundy);
  border: 0;
  border-radius: 2px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.form__submit:hover { background: #fff; }
.form__submit[disabled] { opacity: 0.6; cursor: progress; }

.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__status {
  min-height: 1.6em;
  font-size: 15px;
}

@media (min-width: 720px) {
  .rsvp { padding-bottom: 96px; }
  .rsvp .section__inner { gap: 22px; }
  .form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form .field--wide,
  .form .form__submit,
  .form .form__status { grid-column: 1 / -1; }
}

/* ---------- Dress code ---------- */

.dress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 64px var(--gutter);
  text-align: center;
}

.dress__word {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 6vw, 72px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dress p:last-child { max-width: 420px; }

@media (min-width: 720px) {
  .dress { gap: 18px; padding: 96px var(--gutter); }
}

/* ---------- FAQs ---------- */

.faq { padding-bottom: 72px; }

.faq .label { margin-bottom: 20px; }

.faq details {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; }
.faq details[open] > summary::after { content: '–'; }

.faq details p {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
}

@media (min-width: 720px) {
  .faq { padding-bottom: 120px; }
  .faq .label { margin-bottom: 24px; }
  .faq details { padding: 18px 0; }
  .faq summary { gap: 16px; font-size: 16px; }
  .faq details p { margin-top: 14px; font-size: 15px; line-height: 1.7; }
}

/* ---------- Sign-off ---------- */

.signoff {
  padding: 40px var(--gutter) 64px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

@media (min-width: 720px) {
  .signoff { padding: 56px var(--gutter) 88px; font-size: 15px; }
}
