:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #5c6b65;
  --paper: #f6f8f6;
  --white: #ffffff;
  --green: #14322d;
  --green-soft: #d8e8e3;
  --coral: #c95348;
  --gold: #efb85f;
  --line: #cbd5d1;
  --content: 1180px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 30;
  padding: 10px 14px;
  background: var(--white);
  border-radius: 4px;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 10;
  display: flex;
  width: min(calc(100% - 48px), var(--content));
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  transform: translateX(-50%);
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.brand span {
  color: var(--gold);
}

nav {
  display: flex;
  gap: 28px;
}

nav a {
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.hero {
  position: relative;
  display: flex;
  min-height: 86svh;
  max-height: 900px;
  align-items: flex-end;
  overflow: hidden;
  background-color: var(--green);
  background-image: url("assets/hero.jpg");
  background-position: center 56%;
  background-size: cover;
  color: var(--white);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 15, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
  padding: 120px 0 76px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-eyebrow {
  color: var(--gold);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 92px;
  line-height: 0.95;
}

.hero-copy {
  max-width: 620px;
  margin: 28px 0 0;
  font-size: 22px;
  line-height: 1.55;
}

.hero-status {
  margin: 18px 0 0;
  color: #dce7e3;
  font-size: 15px;
}

.hero-link {
  display: inline-flex;
  min-height: 44px;
  margin-top: 34px;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
}

.section-inner {
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
}

.time-section {
  padding: 100px 0;
  background: var(--paper);
}

.time-layout,
.wishes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
  gap: 96px;
  align-items: center;
}

.section-copy h2,
.letter-copy h2 {
  margin: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 46px;
  line-height: 1.2;
}

.section-copy > p:last-of-type,
.letter-copy > p:last-child {
  max-width: 560px;
  margin: 24px 0 0;
  color: var(--muted);
}

.date-form {
  margin-top: 42px;
}

.date-form label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
}

.date-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

.date-controls input,
.date-controls button {
  min-height: 48px;
  border-radius: 4px;
}

.date-controls input {
  width: 100%;
  padding: 0 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.date-controls button {
  padding: 0 18px;
  color: var(--white);
  font-weight: 700;
  cursor: pointer;
  background: var(--coral);
  border: 1px solid var(--coral);
}

.date-controls button:hover {
  background: #ad4037;
  border-color: #ad4037;
}

.text-button {
  min-height: 40px;
  margin-top: 10px;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.counter {
  min-height: 310px;
  padding: 38px 0 38px 64px;
  border-left: 1px solid var(--line);
}

.counter-label {
  color: var(--muted);
  font-size: 15px;
}

.counter-value {
  display: flex;
  min-height: 132px;
  align-items: baseline;
  gap: 12px;
}

.counter-value strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 108px;
  line-height: 1.15;
  color: var(--green);
}

.counter-value span {
  font-size: 18px;
  font-weight: 700;
}

.counter time {
  display: block;
  min-height: 26px;
  color: var(--muted);
}

.wishes-section {
  padding: 100px 0;
  color: var(--white);
  background: var(--green);
}

.light-copy .eyebrow {
  color: var(--gold);
}

.light-copy > p:last-of-type {
  color: #c7d8d2;
}

.wish-list {
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.wish-item {
  display: grid;
  min-height: 66px;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.wish-item input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--gold);
}

.wish-item:has(input:checked) span {
  color: #a8bbb4;
  text-decoration: line-through;
}

.light-button {
  color: #c7d8d2;
}

.letter-section {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  min-height: 680px;
  background: var(--green-soft);
}

.memory-photo {
  min-height: 680px;
  margin: 0;
  overflow: hidden;
}

.memory-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
}

.letter-copy {
  display: flex;
  max-width: 700px;
  padding: 96px 72px;
  flex-direction: column;
  justify-content: center;
}

.letter-copy blockquote {
  margin: 42px 0 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: 28px;
  line-height: 1.75;
}

footer {
  display: grid;
  min-height: 150px;
  width: min(calc(100% - 48px), var(--content));
  margin: 0 auto;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

footer p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

footer p:last-child {
  justify-self: end;
}

.footer-brand {
  color: var(--green);
}

@media (max-width: 820px) {
  .site-header {
    width: min(calc(100% - 32px), var(--content));
  }

  nav {
    gap: 18px;
  }

  .hero {
    min-height: 84svh;
    background-position: center 52%;
  }

  .hero-content,
  .section-inner,
  footer {
    width: min(calc(100% - 32px), var(--content));
  }

  .hero-content {
    padding-bottom: 54px;
  }

  .hero h1 {
    font-size: 58px;
  }

  .hero-copy {
    font-size: 19px;
  }

  .time-section,
  .wishes-section {
    padding: 72px 0;
  }

  .time-layout,
  .wishes-layout {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .section-copy h2,
  .letter-copy h2 {
    font-size: 38px;
  }

  .counter {
    min-height: 250px;
    padding: 36px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .counter-value strong {
    font-size: 82px;
  }

  .letter-section {
    grid-template-columns: 1fr;
  }

  .memory-photo {
    min-height: 520px;
    max-height: 72svh;
  }

  .letter-copy {
    padding: 72px 24px;
  }

  .letter-copy blockquote {
    font-size: 24px;
  }

  footer {
    min-height: 190px;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 12px;
  }

  footer p:last-child {
    justify-self: start;
  }
}

@media (max-width: 480px) {
  nav a:nth-child(2) {
    display: none;
  }

  .hero h1 {
    font-size: 52px;
  }

  .hero-copy {
    max-width: 320px;
    font-size: 17px;
  }

  .date-controls {
    grid-template-columns: 1fr;
  }

  .date-controls button {
    width: 100%;
  }

  .counter-value strong {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 68px;
  }

  .memory-photo {
    min-height: 440px;
  }
}

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