/* ─── Reset & variables ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold:       #C9A84C;
  --gold-dark:  #9A7A2E;
  --gold-pale:  #F5EDDA;
  --hero-bg:    #1B1008;
  --hero-mid:   #2E1E0F;
  --cream:      #FEFCF8;
  --warm-white: #FAF7F2;
  --text:       #2A2420;
  --muted:      #7A6D65;
  --border:     #E8DDD0;
  --card-bg:    #FFFFFF;
  --error:      #B91C1C;
  --success:    #166534;

  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 2px 20px rgba(0, 0, 0, 0.07);
  --shadow-md:  0 4px 32px rgba(0, 0, 0, 0.10);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}


/* ─── Hero ──────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--hero-bg) 0%, var(--hero-mid) 100%);
  color: white;
  padding: 3.5rem 1.5rem 3rem;
}

.hero-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .hero-inner {
    flex-direction: row;
    text-align: left;
    gap: 3.5rem;
    align-items: center;
  }
}

/* Photo */
.photo-frame {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 4px solid var(--gold);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  background: #3A2210;
}

@media (min-width: 640px) {
  .photo-frame { width: 253px; height: 253px; }
}

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

.photo-initials {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--gold);
}

.photo-frame.no-photo img { display: none; }
.photo-frame.no-photo .photo-initials { display: flex; }

/* Hero text */
.hero-text { flex: 1; }

.hero-pre {
  font-size: 1.0rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.5rem;
}

.hero-name {
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.hero-milestone {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 3.5vw, 1.6rem);
  font-weight: 400;
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.35rem;
  line-height: 1.4;
}

.hero-milestone .gold {
  color: var(--gold);
  font-style: normal;
  font-weight: 700;
  font-size: 1.15em;
}


/* ─── Intro section ─────────────────────────────────────── */
.intro {
  background: var(--warm-white);
  padding: 2rem 1.5rem 1rem;
  text-align: center;
}

.container {
  max-width: 680px;
  margin: 0 auto;
}

.intro-lead {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 3vw, 1.3rem);
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 1rem;
}

.intro-body {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.deadline-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  background: white;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 0.25rem 1.75rem;
}

.deadline-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.deadline-date {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

/* ─── What to share section ─────────────────────────────── */
.what-to-share {
  padding: 0.25rem 1.5rem 4rem;
  text-align: center;
}

.what-to-share h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2rem);
  margin-bottom: 2rem;
}

.share-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.share-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: left;
  box-shadow: var(--shadow);
}

.share-card-icon {
  width: 48px;
  height: 48px;
  background: var(--gold-pale);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  color: var(--gold-dark);
}

.share-card-icon svg { width: 24px; height: 24px; }

.share-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.share-card p { font-size: 0.925rem; color: var(--muted); }

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

.cta-note {
  font-style: italic;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--gold);
  color: var(--hero-bg);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.1s ease, box-shadow 0.18s ease;
  letter-spacing: 0.01em;
}

.btn:hover {
  background: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn:active { transform: translateY(0); box-shadow: none; }

.btn-hero { margin-top: 0.5rem; }

.btn-large { padding: 1rem 2.5rem; font-size: 1.05rem; }

.btn-full { width: 100%; text-align: center; justify-content: center; }

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  color: var(--gold-dark);
  border: 2px solid var(--gold);
}

.btn-outline:hover {
  background: var(--gold-pale);
  transform: translateY(-2px);
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}


/* ═══════════════════════════════════════════════════════════
   FORM PAGE (submit.html + thank-you.html)
═══════════════════════════════════════════════════════════ */
body.form-page {
  background: var(--warm-white);
  min-height: 100vh;
}

/* Header */
.form-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: white;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

.back-link svg { width: 16px; height: 16px; }
.back-link:hover { color: var(--text); }

.form-header-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text);
  margin-left: auto;
  padding-right: 0.5rem;
}

/* Form layout */
.form-main {
  padding: 2rem 1.5rem 4rem;
}

.form-container {
  max-width: 560px;
  margin: 0 auto;
}

.form-title {
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  margin-bottom: 0.5rem;
}

.form-subtitle {
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}

/* Fields */
.field {
  margin-bottom: 1.75rem;
}

.label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.required { color: var(--gold-dark); }

.optional {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85rem;
}

.field-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A6D65' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 18px;
  padding-right: 2.5rem;
  cursor: pointer;
}

.textarea { resize: vertical; min-height: 90px; }

/* Type selector */
.type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.type-card {
  cursor: pointer;
  display: block;
}

.type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1.25rem 1rem;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.type-card:hover .type-card-inner {
  border-color: var(--gold);
  background: var(--gold-pale);
}

.type-card input[type="radio"]:checked + .type-card-inner {
  border-color: var(--gold);
  background: var(--gold-pale);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
}

.type-icon {
  width: 32px;
  height: 32px;
  color: var(--gold-dark);
  margin-bottom: 0.1rem;
}

.type-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.type-desc {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Decade selector */
.decade-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.decade-btn {
  cursor: pointer;
}

.decade-btn input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.decade-btn span {
  display: block;
  padding: 0.5rem 1.1rem;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.decade-btn:hover span {
  border-color: var(--gold);
  background: var(--gold-pale);
}

.decade-btn input[type="radio"]:checked + span {
  border-color: var(--gold);
  background: var(--gold-pale);
  color: var(--gold-dark);
  font-weight: 600;
  box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.2);
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: white;
  padding: 2.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  outline: none;
}

.upload-zone:hover,
.upload-zone:focus {
  border-color: var(--gold);
  background: var(--gold-pale);
}

.upload-zone.dragover {
  border-color: var(--gold);
  background: var(--gold-pale);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
}

.upload-icon {
  width: 40px;
  height: 40px;
  color: var(--muted);
  margin: 0 auto 0.75rem;
  display: block;
}

.upload-primary {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.upload-secondary { font-size: 0.85rem; color: var(--muted); }

.upload-link {
  color: var(--gold-dark);
  font-weight: 600;
  text-decoration: underline;
}

.upload-types {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* File list */
.file-list {
  list-style: none;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  font-size: 0.875rem;
}

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70%;
  color: var(--text);
}

.file-size { color: var(--muted); flex-shrink: 0; }

/* Error */
.form-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: var(--radius-sm);
  color: var(--error);
  padding: 0.8rem 1rem;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* Progress */
.progress-wrapper {
  margin-bottom: 1.25rem;
}

.progress-track {
  height: 8px;
  background: var(--border);
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 50px;
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* Form footer note */
.form-note {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 1rem;
}


/* ─── Thank you page ─────────────────────────────────────── */
.thankyou-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

.thankyou-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.thankyou-icon {
  width: 64px;
  height: 64px;
  background: #FFF5F5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: #E11D48;
}

.thankyou-icon svg { width: 32px; height: 32px; }

.thankyou-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.thankyou-body {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.975rem;
}

.thankyou-deadline {
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 2rem;
}

.thankyou-share {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.share-prompt {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.share-copied {
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 500;
  margin-top: 0.5rem;
}

.another-link {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.another-link:hover { color: var(--text); }
