/* Colors and typography */
:root {
  --ink: #30382e;
  --soft: #51594b;
  --paper: #faf7ef;
  --edge: #ded8c9;
  --green: #3e4b3d;
  --serif: Georgia,'Times New Roman',serif;
}

/* Base styles and keyboard focus */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--serif);
}

a {
  color: inherit;
}

a:focus-visible,summary:focus-visible,button:focus-visible {
  outline: 2px solid #846741;
  outline-offset: 5px;
}

/* Header and navigation */
header {
  min-height: 84px;
  padding: 18px max(5vw,24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--edge);
}

.wordmark {
  text-decoration: none;
  font-size: 20px;
  line-height: 1.15;
}

.wordmark small,.eyebrow,.button,.nav,.caption,.number,footer small {
  font: 10px/1.5 system-ui,sans-serif;
  text-transform: uppercase;
  letter-spacing: .19em;
}

.wordmark small {
  display: block;
  margin-bottom: 4px;
}

.nav {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav a {
  text-decoration: none;
}

.nav a:hover,.subtle:hover {
  text-decoration: underline;
}

/* Homepage headline and illustration */
.hero {
  max-width: 1450px;
  margin: auto;
  padding: 55px 5vw 65px;
  display: grid;
  grid-template-columns: 1fr 1.13fr;
  gap: 5vw;
  align-items: center;
}

.hero h1 {
  font-size: clamp(49px,6vw,94px);
  line-height: .99;
  letter-spacing: -.064em;
  font-weight: 400;
  margin: 22px 0 26px;
}

.hero h1 em {
  color: #646c57;
  font-weight: 400;
}

.hero p {
  max-width: 385px;
  color: var(--soft);
  font-size: 19px;
}

.eyebrow {
  font-weight: 650;
  color: #565f4c;
}

.button {
  display: inline-block;
  margin-top: 13px;
  background: var(--green);
  color: white;
  text-decoration: none;
  padding: 15px 21px;
  border: 1px solid var(--green);
  cursor: pointer;
}

.button:hover {
  background: #2b372a;
}

.subtle {
  font-size: 15px;
  text-underline-offset: 4px;
  margin-left: 17px;
}

.hero figure {
  margin: 0;
}

.hero img {
  display: block;
  width: 100%;
  aspect-ratio: 1.12;
  object-fit: cover;
}

.caption {
  display: block;
  text-align: right;
  margin-top: 9px;
  color: var(--soft);
}

/* Condolence cards message */
.band {
  padding: 44px 24px;
  text-align: center;
  background: #ecece1;
  border-block: 1px solid #e2e1d5;
}

.band p {
  margin: 0;
  font-size: clamp(25px,3.3vw,43px);
  line-height: 1.22;
  letter-spacing: -.035em;
}

.band span {
  display: block;
  margin-top: 12px;
  color: var(--soft);
  font-size: 16px;
}

/* Shared section styles */
.section {
  max-width: 1130px;
  margin: auto;
  padding: 79px 30px;
}

.section h2 {
  font-size: clamp(36px,5vw,64px);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -.047em;
  margin: 12px 0 22px;
}

.section p {
  color: var(--soft);
  max-width: 53ch;
}

/* Inside the envelope */
.inside {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8vw;
}

.detail {
  border-top: 1px solid var(--edge);
  padding: 14px 0;
}

.detail h3 {
  font-size: 23px;
  font-weight: 400;
  margin: 0;
}

.detail p {
  margin: 4px 0 0;
}

.number {
  margin-right: 13px;
  color: #6c634f;
}

/* Sample letter excerpt */
.quote {
  background: #eee7d9;
  text-align: center;
  padding: 55px 22px;
}

.quote p {
  font-size: clamp(25px,4vw,46px);
  line-height: 1.25;
  max-width: 25ch;
  margin: 12px auto 19px;
  font-style: italic;
}

.quote button {
  font: inherit;
}

/* First-year gift and other offers */
.series {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8vw;
}

.series h3 {
  font-weight: 400;
  font-size: 25px;
  margin: 8px 0;
}

.series p {
  margin-top: 8px;
}

.series article+article {
  margin-top: 26px;
}

.series article {
  border-top: 1px solid var(--edge);
  padding-top: 12px;
}

/* Gift FAQ */
details {
  margin-top: 18px;
  border-top: 1px solid var(--edge);
  padding-top: 12px;
}

summary {
  cursor: pointer;
}

/* Footer */
footer {
  border-top: 1px solid var(--edge);
  padding: 30px max(5vw,24px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

/* Sample letter dialog */
dialog {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--edge);
  max-width: 540px;
  width: calc(100% - 38px);
  padding: 32px;
}

dialog::backdrop {
  background: #30382e88;
}

dialog button {
  float: right;
  background: none;
  border: 1px solid var(--edge);
  padding: 5px 12px;
  color: inherit;
  cursor: pointer;
}

dialog h2 {
  font-size: 34px;
  font-weight: 400;
  margin: 15px 0;
}

/* Mobile layout */
@media (max-width:770px) {
  .hero,.inside,.series {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .hero {
    padding: 38px 24px 43px;
  }
  .hero h1 {
    font-size: clamp(49px,10vw,75px);
  }
  .nav {
    gap: 15px;
  }
  .nav a:first-child {
    display: none;
  }
  .section {
    padding: 55px 24px;
  }
  .hero img {
    aspect-ratio: 1.23;
  }
  footer {
    align-items: start;
    flex-direction: column;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }
}
.nav-gift {
  margin-top: 0;
  padding: 10px 14px;
  text-align: center;
}
