:root {
  --bg: #f5ecdf;
  --panel: rgba(255, 251, 245, 0.9);
  --panel-strong: #fffaf2;
  --ink: #14284b;
  --muted: #606b7e;
  --line: rgba(20, 40, 75, 0.12);
  --accent: #c99844;
  --accent-soft: #edd6ac;
  --navy: #12284a;
  --shadow: 0 28px 80px rgba(18, 40, 74, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", sans-serif;
  background:
    radial-gradient(circle at 0% 0%, rgba(201, 152, 68, 0.18), transparent 24%),
    radial-gradient(circle at 100% 18%, rgba(18, 40, 74, 0.08), transparent 20%),
    linear-gradient(180deg, #fbf6ef 0%, #f4eadc 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.28)),
    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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
}

.page-shell {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  padding: 118px 0 56px;
}

.topbar,
.hero-panel,
.note-panel,
.panel,
.flash {
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.topbar::after,
.hero-panel::after,
.note-panel::after,
.panel::after {
  content: "";
  position: absolute;
  inset: auto -6% -44% auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(201, 152, 68, 0.16), transparent 72%);
  pointer-events: none;
}

.topbar {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  width: min(1220px, calc(100% - 28px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 28px;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.94), rgba(252, 247, 239, 0.9));
  box-shadow: 0 20px 48px rgba(18, 40, 74, 0.14);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--navy), #23406c);
  color: #f7ebd2;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.2rem;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

h1,
h2,
h3,
.brand strong,
.menu a,
.note-sign strong {
  font-family: "Cormorant Garamond", serif;
}

.brand strong {
  display: block;
  font-size: 1.7rem;
  line-height: 1;
}

.brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

.menu {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.menu a {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.2rem;
  position: relative;
}

.menu a.active::after,
.menu a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  background: var(--accent);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  padding: 52px 46px 72px;
  background:
    radial-gradient(circle at right center, rgba(234, 214, 176, 0.7), transparent 24%),
    linear-gradient(180deg, rgba(255, 252, 247, 0.95), rgba(252, 246, 237, 0.92));
}

.hero-panel::before {
  content: "";
  position: absolute;
  left: -120px;
  top: 26px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(201, 152, 68, 0.22);
  border-radius: 50%;
}

.hero-panel::after {
  inset: auto -2% -24% auto;
  width: 280px;
  height: 280px;
}

.hero-panel .hero-copy::before,
.hero-panel .hero-portrait::before,
.hero-panel .hero-portrait::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero-copy {
  padding: 28px 0 8px;
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: #bc8332;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 0.96;
}

h1 {
  max-width: 8ch;
  font-size: clamp(3rem, 5.4vw, 5rem);
}

h2 {
  font-size: clamp(2.2rem, 3.2vw, 3.1rem);
}

h3 {
  font-size: 1.8rem;
}

.lede,
.note-copy p,
.message-card p,
.memory-copy p,
.empty-state,
label span,
input,
textarea,
.brand span {
  color: var(--muted);
}

.lede {
  max-width: 48ch;
  margin: 18px 0 0;
  font-size: 1.02rem;
  line-height: 1.8;
}

.hero-meta {
  margin-top: 24px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(201, 152, 68, 0.12);
  color: var(--ink);
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.cta-button,
.ghost-button,
button {
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cta-button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  color: #fff8ee;
  background: linear-gradient(145deg, var(--navy), #203b65);
  box-shadow: 0 18px 34px rgba(18, 40, 74, 0.18);
  border: none;
  cursor: pointer;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(20, 40, 75, 0.1);
}

.cta-button:hover,
.ghost-button:hover,
button:hover {
  transform: translateY(-1px);
}

.hero-portrait {
  position: relative;
  min-height: 380px;
  display: grid;
  place-items: center;
}

.hero-leaf {
  position: absolute;
  inset: auto;
  z-index: 0;
  opacity: 0.95;
}

.hero-leaf-left {
  left: 36px;
  top: 126px;
  width: 110px;
  height: 170px;
  background:
    radial-gradient(circle at 26% 32%, rgba(227, 188, 115, 0.88), transparent 3px),
    linear-gradient(180deg, rgba(212, 173, 103, 0.12), rgba(212, 173, 103, 0.02));
  clip-path: path("M15,88 C28,46 58,12 98,2 C85,48 63,84 18,166 C7,149 7,118 15,88 Z");
}

.hero-leaf-right {
  right: 40px;
  top: 124px;
  width: 120px;
  height: 188px;
  background:
    radial-gradient(circle at 72% 36%, rgba(50, 78, 126, 0.66), transparent 3px),
    linear-gradient(180deg, rgba(25, 55, 99, 0.18), rgba(25, 55, 99, 0.04));
  clip-path: path("M102,82 C92,40 62,8 18,2 C30,48 54,96 96,182 C108,162 110,120 102,82 Z");
}

.portrait-ring {
  width: min(100%, 352px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.55), transparent 58%),
    linear-gradient(160deg, rgba(255, 250, 241, 0.95), rgba(223, 195, 146, 0.8));
  border: 6px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 26px 60px rgba(18, 40, 74, 0.16),
    inset 0 0 0 1px rgba(201, 152, 68, 0.22);
  position: relative;
  z-index: 1;
}

.portrait-core {
  width: calc(100% - 42px);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(218, 199, 171, 0.95), rgba(160, 141, 119, 0.95));
}

.portrait-badge {
  position: absolute;
  right: 18px;
  bottom: 38px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 251, 245, 0.94);
  border: 1px solid rgba(20, 40, 75, 0.1);
  box-shadow: 0 18px 36px rgba(18, 40, 74, 0.12);
  z-index: 2;
}

.portrait-badge span {
  display: block;
  color: #97703a;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portrait-badge strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
}

.portrait-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.note-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin: -34px auto 20px;
  width: calc(100% - 70px);
  padding: 26px 30px;
  background: rgba(255, 251, 245, 0.92);
  z-index: 2;
}

.note-quote {
  font-family: "Cormorant Garamond", serif;
  font-size: 5rem;
  line-height: 1;
  color: var(--accent);
}

.note-copy p {
  margin: 10px 0 0;
  max-width: 72ch;
  line-height: 1.75;
}

.note-sign {
  min-width: 180px;
  padding-left: 20px;
  border-left: 1px solid rgba(20, 40, 75, 0.12);
}

.note-sign span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

.note-sign strong {
  display: block;
  margin-top: 10px;
  font-size: 2rem;
  font-style: italic;
}

.flash {
  margin: 0 0 20px;
  padding: 16px 20px;
  background: rgba(255, 251, 245, 0.92);
  font-weight: 600;
}

.flash.success {
  border-color: rgba(46, 125, 50, 0.24);
}

.flash.error {
  border-color: rgba(176, 44, 44, 0.24);
}

.panel {
  padding: 30px;
  background: rgba(255, 251, 245, 0.9);
}

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

.section-heading h2 {
  max-width: 14ch;
}

.section-inline {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.section-badge {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(201, 152, 68, 0.12);
  color: #8f6722;
  font-size: 0.95rem;
  font-weight: 700;
}

.form-panel {
  margin-bottom: 20px;
}

.message-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.wide-field {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 0.94rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  outline: none;
}

input:focus,
textarea:focus {
  border-color: rgba(201, 152, 68, 0.44);
  box-shadow: 0 0 0 4px rgba(201, 152, 68, 0.12);
}

textarea {
  resize: vertical;
  min-height: 140px;
}

.form-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-hint strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 1;
}

.form-hint span {
  color: var(--muted);
  font-size: 0.92rem;
}

.message-wall {
  margin-bottom: 20px;
}

.message-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.message-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.message-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.avatar-pill {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(160deg, rgba(201, 152, 68, 0.95), rgba(170, 124, 43, 0.94));
  color: #fff7ea;
  font-size: 0.95rem;
  font-weight: 700;
}

.message-id p,
.memory-team {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.message-card p {
  margin: 0;
  line-height: 1.72;
}

.message-date {
  color: #97703a;
  font-size: 0.82rem;
  font-weight: 700;
}

.gallery-section {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.memory-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.memory-card-large {
  grid-column: span 2;
}

.memory-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.memory-card-large img {
  aspect-ratio: 16 / 8.4;
}

.memory-copy {
  padding: 18px;
}

.memory-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
}

.memory-head span {
  color: #97703a;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.memory-copy p {
  margin: 0;
  line-height: 1.7;
}

.upload-panel {
  align-self: start;
  position: sticky;
  top: 18px;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.empty-state {
  margin: 0;
  padding-top: 6px;
  line-height: 1.7;
}

@media (max-width: 980px) {
  .menu,
  .hero-panel,
  .message-grid,
  .gallery-section,
  .gallery-grid,
  .message-form {
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-inline,
  .form-submit,
  .note-panel {
    display: grid;
  }

  .topbar {
    justify-content: initial;
    top: 10px;
    width: calc(100% - 20px);
    padding: 16px 18px;
  }

  .menu {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .hero-panel,
  .panel {
    padding: 24px;
  }

  .page-shell {
    width: min(100% - 20px, 1220px);
    padding-top: 108px;
  }

  .hero-panel {
    padding-bottom: 28px;
  }

  .hero-panel .hero-copy::before,
  .hero-leaf {
    display: none;
  }

  .hero-copy {
    padding: 8px 0 0;
  }

  .hero-portrait {
    min-height: 300px;
  }

  .portrait-ring {
    width: min(100%, 280px);
  }

  .note-panel {
    gap: 14px;
    width: 100%;
    margin: 16px 0 20px;
  }

  .note-sign {
    padding-left: 0;
    border-left: 0;
  }

  .memory-card-large {
    grid-column: auto;
  }

  .upload-panel {
    position: static;
  }
}
