:root {
  --ink: #302b2a;
  --muted: #837975;
  --paper: #fbf7f3;
  --paper-deep: #f3e8e2;
  --rose: #b45e62;
  --rose-dark: #8e4148;
  --rose-light: #dfaaa4;
  --line: rgba(103, 72, 67, 0.18);
  --serif: "Iowan Old Style", "Baskerville", "Times New Roman", "Noto Serif SC", serif;
  --sans: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

button,
input,
textarea {
  font: inherit;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 42vw;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  top: -18vw;
  right: -13vw;
  background: radial-gradient(circle, rgba(218, 159, 153, 0.22), transparent 68%);
}

.ambient-two {
  bottom: 8vh;
  left: -23vw;
  background: radial-gradient(circle, rgba(226, 190, 166, 0.22), transparent 67%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: 0.025;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

.site-header {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(1180px, calc(100% - 64px));
  height: 96px;
  transform: translateX(-50%);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  width: max-content;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: white;
  font-size: 12px;
  border-radius: 50% 50% 48% 52%;
  background: var(--rose);
  transform: rotate(-6deg);
  box-shadow: 0 6px 18px rgba(180, 94, 98, 0.25);
}

.nav-links {
  display: flex;
  gap: 42px;
  color: var(--muted);
  font-size: 13px;
}

.nav-links a {
  position: relative;
  transition: color 180ms ease;
}

.nav-links a::after {
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 0;
  height: 1px;
  content: "";
  background: var(--rose);
  transition: 180ms ease;
}

.nav-links a:hover {
  color: var(--rose-dark);
}

.nav-links a:hover::after {
  left: 0;
  width: 100%;
}

.text-button {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
  padding: 10px 0;
  color: var(--rose-dark);
  font-size: 13px;
  border: 0;
  border-bottom: 1px solid rgba(180, 94, 98, 0.35);
  background: transparent;
  cursor: pointer;
}

.text-button svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: center;
  width: min(1180px, calc(100% - 64px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 134px 0 95px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin: 0 0 24px;
  color: var(--rose);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.34em;
}

.eyebrow.left {
  justify-content: flex-start;
}

.eyebrow span {
  display: block;
  width: 34px;
  height: 1px;
  background: var(--rose-light);
}

.hero .eyebrow {
  justify-content: flex-start;
}

.hero h1 {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 20px;
  align-items: baseline;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(54px, 7.5vw, 104px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.ampersand {
  color: var(--rose);
  font-size: 0.66em;
  font-style: italic;
  font-weight: 400;
}

.love-note {
  margin: 30px 0 42px;
  color: var(--muted);
  font-family: var(--serif);
  font-size: clamp(17px, 1.6vw, 21px);
  letter-spacing: 0.06em;
}

.counter {
  display: flex;
  align-items: flex-end;
  width: max-content;
  padding: 22px 30px 19px;
  border: 1px solid rgba(180, 94, 98, 0.18);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 22px 60px rgba(99, 65, 60, 0.08);
  backdrop-filter: blur(12px);
}

.counter-item {
  min-width: 68px;
  text-align: center;
}

.counter-item strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(30px, 3.1vw, 42px);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.counter-primary {
  min-width: 94px;
}

.counter-primary strong {
  color: var(--rose-dark);
}

.counter-item span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.counter-divider {
  margin: 0 6px 22px;
  color: var(--rose-light);
  font-family: var(--serif);
}

.since-line {
  margin: 17px 0 0 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.since-line time {
  color: var(--rose-dark);
}

.orbit-wrap {
  position: relative;
  justify-self: end;
  width: min(39vw, 490px);
  aspect-ratio: 1;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(180, 94, 98, 0.2);
  border-radius: 50%;
}

.orbit-outer {
  inset: 0;
  animation: rotate 32s linear infinite;
}

.orbit-outer::before,
.orbit-outer::after {
  position: absolute;
  width: 7px;
  height: 7px;
  content: "";
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 1px rgba(180, 94, 98, 0.2);
}

.orbit-outer::before {
  top: 10%;
  left: 20%;
}

.orbit-outer::after {
  right: 4%;
  bottom: 30%;
}

.orbit-inner {
  inset: 13%;
  border-style: dashed;
  opacity: 0.65;
  animation: rotate-reverse 40s linear infinite;
}

.orbit-dot {
  position: absolute;
  inset: 6%;
  border: 1px dotted rgba(180, 94, 98, 0.16);
  border-radius: 50%;
}

.heart-core {
  position: absolute;
  inset: 26%;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 24px 26px rgba(124, 55, 61, 0.24));
  animation: breathe 4s ease-in-out infinite;
}

.heart-core svg {
  position: absolute;
  width: 100%;
  overflow: visible;
  fill: var(--rose);
}

.heart-core span {
  z-index: 1;
  margin-top: -3%;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--serif);
  font-size: clamp(11px, 1.2vw, 16px);
  letter-spacing: 0.34em;
}

.orbit-label {
  position: absolute;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 11px;
  font-style: italic;
  letter-spacing: 0.12em;
}

.orbit-label-one {
  top: 14%;
  right: 1%;
  transform: rotate(28deg);
}

.orbit-label-two {
  bottom: 11%;
  left: 4%;
  transform: rotate(26deg);
}

.scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.28em;
  transform: translateX(-50%);
}

.scroll-cue i {
  position: relative;
  width: 1px;
  height: 30px;
  overflow: hidden;
  background: var(--line);
}

.scroll-cue i::after {
  position: absolute;
  top: -100%;
  width: 100%;
  height: 60%;
  content: "";
  background: var(--rose);
  animation: scroll-line 2s ease-in-out infinite;
}

.section-shell {
  width: min(1180px, calc(100% - 64px));
  margin: 0 auto;
}

.story {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 30px 58px;
  padding: 130px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  align-self: center;
}

.section-heading h2,
.milestone-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 66px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.section-heading > p:last-child,
.milestone-heading > p:last-child {
  max-width: 500px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 2;
}

.anniversary-card,
.promise-card {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 22px 70px rgba(99, 65, 60, 0.065);
}

.anniversary-card {
  padding: 34px;
}

.card-topline,
.progress-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-topline {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.tiny-heart {
  color: var(--rose);
}

.anniversary-main {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 32px 0 30px;
}

.anniversary-main div {
  display: flex;
  gap: 9px;
  align-items: baseline;
}

.anniversary-main strong {
  color: var(--rose-dark);
  font-family: var(--serif);
  font-size: 64px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 0.8;
}

.anniversary-main div span {
  color: var(--muted);
  font-size: 11px;
}

.anniversary-main p {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
}

.progress-track {
  height: 3px;
  overflow: hidden;
  background: var(--paper-deep);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--rose-light), var(--rose-dark));
  transition: width 700ms ease;
}

.progress-labels {
  margin-top: 13px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.promise-card {
  position: relative;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 34px;
  align-items: center;
  margin-top: 30px;
  padding: 42px 55px;
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 20%, rgba(218, 159, 153, 0.2), transparent 28%),
    rgba(255, 255, 255, 0.4);
}

.promise-card::after {
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 250px;
  height: 250px;
  content: "";
  border: 1px solid rgba(180, 94, 98, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(180, 94, 98, 0.035), 0 0 0 56px rgba(180, 94, 98, 0.025);
}

.quote-mark {
  align-self: start;
  color: var(--rose-light);
  font-family: Georgia, serif;
  font-size: 82px;
  line-height: 0.78;
}

.promise-card blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.8vw, 35px);
  line-height: 1.65;
  letter-spacing: 0.04em;
  white-space: pre-line;
}

.signature {
  z-index: 1;
  display: flex;
  gap: 15px;
  align-items: center;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  font-style: italic;
  white-space: nowrap;
}

.signature span {
  width: 34px;
  height: 1px;
  background: var(--rose-light);
}

.milestones {
  padding: 130px 0 150px;
  border-top: 1px solid var(--line);
}

.milestone-heading {
  text-align: center;
}

.milestone-heading > p:last-child {
  margin-right: auto;
  margin-left: auto;
}

.milestone-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 72px;
}

.milestone-grid::before {
  position: absolute;
  top: 31px;
  right: 11%;
  left: 11%;
  z-index: -1;
  height: 1px;
  content: "";
  background: var(--line);
}

.milestone-item {
  min-width: 0;
  padding: 0 18px 28px;
  text-align: center;
  border: 1px solid transparent;
  transition: 200ms ease;
}

.milestone-item:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-4px);
}

.milestone-dot {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 25px;
  color: var(--rose);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
}

.milestone-item.is-past .milestone-dot {
  color: white;
  border-color: var(--rose);
  background: var(--rose);
  box-shadow: 0 8px 26px rgba(180, 94, 98, 0.23);
}

.milestone-dot svg {
  width: 20px;
  fill: currentColor;
}

.milestone-item strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
}

.milestone-item time {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 12px;
  font-style: italic;
}

.milestone-status {
  display: block;
  margin-top: 17px;
  color: var(--rose-dark);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.milestone-item:not(.is-past) .milestone-status {
  color: var(--muted);
}

.site-footer {
  padding: 52px 24px 58px;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  background: #382f2e;
}

.footer-heart {
  margin-bottom: 15px;
  color: var(--rose-light);
  font-size: 17px;
}

.site-footer p {
  margin: 0 0 11px;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.04em;
}

.site-footer small {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.settings-dialog {
  width: min(590px, calc(100% - 32px));
  max-height: min(760px, calc(100svh - 32px));
  padding: 0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(53, 38, 36, 0.25);
}

.settings-dialog::backdrop {
  background: rgba(48, 43, 42, 0.5);
  backdrop-filter: blur(6px);
}

.settings-dialog[open] {
  animation: dialog-in 220ms ease-out;
}

.settings-dialog form {
  padding: 38px 42px 30px;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 30px;
}

.dialog-heading .eyebrow {
  margin-bottom: 10px;
}

.dialog-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
}

.icon-button {
  width: 34px;
  height: 34px;
  color: var(--muted);
  font-size: 25px;
  font-weight: 200;
  border: 0;
  border-radius: 50%;
  background: var(--paper-deep);
  cursor: pointer;
}

.form-row {
  display: block;
  margin-bottom: 20px;
}

.form-row.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-row label > span,
label.form-row > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: none;
  background: rgba(255, 255, 255, 0.6);
  transition: 160ms ease;
}

.form-row textarea {
  resize: vertical;
  line-height: 1.6;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--rose-light);
  box-shadow: 0 0 0 3px rgba(180, 94, 98, 0.08);
}

.dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 30px;
}

.button-primary,
.button-secondary {
  padding: 12px 18px;
  border: 1px solid var(--rose);
  border-radius: 2px;
  cursor: pointer;
}

.button-primary {
  min-width: 150px;
  color: white;
  background: var(--rose);
}

.button-primary:hover {
  background: var(--rose-dark);
}

.button-secondary {
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}

.privacy-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  padding: 13px 18px;
  color: white;
  font-size: 12px;
  border-radius: 3px;
  background: var(--rose-dark);
  box-shadow: 0 14px 35px rgba(73, 40, 42, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 220ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

@keyframes rotate-reverse {
  to { transform: rotate(-360deg); }
}

@keyframes breathe {
  0%, 100% { transform: scale(0.96); }
  50% { transform: scale(1.03); }
}

@keyframes scroll-line {
  0% { top: -70%; }
  70%, 100% { top: 120%; }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 145px;
    text-align: center;
  }

  .hero .eyebrow,
  .hero h1 {
    justify-content: center;
  }

  .counter {
    margin: 0 auto;
  }

  .orbit-wrap {
    display: none;
  }

  .story {
    grid-template-columns: 1fr;
  }

  .section-heading {
    margin-bottom: 35px;
  }

  .promise-card {
    grid-template-columns: auto 1fr;
  }

  .signature {
    grid-column: 2;
  }

  .milestone-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 42px;
  }

  .milestone-grid::before {
    display: none;
  }
}

@media (max-width: 620px) {
  .site-header,
  .hero,
  .section-shell {
    width: min(100% - 36px, 1180px);
  }

  .site-header {
    height: 78px;
  }

  .text-button {
    font-size: 0;
  }

  .text-button svg {
    width: 20px;
  }

  .hero {
    min-height: 840px;
    padding-top: 125px;
  }

  .hero h1 {
    gap: 2px 12px;
    font-size: clamp(47px, 16vw, 68px);
  }

  .love-note {
    margin: 26px 0 34px;
    font-size: 16px;
  }

  .counter {
    width: 100%;
    padding: 20px 10px 17px;
  }

  .counter-item,
  .counter-primary {
    flex: 1;
    min-width: 0;
  }

  .counter-item strong {
    font-size: 29px;
  }

  .counter-divider {
    margin-right: 1px;
    margin-left: 1px;
  }

  .since-line {
    line-height: 1.6;
  }

  .scroll-cue {
    bottom: 20px;
  }

  .story,
  .milestones {
    padding-top: 92px;
    padding-bottom: 92px;
  }

  .section-heading h2,
  .milestone-heading h2 {
    font-size: 39px;
  }

  .anniversary-card {
    padding: 27px 22px;
  }

  .anniversary-main {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .anniversary-main strong {
    font-size: 56px;
  }

  .promise-card {
    gap: 10px 17px;
    padding: 34px 24px;
  }

  .quote-mark {
    font-size: 53px;
  }

  .promise-card blockquote {
    font-size: 21px;
  }

  .signature {
    margin-top: 12px;
  }

  .milestone-grid {
    grid-template-columns: 1fr 1fr;
    gap: 35px 4px;
    margin-top: 54px;
  }

  .milestone-item {
    padding-right: 5px;
    padding-left: 5px;
  }

  .settings-dialog form {
    padding: 29px 22px 24px;
  }

  .form-row.two-columns {
    grid-template-columns: 1fr;
  }

  .dialog-actions {
    flex-direction: column-reverse;
  }

  .button-primary,
  .button-secondary {
    width: 100%;
  }

  .privacy-note {
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
