:root {
  --indigo: #0e1428;
  --indigo-deep: #090e1d;
  --ink: #12182a;
  --paper: #faf6ee;
  --bone: #f5e9d7;
  --ember: #a33f27;
  --ember-bright: #c04a2b;
  --amber: #e4b36a;
  --muted: rgba(18, 24, 42, 0.68);
  --line-light: rgba(18, 24, 42, 0.16);
  --line-dark: rgba(245, 233, 215, 0.22);
  --display: "Fraunces", "Iowan Old Style", Baskerville, Georgia, serif;
  --sans: "Geist", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", SFMono-Regular, Consolas, monospace;
  --shell: 1320px;
  --gutter: clamp(22px, 5vw, 76px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--indigo-deep);
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  max-width: 100%;
  font: inherit;
}

p,
h1,
h2,
h3,
.footer-meta {
  overflow-wrap: anywhere;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ember-bright);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--indigo);
  font-weight: 700;
  transform: translateY(-160%);
}

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

.shell {
  width: min(100%, var(--shell));
  min-width: 0;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.site-header {
  position: absolute;
  z-index: 10;
  inset: 0 0 auto;
  color: var(--bone);
  border-bottom: 1px solid var(--line-dark);
}

.header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.wordmark {
  display: grid;
  color: inherit;
  line-height: 1.08;
  text-decoration: none;
}

.wordmark strong {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 470;
  letter-spacing: 0.01em;
}

.wordmark span,
.header-note,
.eyebrow,
.micro-label,
.field-label,
.deadline-label,
.footer-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.wordmark span {
  margin-top: 5px;
  color: rgba(245, 233, 215, 0.62);
  font-size: 9px;
}

.header-note {
  color: var(--amber);
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 760px;
  padding-top: 92px;
  color: var(--bone);
  background:
    radial-gradient(circle at 78% 45%, rgba(228, 179, 106, 0.09), transparent 24%),
    linear-gradient(135deg, #090e1d 0%, #0e1428 58%, #151d37 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--line-dark);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.66fr);
  align-items: center;
  gap: clamp(44px, 8vw, 130px);
  min-height: 668px;
  padding-top: clamp(70px, 8vw, 120px);
  padding-bottom: clamp(78px, 9vw, 132px);
}

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

.eyebrow {
  margin: 0 0 24px;
  color: var(--amber);
}

h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(68px, 7.6vw, 118px);
  font-weight: 320;
  letter-spacing: -0.045em;
  line-height: 0.86;
  text-transform: uppercase;
}

h1 span {
  display: block;
}

.hero-lead {
  max-width: 690px;
  margin: 34px 0 0;
  color: rgba(245, 233, 215, 0.78);
  font-family: var(--display);
  font-size: clamp(21px, 2vw, 29px);
  font-weight: 350;
  line-height: 1.42;
}

.hero-lead em {
  color: var(--bone);
  font-style: italic;
}

.secret-note {
  display: flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: 100%;
  margin: 34px 0 0;
  padding-top: 17px;
  color: rgba(245, 233, 215, 0.7);
  border-top: 1px solid var(--line-dark);
  font-size: 14px;
}

.secret-note::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  background: var(--ember-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(192, 74, 43, 0.15);
}

.letter-folio {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 0.82;
  justify-self: end;
  pointer-events: none;
}

.letter-folio::before {
  content: "";
  position: absolute;
  inset: 9% -14% -8% 5%;
  background: radial-gradient(circle at 58% 45%, rgba(228, 179, 106, 0.16), transparent 62%);
  filter: blur(8px);
}

.folio-year {
  position: absolute;
  z-index: 0;
  top: -8%;
  left: -13%;
  color: transparent;
  font-family: var(--display);
  font-size: clamp(164px, 18vw, 238px);
  font-weight: 300;
  letter-spacing: -0.09em;
  line-height: 1;
  -webkit-text-stroke: 1px rgba(228, 179, 106, 0.27);
}

.folio-sheet {
  position: absolute;
  inset: 11% 4% 3% 16%;
  border: 1px solid rgba(245, 233, 215, 0.32);
}

.folio-sheet--back {
  z-index: 1;
  background: rgba(245, 233, 215, 0.07);
  transform: translate(-25px, 22px) rotate(-5deg);
}

.folio-sheet--middle {
  z-index: 2;
  background: rgba(245, 233, 215, 0.13);
  transform: translate(17px, -8px) rotate(3deg);
}

.folio-sheet--front {
  z-index: 3;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 42px,
      rgba(18, 24, 42, 0.13) 42px 43px
    ),
    var(--bone);
  box-shadow: 0 30px 70px rgba(2, 5, 13, 0.32);
  transform: rotate(-1deg);
}

.folio-sheet--front::before {
  content: "“";
  position: absolute;
  top: 7%;
  left: 20%;
  color: var(--ember);
  font-family: var(--display);
  font-size: 92px;
  font-weight: 300;
  line-height: 1;
}

.folio-sheet--front::after {
  content: "";
  position: absolute;
  right: 13%;
  bottom: 16%;
  width: 31%;
  height: 1px;
  background: rgba(18, 24, 42, 0.26);
  box-shadow: 0 9px 0 rgba(18, 24, 42, 0.15);
}

.folio-thread {
  position: absolute;
  inset: 0 auto 0 13%;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--amber) 0 5px,
    transparent 5px 15px
  );
}

.folio-seal {
  position: absolute;
  right: 12%;
  bottom: 9%;
  width: 18px;
  height: 18px;
  background: var(--ember-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(192, 74, 43, 0.12);
}

.form-section {
  position: relative;
  padding: clamp(90px, 11vw, 170px) 0;
  background: var(--paper);
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(460px, 1.28fr);
  gap: clamp(54px, 9vw, 150px);
  align-items: start;
}

.form-context,
.form-stage {
  min-width: 0;
}

.form-context {
  position: sticky;
  top: 40px;
}

.micro-label {
  margin: 0 0 24px;
  color: var(--ember);
}

h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(48px, 5.6vw, 76px);
  font-weight: 350;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.form-context > p:not(.micro-label) {
  margin: 28px 0 0;
  color: var(--muted);
}

.deadline {
  margin-top: 42px;
  padding: 22px 0;
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
}

.deadline-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ember);
}

.deadline strong {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 470;
}

.promise {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

.letter-form {
  display: grid;
  gap: 32px;
}

.letter-form:focus {
  outline: none;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.field {
  min-width: 0;
}

.field-label {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--ink);
}

.optional {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  border: 1px solid rgba(18, 24, 42, 0.35);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.45);
  color: var(--ink);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

input[type="text"],
input[type="email"] {
  min-height: 54px;
  padding: 13px 15px;
}

textarea {
  min-height: 240px;
  padding: 16px;
  line-height: 1.62;
  resize: vertical;
}

input:hover,
textarea:hover {
  border-color: rgba(18, 24, 42, 0.58);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--ember-bright);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(192, 74, 43, 0.11);
}

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
  border-color: #a12626;
}

.field-hint {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.field-error {
  min-height: 1.3em;
  margin: 7px 0 0;
  color: #8c1f1f;
  font-size: 13px;
  font-weight: 600;
}

.form-error:empty {
  display: none;
}

.privacy-note {
  padding: 20px 22px;
  color: var(--muted);
  background: rgba(14, 20, 40, 0.045);
  border-left: 3px solid var(--amber);
  font-size: 14px;
}

.privacy-note strong {
  color: var(--ink);
}

.security-note {
  margin: -14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.security-note a {
  text-underline-offset: 3px;
}

.submit-row {
  display: flex;
  align-items: center;
  gap: 22px;
}

.submit-button {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 15px 25px;
  border: 1px solid var(--ember);
  border-radius: 0;
  background: var(--ember);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.submit-button:hover:not(:disabled) {
  background: var(--indigo);
  border-color: var(--indigo);
  transform: translateY(-2px);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.submit-status {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.submit-status[data-state="error"] {
  color: #8c1f1f;
  font-weight: 600;
}

.success-panel,
.closed-panel {
  padding: clamp(36px, 5vw, 64px);
  color: var(--bone);
  background: var(--indigo);
  border-top: 4px solid var(--amber);
}

.success-panel:focus,
.closed-panel:focus {
  outline-offset: 8px;
}

.success-panel h3,
.closed-panel h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 350;
  letter-spacing: -0.035em;
  line-height: 1;
}

.success-panel p,
.closed-panel p {
  max-width: 600px;
  margin: 22px 0 0;
  color: rgba(245, 233, 215, 0.76);
}

.success-panel .micro-label {
  margin: 0 0 18px;
  color: var(--amber);
}

.success-panel a {
  display: inline-flex;
  margin-top: 28px;
  color: var(--amber);
  font-weight: 700;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.site-footer {
  padding: 48px 0;
  color: var(--bone);
  background: var(--indigo-deep);
  border-top: 1px solid var(--line-dark);
}

.footer-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
}

.footer-title {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 450;
}

.footer-label {
  display: block;
  margin-top: 7px;
  color: rgba(245, 233, 215, 0.56);
}

.footer-meta {
  margin: 0;
  color: rgba(245, 233, 215, 0.58);
  font-size: 13px;
  text-align: right;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.5fr);
    gap: 42px;
  }

  .letter-folio {
    transform: scale(0.92);
    transform-origin: right center;
  }

  .form-grid {
    grid-template-columns: minmax(230px, 0.68fr) minmax(420px, 1.32fr);
    gap: 56px;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(245px, 0.4fr);
    min-height: 650px;
  }

  .letter-folio {
    transform: scale(0.84);
  }

  .form-grid {
    display: block;
  }

  .form-context {
    position: static;
    max-width: 620px;
    margin-bottom: 58px;
  }
}

@media (max-width: 660px) {
  .header-inner {
    min-height: 80px;
  }

  .header-note {
    max-width: 150px;
    font-size: 9px;
    text-align: right;
  }

  .hero {
    padding-top: 80px;
  }

  .hero-grid {
    display: block;
    min-height: 0;
    padding-top: 78px;
    padding-bottom: 82px;
  }

  h1 {
    font-size: clamp(54px, 17vw, 82px);
  }

  .hero-lead {
    margin-top: 28px;
  }

  .letter-folio {
    width: min(250px, 78vw);
    margin: 54px auto 0;
    transform: none;
  }

  .folio-year {
    font-size: clamp(140px, 48vw, 205px);
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .submit-row,
  .footer-inner {
    display: block;
  }

  .submit-button {
    width: 100%;
  }

  .submit-status {
    margin-top: 14px;
  }

  .footer-meta {
    margin-top: 28px;
    text-align: left;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 16px;
  }

  .wordmark strong {
    font-size: 17px;
  }

  .wordmark span {
    font-size: 8px;
  }

  .privacy-note {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: reveal-up 760ms ease both;
  }

  .letter-folio {
    animation: reveal-fade 920ms 120ms ease both;
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes reveal-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}
