:root {
  --canvas: #e9ded0;
  --paper: #fbf6ec;
  --paper-2: #f4eadc;
  --ink: #2b241d;
  --soft-ink: #65584c;
  --faded: #9b8878;
  --rust: #a34e32;
  --rose: #d9a79b;
  --sage: #65745c;
  --night: #292521;
  --line: rgba(43, 36, 29, .18);
  --shadow: 0 26px 80px rgba(43, 36, 29, .18);
}

.password-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--canvas);
  padding: 24px;
}
.password-gate .gate-box {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 4px;
  padding: 48px 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.password-gate .handwritten {
  font-family: "Caveat", cursive;
  font-size: 28px;
  color: var(--rust);
  margin: 0 0 8px;
}
.password-gate h2 {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 12px;
}
.password-gate .gate-note {
  color: var(--soft-ink);
  font-size: 15px;
  margin: 0 0 24px;
}
.password-gate form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.password-gate input[type="password"] {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper-2);
  color: var(--ink);
  font-family: "Source Sans 3", sans-serif;
  font-size: 16px;
}
.password-gate input[type="password"]:focus {
  outline: none;
  border-color: var(--rust);
}
.password-gate button {
  padding: 14px 16px;
  border: none;
  border-radius: 4px;
  background: var(--rust);
  color: var(--paper);
  font-family: "Source Sans 3", sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: opacity 0.2s;
}
.password-gate button:hover { opacity: 0.85; }
.password-gate .gate-error {
  color: var(--rust);
  font-size: 14px;
  margin-top: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 10%, rgba(217,167,155,.42), transparent 24%),
    radial-gradient(circle at 92% 30%, rgba(101,116,92,.20), transparent 28%),
    linear-gradient(110deg, rgba(255,255,255,.28) 0 1px, transparent 1px 42px),
    var(--canvas);
  font-family: "Source Sans 3", system-ui, sans-serif;
}

body:before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .38;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.page-frame {
  width: min(1240px, calc(100% - 34px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(22px, 4vw, 60px);
  padding: 34px 0 70px;
}

.side-note {
  position: sticky;
  top: 32px;
  align-self: start;
  min-height: 410px;
  padding: 28px 22px;
  border-left: 2px solid var(--rust);
  color: var(--soft-ink);
}
.side-note span {
  display: inline-block;
  margin-bottom: 18px;
  font-family: Caveat, cursive;
  font-size: 2.1rem;
  color: var(--rust);
  transform: rotate(-4deg);
}
.side-note p { margin: 0; font-size: 1.03rem; line-height: 1.35; }

.letter { padding-top: 40px; }
.opening {
  min-height: 76vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 920px;
}
.pre-hook {
  margin: 0 0 18px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .82rem;
  color: var(--faded);
  font-weight: 600;
}
.handwritten {
  margin: 0 0 12px;
  font-family: Caveat, cursive;
  color: var(--rust);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: .95;
}
h1, h2, h3 {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  letter-spacing: -.045em;
  line-height: .96;
}
h1 {
  max-width: 920px;
  font-size: clamp(4.1rem, 10vw, 10.4rem);
  font-weight: 300;
}
h2 { font-size: clamp(2.7rem, 5vw, 6.2rem); font-weight: 600; }
h3 { font-size: clamp(1.7rem, 3vw, 3rem); font-weight: 600; }
p { font-size: clamp(1.08rem, 1.45vw, 1.27rem); line-height: 1.7; }
.lead {
  max-width: 690px;
  color: var(--soft-ink);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.45;
  margin: 34px 0 28px;
}
.soft-link {
  width: fit-content;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--rust);
  font-weight: 700;
  font-size: 1.1rem;
}

.paper-sheet {
  position: relative;
  max-width: 830px;
  margin: 0 0 95px 7vw;
  padding: clamp(34px, 6vw, 74px);
  background:
    linear-gradient(rgba(251,246,236,.92), rgba(251,246,236,.92)),
    repeating-linear-gradient(0deg, transparent 0 37px, rgba(43,36,29,.10) 38px 39px);
  border: 1px solid rgba(43,36,29,.12);
  box-shadow: var(--shadow);
  transform: rotate(-1.2deg);
}
.paper-sheet:before {
  content: "";
  position: absolute;
  inset: -16px auto auto 42px;
  width: 180px;
  height: 38px;
  background: rgba(255,255,255,.42);
  border: 1px solid rgba(43,36,29,.10);
  transform: rotate(3deg);
}
.paper-sheet p { color: var(--soft-ink); }
.paper-sheet p:first-of-type, .paper-sheet p:nth-of-type(2) { color: var(--ink); }
.date-line {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .78rem;
  color: var(--faded) !important;
}
.signature {
  font-family: Caveat, cursive;
  color: var(--rust) !important;
  font-size: 3rem !important;
  margin-bottom: 0;
}

/* Conversation strip — 4 columns, taller cards */
.conversation-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 90px;
}
.conversation-strip div {
  min-height: 380px;
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}
.conversation-strip .fourth-card {
  border-top-color: var(--faded);
  opacity: .55;
}
.number {
  display: block;
  margin-bottom: 38px;
  color: var(--rust);
  font-weight: 800;
}
.fourth-card .number { color: var(--faded); }
.conversation-strip h2 { font-size: clamp(1.7rem, 2.6vw, 3.6rem); }

/* Photo wall */
.photo-wall {
  display: grid;
  grid-template-columns: 1.15fr .85fr 1fr;
  grid-auto-rows: 230px;
  gap: 18px;
  margin-bottom: 95px;
}
.tile {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background: var(--paper-2);
  border-radius: 4px 38px 4px 38px;
  box-shadow: 0 18px 50px rgba(43, 36, 29, .10);
}
.tile:after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.50), transparent 32%);
  pointer-events: none;
}
.tile.tall { grid-row: span 2; background: #ded4c3; }
.tile.wide { grid-column: span 2; background: #d7c5b3; }
.tile.dark { background: var(--night); color: #fff; }
.tile.dark .handwritten { color: #e6b0a2; }
.tile h3 { position: absolute; left: 24px; right: 24px; bottom: 24px; z-index: 1; }
.tile .handwritten { position: relative; z-index: 1; }
.tile-detail {
  position: relative;
  z-index: 1;
  margin: 4px 0 0;
  font-size: .78rem !important;
  line-height: 1.3 !important;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--faded);
}
.tile.dark .tile-detail { color: rgba(255,255,255,.42); }

/* Questions — bullets first, big question last */
.questions {
  max-width: 950px;
  margin: 0 auto 95px;
  padding: clamp(34px, 6vw, 72px) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.questions ul { margin-bottom: 52px; }
.questions h2 { margin-top: 0; }
ul { list-style: none; padding: 0; margin: 0; }
li {
  position: relative;
  padding: 18px 0 18px 42px;
  border-top: 1px solid var(--line);
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  color: var(--soft-ink);
}
li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 28px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--rust);
}

/* Closing */
.closing-note {
  position: relative;
  margin: 0 0 60px auto;
  max-width: 760px;
  padding: clamp(36px, 6vw, 70px);
  background: var(--night);
  color: #fff;
  box-shadow: var(--shadow);
}
.closing-note > p:first-of-type {
  margin-top: 0;
  font-family: Fraunces, Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -.04em;
}
.email-button {
  display: inline-flex;
  text-decoration: none;
  color: #fff;
  border: 1px solid rgba(255,255,255,.32);
  padding: 13px 18px;
  border-radius: 0;
  font-weight: 700;
}
.email-button:hover { background: #fff; color: var(--night); }
.cta-note {
  margin: 16px 0 0;
  font-size: .88rem !important;
  color: rgba(255,255,255,.45);
  line-height: 1.4 !important;
}

footer {
  width: min(1240px, calc(100% - 34px));
  margin: 0 auto;
  padding: 30px 0 48px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--soft-ink);
  border-top: 1px solid var(--line);
}
footer p { margin: 0; font-size: .96rem; }

@media (max-width: 900px) {
  .page-frame { grid-template-columns: 1fr; }

  /* Mobile: ribbon-style side note */
  .side-note {
    position: static;
    min-height: auto;
    border-left: 0;
    border-top: 0;
    padding: 14px 18px;
    background: var(--night);
    display: flex;
    align-items: center;
    gap: 18px;
    border-radius: 0 0 4px 4px;
  }
  .side-note span {
    margin-bottom: 0;
    color: #e6b0a2;
    font-size: 1.7rem;
    transform: rotate(-2deg);
    white-space: nowrap;
  }
  .side-note p { color: rgba(255,255,255,.6); font-size: .92rem; }

  .opening { min-height: 66vh; }
  .paper-sheet { margin-left: 0; transform: none; }
  .conversation-strip { grid-template-columns: 1fr 1fr; }
  .photo-wall { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tile, .tile.tall, .tile.wide { grid-column: auto; grid-row: auto; min-height: 240px; }
}

@media (max-width: 540px) {
  .conversation-strip { grid-template-columns: 1fr; }
}
