/* Postcard Theme — Misdelivered.ai Shared Design System */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --color-bg-cream: #fdf6e3;
  --color-bg-cream-dark: #f5edd6;
  --color-bg-cream-darker: #ece3c9;
  --color-bg-navy: #1e3a5f;
  --color-bg-navy-deep: #152d4a;
  --color-bg-white: #fefcf7;
  --color-text-navy: #1e3a5f;
  --color-text-navy-light: #2d5a8a;
  --color-text-ink: #2c2c2c;
  --color-text-ink-light: #5c5c5c;
  --color-text-cream: #fdf6e3;
  --color-text-cream-muted: rgba(253, 246, 227, 0.7);
  --color-accent-stamp-red: #c53030;
  --color-accent-stamp-red-hover: #9b2c2c;
  --color-accent-usps-blue: #333366;
  --color-accent-gold: #b8860b;
  --color-border-ink: rgba(44, 44, 44, 0.15);
  --color-border-ink-strong: rgba(44, 44, 44, 0.3);
  --font-headline: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, sans-serif;
  --nav-height: 56px;
}

/* Reset & Base */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: var(--font-body);
  color: var(--color-text-ink);
  background: var(--color-bg-cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-headline); color: var(--color-text-navy); }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 600; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
a { color: var(--color-accent-stamp-red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* Airmail Stripe */
.airmail-stripe {
  height: 8px; width: 100%;
  background: repeating-linear-gradient(90deg, var(--color-accent-usps-blue) 0px, var(--color-accent-usps-blue) 20px, var(--color-bg-cream) 20px, var(--color-bg-cream) 40px);
}

/* Nav */
.postcard-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height); display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px;
  background: var(--color-bg-cream);
  box-shadow: 0 1px 3px rgba(44,44,44,0.06);
}
.postcard-nav-logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.postcard-nav-logo:hover { text-decoration: none; }
.stamp-icon-sm {
  width: 24px; height: 24px; border: 2px dashed var(--color-accent-stamp-red);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--color-accent-stamp-red); font-weight: 700;
}
.postcard-nav-logo-text { font-family: var(--font-headline); font-weight: 500; font-size: 1.125rem; color: var(--color-text-navy); font-style: italic; }
.postcard-nav-logo-text .ai { color: var(--color-accent-stamp-red); font-style: normal; font-weight: 600; }
.postcard-nav-links { display: flex; align-items: center; gap: 24px; }
.postcard-nav-links a { color: var(--color-text-navy); font-size: 0.9375rem; font-weight: 500; text-decoration: none; transition: color 200ms; }
.postcard-nav-links a:hover { color: var(--color-accent-stamp-red); text-decoration: none; }
.btn-nav-cta {
  background: var(--color-accent-stamp-red); color: var(--color-text-cream); border: none;
  padding: 8px 20px; border-radius: 3px; font-weight: 600; font-size: 0.875rem;
  cursor: pointer; transition: all 250ms; font-family: var(--font-body);
  text-decoration: none; display: inline-block;
}
.btn-nav-cta:hover { background: var(--color-accent-stamp-red-hover); transform: translateY(-1px); box-shadow: 0 0 16px rgba(197,48,48,0.25); text-decoration: none; }
/* Hamburger */
.nav-hamburger {
  background: none; border: none; cursor: pointer; padding: 4px;
  display: flex; flex-direction: column; gap: 5px; margin-left: 12px;
}
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--color-text-navy); transition: all 200ms; }
.nav-hamburger:hover span { background: var(--color-accent-stamp-red); }
/* Mobile dropdown */
.nav-mobile-dropdown {
  display: none; position: absolute; top: var(--nav-height); left: 0; right: 0;
  background: var(--color-bg-cream); box-shadow: 0 4px 12px rgba(44,44,44,0.1);
  padding: 16px 32px; flex-direction: column; gap: 16px;
}
.nav-mobile-dropdown.open { display: flex !important; }
.nav-mobile-dropdown a { color: var(--color-text-navy); font-size: 1rem; font-weight: 500; text-decoration: none; padding: 8px 0; border-bottom: 1px dashed var(--color-border-ink); }
.nav-mobile-dropdown a:hover { color: var(--color-accent-stamp-red); }

@media (max-width: 768px) {
  .postcard-nav-links .nav-link-desktop { display: none; }
}
@media (min-width: 769px) {
  .nav-mobile-dropdown { display: none; }
  .nav-mobile-dropdown.open { display: flex !important; }
}

/* Main content offset for fixed nav */
.main-content { margin-top: calc(var(--nav-height) + 8px); }

/* Buttons */
.btn-stamp-red {
  background: var(--color-accent-stamp-red); color: var(--color-text-cream); border: none;
  padding: 12px 28px; border-radius: 3px; font-weight: 600; font-size: 1.125rem;
  cursor: pointer; font-family: var(--font-body); transition: all 250ms;
  text-decoration: none; display: inline-block;
}
.btn-stamp-red:hover { background: var(--color-accent-stamp-red-hover); transform: translateY(-1px); box-shadow: 0 0 16px rgba(197,48,48,0.25); text-decoration: none; }
.btn-outline-navy {
  background: transparent; color: var(--color-text-navy); border: 2px solid var(--color-text-navy);
  padding: 10px 24px; border-radius: 3px; font-weight: 600; font-size: 1rem;
  cursor: pointer; font-family: var(--font-body); transition: all 250ms;
  text-decoration: none; display: inline-block;
}
.btn-outline-navy:hover { background: var(--color-text-navy); color: var(--color-text-cream); text-decoration: none; }

/* Cards */
.postcard-card {
  background: var(--color-bg-white); border-radius: 3px; padding: 32px;
  box-shadow: 0 4px 8px rgba(44,44,44,0.08);
  border: 1px dashed var(--color-border-ink-strong);
  transition: transform 300ms, box-shadow 300ms;
}
.postcard-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(44,44,44,0.1); }

/* Forms */
.form-card {
  background: var(--color-bg-white); border-radius: 3px; padding: 32px;
  box-shadow: 0 4px 12px rgba(44,44,44,0.08);
  border: 1px dashed var(--color-border-ink-strong);
  max-width: 640px; margin: 32px auto;
}
.form-group { margin-bottom: 24px; }
.form-group label {
  display: block; font-weight: 600; margin-bottom: 8px;
  color: var(--color-text-navy); font-family: var(--font-headline); font-size: 1.0625rem;
}
.form-group .label-hint { font-weight: 400; color: var(--color-text-ink-light); font-size: 0.85rem; font-family: var(--font-body); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
textarea, select {
  width: 100%; padding: 12px 16px;
  border: 1px dashed var(--color-border-ink-strong);
  border-radius: 3px; font-size: 1rem; font-family: var(--font-body);
  background: var(--color-bg-cream); color: var(--color-text-ink);
  transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--color-accent-stamp-red); border-style: solid;
}
textarea { min-height: 100px; resize: vertical; }
.optional-tag {
  background: var(--color-bg-cream-dark); color: var(--color-text-ink-light);
  padding: 2px 8px; border-radius: 3px; font-size: 0.75rem; margin-left: 8px;
  border: 1px dashed var(--color-border-ink);
}

/* Step indicators */
.step-indicator { display: flex; justify-content: center; gap: 12px; margin-bottom: 32px; }
.step-dot {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.875rem; transition: all 300ms;
  border: 2px dashed var(--color-border-ink-strong); color: var(--color-text-ink-light);
  background: var(--color-bg-white);
}
.step-dot.active {
  background: var(--color-bg-navy); color: var(--color-text-cream);
  border: 2px solid var(--color-bg-navy); border-style: solid;
}
.step-dot.completed {
  background: var(--color-accent-stamp-red); color: var(--color-text-cream);
  border: 2px solid var(--color-accent-stamp-red); border-style: solid;
}

/* Photo upload */
.photo-upload {
  border: 2px dashed var(--color-border-ink-strong); border-radius: 3px;
  padding: 32px; text-align: center; cursor: pointer; transition: all 0.2s;
  background: var(--color-bg-cream);
}
.photo-upload:hover { border-color: var(--color-accent-stamp-red); }
.photo-upload input { display: none; }

/* Privacy notice */
.privacy-notice {
  background: var(--color-bg-cream); border: 1px dashed var(--color-border-ink-strong);
  border-radius: 3px; padding: 16px; font-size: 0.875rem;
  color: var(--color-text-ink-light); margin-bottom: 24px;
}
.privacy-notice strong { color: var(--color-text-navy); }

/* Submit button */
.submit-btn {
  width: 100%; background: var(--color-accent-stamp-red); color: var(--color-text-cream);
  border: none; padding: 16px; border-radius: 3px; font-size: 1rem; font-weight: 700;
  cursor: pointer; transition: all 250ms; font-family: var(--font-body);
}
.submit-btn:hover { background: var(--color-accent-stamp-red-hover); transform: translateY(-2px); box-shadow: 0 0 16px rgba(197,48,48,0.25); }
.submit-btn:disabled { background: var(--color-border-ink-strong); cursor: not-allowed; transform: none; box-shadow: none; }

/* Success */
.success-icon { font-size: 4rem; margin-bottom: 16px; }
.success-message { text-align: center; padding: 40px 20px; }
.submission-id {
  background: var(--color-bg-cream-dark); border: 1px dashed var(--color-border-ink-strong);
  padding: 12px 20px; border-radius: 3px; font-family: monospace; margin: 16px 0; display: inline-block;
}

/* Footer */
.postcard-footer {
  background: var(--color-bg-navy); padding: 64px 32px 24px;
}
.postcard-footer-inner { max-width: 1100px; margin: 0 auto; }
.postcard-footer-card {
  background: var(--color-bg-navy-deep); border: 1px solid rgba(253,246,227,0.15);
  border-radius: 6px; padding: 40px; margin-bottom: 24px;
}
.postcard-footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px; margin-bottom: 24px; }
.postcard-footer-col a { display: block; color: rgba(253,246,227,0.7); text-decoration: none; font-size: 0.875rem; margin-bottom: 6px; transition: color 200ms; }
.postcard-footer-col a:hover { color: var(--color-text-cream); }
.postcard-footer-divider { border: none; border-top: 2px dashed rgba(253,246,227,0.3); margin: 24px 0; }
.postcard-footer-copy { font-size: 0.8125rem; color: rgba(253,246,227,0.5); text-align: center; }

/* Section utilities */
.section-cream { background: var(--color-bg-cream); padding: 80px 32px; }
.section-cream-dark { background: var(--color-bg-cream-dark); padding: 80px 32px; }
.section-navy { background: var(--color-bg-navy); padding: 80px 32px; color: var(--color-text-cream); }
.section-inner { max-width: 1100px; margin: 0 auto; }

/* Torn edge */
.torn-edge {
  width: 100%; height: 24px; overflow: hidden; position: relative;
}
.torn-edge::after {
  content: ''; position: absolute; top: -6px; left: -2%; width: 104%; height: 100%;
  background: var(--color-bg-cream-dark);
  clip-path: polygon(0% 60%,3% 35%,6% 70%,9% 40%,12% 65%,15% 30%,18% 55%,21% 35%,24% 60%,27% 40%,30% 70%,33% 45%,36% 60%,39% 30%,42% 55%,45% 35%,48% 65%,51% 40%,54% 60%,57% 30%,60% 55%,63% 40%,66% 70%,69% 35%,72% 60%,75% 40%,78% 55%,81% 30%,84% 60%,87% 45%,90% 65%,93% 35%,96% 55%,100% 40%,100% 100%,0% 100%);
}

/* Photo preview */
.photo-preview { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.photo-preview img { width: 80px; height: 80px; object-fit: cover; border-radius: 3px; border: 2px dashed var(--color-border-ink-strong); }
.photo-preview .remove-photo { position: relative; }
.photo-preview .remove-btn {
  position: absolute; top: -8px; right: -8px;
  background: var(--color-accent-stamp-red); color: white; border: none;
  border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 14px;
}

/* Page container */
.page-container { max-width: 700px; margin: 0 auto; padding: 40px 20px; }

/* Back link */
.back-link { display: inline-block; margin-top: 16px; color: var(--color-bg-navy); text-decoration: none; font-weight: 500; }
.back-link:hover { color: var(--color-accent-stamp-red); }
