@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&family=Marhey:wght@400;500;600;700&display=swap');

:root {
  --ink: #15253d;
  --ink-soft: #526176;
  --paper: #f8f5ef;
  --paper-deep: #eee9df;
  --gold: #c99445;
  --gold-soft: #ead9b9;
  --white: #fffdf9;
  --line: rgba(21, 37, 61, 0.15);
  --display: 'Marhey', 'Cairo', sans-serif;
  --body: 'Cairo', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: radial-gradient(rgba(21, 37, 61, .13) .55px, transparent .55px);
  background-size: 6px 6px;
  mix-blend-mode: multiply;
}

.page-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.top-line { height: 5px; background: var(--gold); margin-inline: -24px; }
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 92px; border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--paper); background: var(--ink); border-radius: 50%; font-size: 15px; }
.brand-name { font-weight: 800; letter-spacing: -.03em; }
.header-note { color: var(--ink-soft); font-size: 12px; letter-spacing: .12em; }

.hero { min-height: 570px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 70px; align-items: center; padding: 80px 4% 92px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; right: -14%; bottom: 8%; width: 40%; height: 1px; background: var(--gold); transform: rotate(-26deg); opacity: .7; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow, .small-label { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .09em; margin: 0 0 20px; }
.eyebrow { display: flex; gap: 11px; align-items: center; }
.eyebrow span { width: 26px; height: 1px; background: var(--gold); display: inline-block; }
h1, h2, p { margin-top: 0; }
h1 { font-family: var(--display); font-size: clamp(68px, 10vw, 135px); line-height: .93; font-weight: 500; letter-spacing: -.09em; margin: 0; }
h1 em { color: var(--gold); font-style: normal; margin-right: 76px; }
.hero-lede { max-width: 315px; color: var(--ink-soft); line-height: 2.05; font-size: 15px; margin: 34px 0 0; }
.hero-orbit { position: relative; width: min(410px, 80vw); aspect-ratio: 1; margin-inline: auto; }
.hero-orbit::before { content: ''; position: absolute; inset: 16%; border-radius: 50%; background: var(--gold-soft); opacity: .42; filter: blur(1px); }
.orbit-ring { position: absolute; border: 1px solid var(--gold); border-radius: 50%; transform: rotate(-23deg); }
.ring-one { inset: 8%; }
.ring-two { inset: 22% 1%; transform: rotate(59deg); border-color: rgba(21, 37, 61, .34); }
.orbit-star { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); font-size: 108px; text-shadow: 10px 12px 0 rgba(201, 148, 69, .55); animation: breathe 4s ease-in-out infinite; }
.spark { position: absolute; color: var(--gold); font-size: 24px; }
.spark-a { top: 6%; right: 17%; }.spark-b { bottom: 16%; left: 12%; font-size: 15px; }.spark-c { top: 36%; left: 7%; font-size: 40px; }
@keyframes breathe { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.05) rotate(4deg); } }

.letter-section, .students-section { border-top: 1px solid var(--line); padding: 54px 4% 98px; }
.section-kicker { display: flex; align-items: center; gap: 15px; color: var(--ink-soft); font-size: 11px; letter-spacing: .12em; margin-bottom: 58px; }
.section-kicker > span:first-child { color: var(--gold); font-weight: 800; }
.kicker-line { height: 1px; width: 55px; background: var(--gold); }
.letter-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: 14%; align-items: end; }
.letter-heading h2, .students-intro h2 { font-family: var(--display); font-weight: 500; letter-spacing: -.07em; font-size: clamp(42px, 6vw, 76px); line-height: 1.15; margin: 0; }
.letter-heading h2 span, .students-intro h2 span { color: var(--gold); }
.signature-line { width: 86px; height: 3px; background: var(--gold); margin-top: 29px; }
.letter-body { max-width: 520px; color: var(--ink-soft); line-height: 2.1; font-size: 18px; padding-bottom: 6px; }
.letter-body strong { color: var(--ink); font-weight: 700; }
blockquote { font-family: var(--display); color: var(--ink); font-size: clamp(34px, 4.3vw, 60px); line-height: 1.45; margin: 30px 0 23px; padding-right: 25px; border-right: 3px solid var(--gold); }
.closing-note { border-top: 1px solid var(--line); padding-top: 20px; margin: 0; font-size: 15px; }

.students-section { background: var(--ink); color: var(--white); margin-inline: -24px; padding-inline: max(7%, 48px); }
.students-section .section-kicker { color: rgba(255, 253, 249, .55); }
.students-section .small-label { color: var(--gold-soft); }
.private-invite-content { max-width: 620px; padding-bottom: 15px; }
.private-invite-content h2 { font-family: var(--display); font-weight: 500; letter-spacing: -.07em; font-size: clamp(48px, 7vw, 82px); line-height: 1.15; margin: 0 0 25px; }
.private-invite-content h2 span { color: var(--gold); }
.private-invite-content > p:not(.small-label) { color: rgba(255, 253, 249, .7); font-size: 16px; line-height: 2; max-width: 520px; margin: 0; }
.private-seal { display: block; color: var(--gold); font-size: 28px; margin-top: 37px; }
.students-intro { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 58px; }
.students-count { text-align: left; color: rgba(255, 253, 249, .55); font-size: 12px; line-height: 1.8; margin: 0 0 7px; }
.students-count strong { color: var(--gold-soft); font-family: var(--display); font-size: 42px; font-weight: 500; line-height: 1; }
.student-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 10%; }
.student-list li { display: grid; grid-template-columns: 40px 1fr 24px auto; gap: 14px; align-items: center; min-height: 78px; border-top: 1px solid rgba(255, 253, 249, .17); font-size: 16px; transition: color .25s ease, padding .25s ease; }
.student-list li:nth-last-child(-n + 2) { border-bottom: 1px solid rgba(255, 253, 249, .17); }
.student-list li:hover { color: var(--gold-soft); padding-right: 8px; }
.student-number { color: var(--gold); font-size: 11px; letter-spacing: .08em; }
.student-star { color: var(--gold); font-size: 14px; text-align: left; }
.message-button, .download-button { font-family: var(--body); cursor: pointer; }
.message-button { border: 1px solid rgba(234, 217, 185, .55); background: transparent; color: var(--gold-soft); border-radius: 999px; padding: 8px 13px; font-size: 11px; white-space: nowrap; transition: background .25s ease, color .25s ease, border-color .25s ease; }
.message-button:hover, .message-button:focus-visible { background: var(--gold-soft); color: var(--ink); border-color: var(--gold-soft); outline: none; }

.message-modal[hidden] { display: none; }
.message-modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 18, 32, .74); backdrop-filter: blur(5px); }
.modal-card { position: relative; width: min(580px, 100%); background: var(--paper); color: var(--ink); padding: 58px clamp(26px, 7vw, 72px) 48px; text-align: center; border: 1px solid var(--gold); box-shadow: 0 24px 80px rgba(0, 0, 0, .28); animation: modal-in .28s ease-out both; }
.modal-card::before { content: ''; position: absolute; inset: 12px; border: 1px solid var(--gold-soft); pointer-events: none; }
.modal-close { position: absolute; z-index: 1; top: 19px; left: 22px; width: 32px; height: 32px; border: 0; border-radius: 50%; color: var(--ink); background: var(--paper-deep); font-size: 23px; line-height: 1; cursor: pointer; }
.modal-star { display: block; position: relative; color: var(--gold); font-size: 35px; margin-bottom: 14px; }
.modal-card .small-label { position: relative; margin-bottom: 14px; }
.modal-card h2 { position: relative; font-family: var(--display); font-size: clamp(25px, 4vw, 38px); font-weight: 500; margin: 0 0 24px; line-height: 1.5; }
.modal-message { position: relative; color: var(--ink-soft); font-size: 16px; line-height: 2; max-width: 420px; margin: 0 auto 22px; }
.modal-signature { position: relative; color: var(--ink-soft); font-size: 13px; line-height: 1.9; margin: 0 0 28px; }
.modal-signature strong { color: var(--ink); font-size: 15px; }
.download-button { position: relative; border: 0; background: var(--ink); color: var(--white); border-radius: 999px; padding: 13px 22px; font-size: 13px; font-weight: 700; transition: transform .2s ease, background .2s ease; }
.download-button span { color: var(--gold-soft); font-size: 19px; vertical-align: -2px; margin-left: 5px; }
.download-button:hover, .download-button:focus-visible { background: #223b5e; transform: translateY(-2px); outline: 3px solid rgba(201, 148, 69, .28); }
body.modal-open { overflow: hidden; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.final-note { display: flex; align-items: center; justify-content: center; gap: 40px; text-align: center; min-height: 270px; padding: 50px 20px; }
.final-note p { color: var(--ink-soft); font-size: 17px; line-height: 2; margin: 0; }
.final-note strong { color: var(--ink); font-family: var(--display); font-weight: 500; font-size: 30px; }
.final-star { color: var(--gold); font-size: 27px; }
.site-footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; min-height: 84px; color: var(--ink-soft); font-size: 12px; }
.footer-seal { color: var(--gold); font-size: 20px; }

.private-body { min-height: 100vh; display: block; padding: 24px 0; overflow-x: hidden; }
.private-page { width: calc(100% - 32px); max-width: 900px; min-width: 0; margin: 0 auto; }
.private-page .site-header { margin-bottom: 22px; }
.private-card { position: relative; overflow: hidden; background: var(--ink); color: var(--white); padding: clamp(42px, 8vw, 90px) clamp(25px, 9vw, 110px); text-align: center; border: 1px solid var(--gold); box-shadow: 0 20px 60px rgba(21, 37, 61, .13); }
.private-card::before, .private-card::after { content: '✦'; position: absolute; color: var(--gold); font-size: 36px; opacity: .8; }
.private-card::before { top: 28px; right: 34px; }.private-card::after { bottom: 27px; left: 34px; }
.private-card .small-label { position: relative; color: var(--gold-soft); }
.private-card h1 { position: relative; max-width: 100%; overflow-wrap: anywhere; font-size: clamp(38px, 6vw, 70px); line-height: 1.35; letter-spacing: -.06em; margin: 0 0 28px; }
.private-card h1 span { color: var(--gold); }
.private-message { position: relative; max-width: 630px; margin: 0 auto; color: rgba(255, 253, 249, .82); font-size: clamp(16px, 2vw, 20px); line-height: 2.15; }
.private-quote { position: relative; color: var(--gold-soft); font-family: var(--display); font-size: clamp(28px, 4vw, 46px); line-height: 1.5; margin: 34px 0 22px; }
.private-signature { position: relative; color: rgba(255, 253, 249, .62); font-size: 13px; line-height: 2; margin: 0 0 32px; }
.private-signature strong { color: var(--white); font-size: 15px; }
.private-download { position: relative; border: 0; background: var(--gold); color: var(--ink); border-radius: 999px; padding: 14px 24px; font-family: var(--body); font-size: 14px; font-weight: 800; cursor: pointer; transition: transform .2s ease, background .2s ease; }
.private-download:hover, .private-download:focus-visible { background: var(--gold-soft); transform: translateY(-2px); outline: 3px solid rgba(234, 217, 185, .28); }
.private-back { display: block; color: var(--ink-soft); text-align: center; font-size: 12px; margin-top: 18px; text-decoration: none; }
.private-back:hover { color: var(--gold); }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 32px, 620px); }
  .top-line { margin-inline: -16px; }
  .site-header { min-height: 76px; }
  .hero { display: block; min-height: auto; padding: 65px 5% 70px; }
  h1 { font-size: clamp(65px, 19vw, 105px); }
  h1 em { margin-right: 42px; }
  .hero-orbit { width: min(285px, 72vw); margin: 66px auto 0; }
  .hero-lede { margin-top: 28px; }
  .letter-section, .students-section { padding: 44px 5% 70px; }
  .section-kicker { margin-bottom: 40px; }
  .letter-layout { display: block; }
  .letter-heading { margin-bottom: 40px; }
  .letter-body { font-size: 16px; }
  blockquote { font-size: 36px; }
  .students-section { margin-inline: -16px; padding-inline: 9%; }
  .students-intro { align-items: start; margin-bottom: 42px; }
  .student-list { grid-template-columns: 1fr; }
  .student-list li:nth-last-child(2) { border-bottom: 0; }
  .student-list li:last-child { border-bottom: 1px solid rgba(255, 253, 249, .17); }
  .student-list li { grid-template-columns: 34px 1fr 18px; gap: 10px; padding: 13px 0; }
  .student-list .message-button { grid-column: 2 / -1; justify-self: start; padding: 6px 11px; }
  .final-note { gap: 18px; min-height: 230px; }
  .final-star { font-size: 19px; }
  .final-note strong { font-size: 25px; }
  .site-footer { min-height: 70px; font-size: 10px; }
  .private-page { width: calc(100% - 20px); max-width: 620px; }
  .private-page .site-header { min-height: 68px; }
  .private-card { padding: 50px 22px 42px; }
  .private-card::before { top: 18px; right: 21px; }.private-card::after { bottom: 17px; left: 21px; }
}

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