:root {
  --night: #172039;
  --paper: #f5f1ea;
  --ink: #253047;
  --body: #515a68;
  --warm: #875043;
  --line: rgba(37, 48, 71, .14);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--warm);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 12px;
  padding: .8rem 1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: white;
  background: var(--ink);
  font-size: .85rem;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform .2s ease;
}

.skip-link:focus { transform: none; }

header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  height: 76px;
  padding: 0 clamp(22px, 5vw, 72px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: #f7f4ef;
  border-bottom: 1px solid rgba(255, 255, 255, .13);
}

header p,
header > a:last-child {
  margin: 0;
  color: rgba(255, 255, 255, .68);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

header > a:last-child {
  justify-self: end;
  min-height: 44px;
  padding: .9rem .5rem;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand {
  width: max-content;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 56px;
  height: auto;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  padding: 120px 24px 80px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #f7f4ef;
  text-align: center;
  background: var(--night);
}

.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    linear-gradient(rgba(13, 22, 42, .28), rgba(24, 33, 56, .7)),
    linear-gradient(0deg, rgba(144, 103, 102, .35), transparent 45%),
    url("night-sky-optimized.jpg") center / cover;
  animation: sky 22s ease-in-out infinite alternate;
}

.hero-content {
  width: min(100%, 760px);
}

.eyebrow {
  margin: 0 0 1.6rem;
  color: var(--warm);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.hero .eyebrow { color: #e1b49d; }

h1,
h2,
h3,
blockquote,
.central-thought,
.thanks strong {
  font-family: var(--serif);
  font-weight: 400;
}

h1 {
  margin: 0;
  font-size: clamp(4rem, 8vw, 7.5rem);
  line-height: .95;
  letter-spacing: -.035em;
}

.hero-content > p:not(.eyebrow) {
  max-width: 570px;
  margin: 2rem auto 0;
  color: rgba(255, 255, 255, .76);
  font-size: 1rem;
  line-height: 1.8;
}

.hero-content > a {
  margin-top: 2.8rem;
  min-height: 44px;
  padding: .85rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  color: rgba(255, 255, 255, .76);
  font-size: .75rem;
  letter-spacing: .15em;
  text-decoration: none;
  text-transform: uppercase;
}

.hero-content > a span { color: #e1b49d; }

.shooting-star {
  position: absolute;
  top: 13%;
  right: -12%;
  width: 140px;
  height: 1px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3) 45%, white);
  filter: drop-shadow(0 0 4px rgba(230, 238, 255, .9));
  animation: shoot 11s 2s ease-in infinite;
}

.shooting-star::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -1.5px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 8px white;
}

.letter {
  padding: clamp(80px, 9vw, 125px) 24px;
  background: var(--paper);
}

.letter-intro,
.letter-section,
blockquote,
.central-thought,
.thanks {
  width: min(100%, 720px);
  margin-inline: auto;
}

.letter-intro {
  padding-bottom: clamp(58px, 7vw, 88px);
  text-align: center;
}

.letter-intro h2,
.thanks h2 {
  margin: 0;
  font-size: clamp(3.8rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: -.035em;
}

.opening {
  max-width: 620px;
  margin: 2.5rem auto 0;
  color: var(--body);
  font: 400 clamp(1.45rem, 2.3vw, 1.9rem)/1.5 var(--serif);
}

.letter-section {
  padding: clamp(48px, 6vw, 72px) 0;
  border-top: 1px solid var(--line);
}

.letter-section h3 {
  margin: 0 0 1.7rem;
  color: var(--ink);
  font-size: clamp(2.1rem, 3.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -.025em;
}

.letter-section p,
.thanks > p:not(.eyebrow) {
  margin: 0 0 1.25rem;
  color: var(--body);
  font-size: .98rem;
  line-height: 1.9;
}

.letter-section p:last-child,
.thanks > p:last-of-type { margin-bottom: 0; }

blockquote {
  padding: clamp(65px, 8vw, 100px) 0;
  text-align: center;
  border-top: 1px solid var(--line);
}

blockquote::before {
  content: "✦";
  display: block;
  margin-bottom: 2rem;
  color: var(--warm);
  font: 400 .9rem/1 var(--sans);
}

blockquote p {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  line-height: 1.12;
  letter-spacing: -.03em;
}

.central-thought {
  padding: clamp(72px, 9vw, 110px) 0;
  color: var(--ink);
  font-size: clamp(2.7rem, 5vw, 4.6rem);
  line-height: 1.1;
  letter-spacing: -.035em;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.thanks {
  padding: clamp(72px, 9vw, 110px) 0 20px;
  text-align: center;
  border-top: 1px solid var(--line);
}

.thanks h2 { margin-bottom: 3rem; }

.thanks strong {
  display: block;
  margin-top: 4rem;
  color: var(--warm);
  font-size: clamp(1.6rem, 2.7vw, 2.2rem);
  line-height: 1.4;
}

.contact-link {
  width: min(100%, 420px);
  margin: 3.5rem auto 0;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  border-top: 1px solid var(--line);
}

.contact-link span {
  color: #596273;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.contact-link a {
  width: max-content;
  margin: auto;
  color: var(--ink);
  min-height: 44px;
  padding: .45rem .7rem;
  display: inline-flex;
  align-items: center;
  font: 400 1.35rem/1.4 var(--serif);
  text-decoration-color: rgba(183, 124, 102, .55);
  text-underline-offset: .3rem;
}

.social-links {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.social-links a {
  min-height: 44px;
  padding: .9rem 1.2rem;
  display: inline-flex;
  align-items: center;
  color: #596273;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .13em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease;
}

.social-links a + a { border-left: 1px solid var(--line); }
.social-links a:hover { color: var(--warm); }

footer {
  min-height: 160px;
  padding: 3.5rem clamp(22px, 5vw, 72px);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  background: #eee8de;
  color: #596273;
  border-top: 1px solid var(--line);
}

footer .brand-logo { width: 64px; }

footer p {
  margin: 0;
  font-size: .75rem;
  letter-spacing: .13em;
  text-align: center;
  text-transform: uppercase;
}

footer p:last-child { text-align: right; }

.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.france-mark {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #596273;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.french-flag {
  width: 24px;
  height: 15px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(37, 48, 71, .14);
  transform: rotate(-3deg);
}

.french-flag b:nth-child(1) { background: #183b78; }
.french-flag b:nth-child(2) { background: #ffffff; }
.french-flag b:nth-child(3) { background: #d5404a; }

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

.reveal.reveal-pending {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s ease, transform 1s ease;
}

.reveal.reveal-pending.visible { opacity: 1; transform: none; }

@keyframes sky {
  from { background-position: 49% center; }
  to { background-position: 53% center; }
}

@keyframes shoot {
  0%, 70% { opacity: 0; transform: translate(0, 0) rotate(-30deg); }
  73% { opacity: 1; }
  87% { opacity: 0; transform: translate(-78vw, 48vh) rotate(-30deg); }
  100% { opacity: 0; }
}

@media (max-width: 640px) {
  header {
    height: 68px;
    grid-template-columns: 1fr 1fr;
  }

  header p { display: none; }
  header > a:last-child { font-size: .75rem; }
  .hero { padding: 105px 20px 65px; }
  .sky { background-position: 64% center; animation: none; }
  h1 { font-size: clamp(3.8rem, 18vw, 5.1rem); }
  .hero-content > p:not(.eyebrow) { font-size: .92rem; }
  .letter { padding-left: 20px; padding-right: 20px; }
  .letter-section p, .thanks > p:not(.eyebrow) { font-size: .94rem; line-height: 1.82; }

  footer {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    align-items: start;
  }

  footer p,
  footer p:last-child { text-align: left; }

  .footer-center { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal.reveal-pending { opacity: 1; transform: none; transition: none; }
  .sky, .shooting-star { animation: none; }
}
