/* Wedding website styling based on the Miles & Ellie invitation suite. */

:root {
  --teal: #064b5d;
  --teal-deep: #033b49;
  --cream: #fbf1df;
  --cream-light: #fffaf1;
  --olive: #687b43;
  --olive-deep: #52672f;
  --ink: #123f49;
  --line: rgba(104, 123, 67, 0.48);
  --shadow: rgba(3, 59, 73, 0.12);
  --max-width: 1080px;
  --radius: 2px;
  --heading-font: Baskerville, "Baskerville Old Face", "Libre Baskerville", Georgia, serif;
  --body-font: Baskerville, "Baskerville Old Face", "Libre Baskerville", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--body-font);
  font-size: 1.05rem;
  line-height: 1.65;
}

body::before {
  content: "";
  display: block;
  height: 12px;
  background: var(--teal);
}

a {
  color: var(--teal);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(6, 75, 93, 0.32);
  outline-offset: 3px;
}

.page-frame {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 48px;
}

.hero,
.content-section,
.info-card,
.panel,
.card,
.footer,
.rsvp-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 241, 0.72);
  box-shadow: 0 12px 30px var(--shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 62px 34px 54px;
  text-align: center;
}

.hero::before,
.hero::after,
.rsvp-form::before,
.rsvp-form::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  pointer-events: none;
  opacity: 0.8;
}

.hero::before,
.rsvp-form::before {
  top: 17px;
  left: 17px;
  border-top: 2px solid var(--olive);
  border-left: 2px solid var(--olive);
  border-radius: 24px 0 0;
}

.hero::after,
.rsvp-form::after {
  right: 17px;
  bottom: 17px;
  border-right: 2px solid var(--olive);
  border-bottom: 2px solid var(--olive);
  border-radius: 0 0 24px;
}

.eyebrow,
.hero-date,
.section-kicker,
.timeline-time,
.footer p,
label,
button,
.button,
h1,
h2,
h3 {
  font-family: var(--heading-font);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.eyebrow {
  margin: 0 0 24px;
  color: var(--olive-deep);
  font-size: 0.82rem;
}

.hero h1 {
  margin: 0;
  color: var(--teal);
  font-size: clamp(2.35rem, 7vw, 5.4rem);
  font-weight: 400;
  line-height: 1.12;
}

.hero h1 span {
  display: block;
}

.hero h1 span:nth-child(2) {
  margin: 0.12em 0;
  font-size: 0.72em;
}

.hero-date {
  margin: 28px 0 0;
  color: var(--teal);
  font-size: 0.9rem;
}

.hero-intro {
  max-width: 690px;
  margin: 30px auto 0;
  color: var(--olive-deep);
  font-style: italic;
  font-size: 1.12rem;
}

.hero-intro p {
  margin: 0;
}

main {
  display: grid;
  gap: 26px;
  margin-top: 26px;
}

.info-grid,
.card-grid,
.two-column {
  display: grid;
  gap: 20px;
}

.info-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info-card,
.panel,
.card {
  padding: 28px;
}

.content-section {
  padding: 34px;
}

h2,
h3 {
  color: var(--teal);
  font-weight: 400;
  line-height: 1.25;
}

.info-card h2,
.panel h3,
.card h3,
.timeline h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.info-card h2,
.section-heading h2 {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
}

.panel h3,
.card h3,
.timeline h3 {
  font-size: 1.08rem;
}

.panel h3:not(:first-child) {
  margin-top: 28px;
}

.info-value {
  margin: 0 0 8px;
  color: var(--olive-deep);
  font-style: italic;
  font-size: 1.12rem;
}

.section-heading {
  margin-bottom: 25px;
  text-align: center;
}

.section-heading::after {
  content: "";
  display: block;
  width: 78px;
  margin: 15px auto 0;
  border-top: 1px solid var(--olive);
}

.section-heading h2 {
  margin: 0;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--olive-deep);
  font-size: 0.75rem;
}

.timeline {
  display: grid;
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  align-items: start;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.timeline-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-time {
  margin: 0;
  color: var(--olive-deep);
  font-size: 0.8rem;
}

.timeline-item p {
  margin-top: 0;
}

.list {
  margin: 0;
  padding-left: 1.15rem;
}

.list li + li {
  margin-top: 8px;
}

.text-link {
  display: inline-block;
  color: var(--teal);
  text-decoration-color: var(--olive);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid var(--teal);
  border-radius: 0;
  background: transparent;
  color: var(--teal);
  text-decoration: none;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
  background: var(--teal);
  color: var(--cream-light);
}

.button-primary {
  margin-top: 14px;
  background: var(--teal);
  color: var(--cream-light);
}

.button-primary:hover {
  background: var(--teal-deep);
}

.muted {
  margin: 0;
  color: var(--olive-deep);
  font-style: italic;
}

.footer {
  margin-top: 26px;
  padding: 20px 24px;
  text-align: center;
}

.footer p {
  margin: 0;
  color: var(--olive-deep);
  font-size: 0.72rem;
}

.rsvp-page {
  display: grid;
  min-height: 100vh;
}

.form-frame {
  width: min(680px, calc(100% - 32px));
  margin: auto;
  padding: 46px 0;
}

.rsvp-form {
  position: relative;
  display: grid;
  gap: 22px;
  padding: 54px;
}

.form-field {
  display: grid;
  gap: 8px;
}

label {
  color: var(--teal);
  font-size: 0.78rem;
}

input,
select,
textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--olive);
  border-radius: 0;
  padding: 12px 4px;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

select {
  appearance: auto;
}

textarea {
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--olive);
  padding: 12px;
}

.rsvp-form button {
  justify-self: start;
  margin-top: 6px;
  background: var(--teal);
  color: var(--cream-light);
}

@media (max-width: 880px) {
  .info-grid,
  .card-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 115px 1fr;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }

  .page-frame {
    width: min(var(--max-width), calc(100% - 20px));
    padding-top: 18px;
  }

  .hero {
    padding: 48px 22px 40px;
  }

  .content-section,
  .info-card,
  .panel,
  .card {
    padding: 24px 20px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .form-frame {
    width: calc(100% - 20px);
    padding: 20px 0;
  }

  .rsvp-form {
    padding: 44px 22px;
  }

  .rsvp-form button,
  .button {
    width: 100%;
  }
}
