/* public/styles.css
 * Wedding site design system.
 * Palette + type + base body. Components are added in later tasks.
 */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Jost:ital,wght@0,100..900;1,100..900&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ---- Bloom theme (floral palette) ---- */
  --moss:    #C85555;   /* accent — pomegranate, same family as the hero's eyebrow/amp */
  --shell:   #FFF6EC;   /* warm cream — surfaces + light text on dark fills */
  --ember:   #C85555;   /* pomegranate — links, CTA hover */
  --brick:   #C85555;   /* pomegranate — eyebrows, labels, thread, hairline */
  --coral:   #F7BCB0;   /* light melon */
  --apricot: #EAA624;   /* glazed apricot */
  --honey:   #F7D2A1;   /* soft apricot tint — hovers, faq tile */
  --blue:    #AADCF2;   /* van gogh blue */
  --ivory:   #FFFCF6;
  --hairline: rgba(200, 85, 85, 0.20);
  --stripe-1: #AADCF2;     /* cabana stripe a — sky blue */
  --stripe-2: var(--honey); /* cabana stripe b — soft apricot (the FAQ tile color) */

  /* Legacy palette — still used by pages not yet migrated */
  --pumpkin:  #e8893a;
  --cayenne:  #d63a1f;
  --bordeaux: #46402F;  /* bloom body ink (dark warm taupe) */
  --fuchsia:  #c93a8a;
  --rosa:     #f3c5c0;
  --sage:     #7a8f5e;
  --cream:    #f7eddd;

  --display: 'Fraunces', Georgia, serif;
  --sans:    'Jost', system-ui, sans-serif; /* disco-era geometric (Avant Garde shape); Inter stays pinned in the hero only */

  /* Type sizes */
  --caps-xs: 9px;
  --caps-sm: 10px;
  --caps-md: 11px;
  --body:    16px;
  --body-sm: 14px;
  --title-event: 18px;
  --title-page-mobile: 30px;
  --title-page:        36px;
  --display-mobile: 32px;
  --display-lg:     48px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: repeating-linear-gradient(
    to right,
    var(--stripe-1) 0,
    var(--stripe-1) 80px,
    var(--stripe-2) 80px,
    var(--stripe-2) 160px
  );
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--bordeaux);
  font-family: var(--sans);
  font-weight: 400;
  font-size: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }

a { color: var(--ember); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--fuchsia); }

::selection { background: var(--ember); color: var(--shell); }

img { max-width: 100%; height: auto; display: block; }

/* Utilities used across components */
.caps {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: var(--caps-sm);
  color: var(--brick);
  margin-bottom: 8px;
}
.page-title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
  font-size: var(--title-page-mobile);
  line-height: 1.05;
  color: var(--ember);
  letter-spacing: 0;
}

@media (min-width: 720px) {
  .page-title { font-size: var(--title-page); }
}

/* ============================================================
 * Component: .framed-card
 * The letterpress hero unit. Used at large scale on the landing,
 * smaller scale on /registry link tiles.
 * ============================================================ */
.framed-card {
  background: var(--pumpkin);
  box-shadow:
    inset 0 0 0 4px var(--pumpkin),
    inset 0 0 0 5px var(--cayenne);
  padding: 32px 28px;
  width: 100%;
  max-width: 360px;
  color: var(--cayenne);
  position: relative;
  text-align: center;
}

@media (min-width: 720px) {
  .framed-card { padding: 40px 36px; }
}

.framed-card .corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 1px solid var(--cayenne);
  border-radius: 50%;
  background: var(--pumpkin);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cayenne);
}
.framed-card .corner svg { width: 14px; height: 14px; }
.framed-card .corner.tl { top: -14px; left: 22px; }
.framed-card .corner.tr { top: -14px; right: 22px; }
.framed-card .corner.bl { bottom: -14px; left: 22px; }
.framed-card .corner.br { bottom: -14px; right: 22px; }

.framed-card .fc-eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: var(--caps-xs);
  margin-bottom: 22px;
  color: var(--cayenne);
}

.framed-card .fc-name {
  font-family: var(--display);
  font-weight: 900;
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
  font-size: var(--display-mobile);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--cayenne);
}
@media (min-width: 720px) {
  .framed-card .fc-name { font-size: var(--display-lg); }
}
.framed-card .fc-amp {
  font-style: italic;
  font-weight: 400;
  display: block;
  margin: 12px 0;
}

.framed-card .fc-medallion {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--fuchsia);
  margin: 22px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 7px var(--rosa),
    0 0 0 8px var(--cayenne);
  color: var(--rosa);
}
.framed-card .fc-medallion svg { width: 56px; height: 56px; }

.framed-card .fc-meta {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: var(--caps-xs);
  margin-top: 16px;
}
.framed-card .fc-meta + .fc-meta { margin-top: 6px; font-size: 8px; }

.framed-card .fc-cta {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 22px;
  background: var(--cayenne);
  color: var(--rosa);
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: var(--caps-sm);
  text-decoration: none;
  border: 0;
  cursor: pointer;
}
.framed-card .fc-cta:hover { background: var(--bordeaux); color: var(--rosa); }

/* ============================================================
 * Component: sub-page header
 * Used on every page except / (the landing).
 * Structure:
 *   <header class="site-header">
 *     <a class="wordmark" href="/">Izzy &amp; Adam · 5.30.27</a>
 *     <nav class="grid-nav"> 5 tiles </nav>
 *     <a class="rsvp-bar" href="/rsvp">RSVP →</a>
 *   </header>
 * ============================================================ */

.site-header {
  background: var(--shell);
}

.wordmark {
  display: block;
  padding: 14px 20px;
  background: var(--shell);
  color: var(--moss);
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: var(--caps-sm);
  text-align: center;
  text-decoration: none;
}
.wordmark .amp { color: var(--brick); font-style: italic; font-weight: 400; }

.grid-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
@media (min-width: 720px) {
  .grid-nav { grid-template-columns: repeat(6, 1fr); }
}

.nav-tile {
  position: relative;
  padding: 18px 4px;
  text-align: center;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: var(--caps-xs);
  text-decoration: none;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-tile.story    { background: var(--coral);   color: var(--bordeaux); }
.nav-tile.schedule { background: var(--apricot); color: var(--bordeaux); }
.nav-tile.travel   { background: var(--moss);    color: var(--shell); }
.nav-tile.registry { background: var(--blue);    color: var(--bordeaux); }
.nav-tile.faq      { background: var(--honey);   color: var(--bordeaux); }
.nav-tile.rsvp     { background: var(--ember);   color: var(--shell); }

.nav-tile[data-active]::before {
  content: '';
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 3px;
  background: currentColor;
  opacity: 0.6;
}

/* Page body wrapper — a framed shell sheet floating on the stripe field,
 * echoing the landing's card. Stripes show in the margins around it. */
.page-body {
  max-width: 640px;
  margin: 20px 14px;
  padding: 32px 22px 48px;
  background: var(--shell);
  border: 1px solid var(--moss);
  box-shadow: 0 14px 36px rgba(60, 30, 20, 0.24);
}
@media (min-width: 720px) {
  .page-body {
    margin: 44px auto;
    padding: 56px 48px 72px;
  }
}

.page-head { margin-bottom: 32px; }

.page-intro {
  font-size: var(--body);
  line-height: 1.65;
  margin-bottom: 8px;
  color: var(--bordeaux);
}

.section-title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
  font-size: 24px;
  line-height: 1.1;
  color: var(--moss);
  margin: 40px 0 6px;
}

.page-foot {
  margin-top: 56px;
  text-align: center;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: var(--caps-xs);
  color: var(--bordeaux);
  opacity: 0.7;
}
.page-foot a { color: inherit; text-decoration: none; }
.page-foot a:hover { color: var(--ember); opacity: 1; }

/* ============================================================
 * Component: info-row
 * Used for schedule events, FAQ Q&As, travel sections.
 * ============================================================ */
.info-row {
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
}
.info-row:last-child { border-bottom: none; }

.info-row .when {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: var(--caps-xs);
  color: var(--brick);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-row .when svg { width: 14px; height: 14px; color: var(--brick); }

.info-row .what {
  font-family: var(--display);
  font-weight: 600;
  font-variation-settings: 'SOFT' 100, 'opsz' 60;
  font-size: 19px;
  line-height: 1.2;
  color: var(--bordeaux);
  margin-bottom: 6px;
}

.info-row .where {
  font-size: var(--body);
  line-height: 1.65;
  color: var(--bordeaux);
}

/* ============================================================
 * Story page bits
 * ============================================================ */
.story-photo {
  margin: 0 auto 32px;
  max-width: 360px;
  padding: 8px;
  border: 1px solid var(--cayenne);
  background: var(--cream);
}
.story-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  background: var(--rosa);
}

.story-prose p {
  margin-bottom: 18px;
  font-size: var(--body);
  line-height: 1.65;
  color: var(--bordeaux);
}
.story-prose p:last-child { margin-bottom: 0; }

.story-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
  color: var(--cayenne);
}
.story-divider svg { width: 20px; height: 20px; }

/* ============================================================
 * Registry link tile (small framed-card variant)
 * ============================================================ */
.registry-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 16px;
}
@media (min-width: 720px) {
  .registry-grid { grid-template-columns: 1fr 1fr; }
}

.registry-link {
  display: block;
  text-decoration: none;
  background: var(--moss);
  box-shadow:
    inset 0 0 0 4px var(--moss),
    inset 0 0 0 5px var(--shell);
  padding: 24px;
  text-align: center;
  color: var(--shell);
}
.registry-link:hover {
  background: var(--fuchsia);
  box-shadow:
    inset 0 0 0 4px var(--fuchsia),
    inset 0 0 0 5px var(--shell);
  color: var(--shell);
}

.registry-link .name {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: 24px;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--shell);
}
.registry-link .note {
  font-size: var(--body-sm);
  margin-bottom: 14px;
  color: var(--shell);
  line-height: 1.5;
}
.registry-link .visit {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: var(--caps-xs);
  color: var(--shell);
}

.registry-intro {
  font-size: var(--body);
  line-height: 1.65;
  margin-bottom: 8px;
}

.info-row.faq .when { margin-bottom: 2px; }
.info-row.faq .what { margin-bottom: 8px; }

.faq-map {
  margin: 14px 0 0;
}
.faq-map img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--moss);
  box-shadow: 0 8px 22px rgba(60, 30, 20, 0.16);
}

.faq-foot {
  margin-top: 32px;
  text-align: center;
  font-size: var(--body);
  color: var(--bordeaux);
  line-height: 1.65;
}
.faq-foot strong { font-family: var(--sans); font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--brick); font-size: var(--caps-xs); }

/* ============================================================
 * RSVP form
 * ============================================================ */
.rsvp-intro {
  font-size: var(--body);
  line-height: 1.65;
  margin-bottom: 24px;
}

.rsvp-greeting {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 18px;
  color: var(--moss);
}

#rsvp-search-input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--moss);
  background: var(--ivory);
  font: inherit;
  color: var(--bordeaux);
}
#rsvp-search-input:focus {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}

.search-label {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: var(--caps-xs);
  color: var(--brick);
  margin-bottom: 8px;
}

#rsvp-search-results {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-result {
  padding: 12px;
  border: 1px solid var(--moss);
  background: var(--ivory);
  text-align: left;
  font: inherit;
  color: var(--bordeaux);
  cursor: pointer;
}
.search-result:hover { background: var(--honey); }

#rsvp-search-empty {
  margin-top: 10px;
  font-size: var(--body-sm);
  color: var(--bordeaux);
}

.event-card {
  border: 1px solid var(--moss);
  padding: 16px;
  margin-bottom: 16px;
}
.event-card .ev-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 4px;
  color: var(--bordeaux);
}
.event-card .ev-meta {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: var(--caps-xs);
  color: var(--brick);
  margin-bottom: 12px;
}
.event-card .guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  gap: 12px;
  border-top: 1px solid var(--hairline);
}
.event-card .guest-row:first-of-type { border-top: none; }
.event-card .guest-name { flex: 1; color: var(--bordeaux); }

.toggle { display: inline-flex; gap: 4px; align-items: center; }
.toggle input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.toggle label {
  padding: 6px 14px;
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: var(--caps-xs);
  color: var(--bordeaux);
  border: 1px solid var(--moss);
  background: var(--ivory);
}
.toggle input[type="radio"]:checked + label {
  background: var(--moss);
  color: var(--shell);
}
.toggle input[type="radio"]:focus + label {
  outline: 2px solid var(--ember);
  outline-offset: 1px;
}

#rsvp-form label {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: var(--caps-xs);
  color: var(--brick);
  margin: 18px 0 8px;
}
#rsvp-email, #rsvp-note {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--moss);
  background: var(--ivory);
  font: inherit;
  color: var(--bordeaux);
}
#rsvp-email:focus, #rsvp-note:focus {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}
#rsvp-note { resize: vertical; min-height: 88px; }

#rsvp-form button[type="submit"] {
  margin-top: 24px;
  padding: 14px 24px;
  background: var(--moss);
  color: var(--shell);
  border: 0;
  font: inherit;
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: var(--caps-sm);
  cursor: pointer;
  min-height: 44px;
}
#rsvp-form button[type="submit"]:hover:not(:disabled) { background: var(--fuchsia); }
#rsvp-form button[type="submit"]:disabled { opacity: 0.6; cursor: wait; }

#rsvp-error {
  color: var(--brick);
  font-weight: 700;
  min-height: 1.2em;
  margin-top: 12px;
  font-size: var(--body-sm);
}

.rsvp-success {
  text-align: center;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  color: var(--moss);
  padding: 32px 0;
}
