/* ===================================================================
   Wedding Week — Mobile-first styles (desktop overrides at bottom)
   =================================================================== */

/* -------------------------
   Theme tokens
   ------------------------- */
:root {
  /* brand */
  --purple: #6F4CF6;
  --blue:   #2A74FF;

  /* pastel bloom colors for banner */
  --bloom-pink:  #f4b3ea;
  --bloom-peach: #ffc78f;
  --bloom-sky:   #bfe0ff;
  --bloom-lilac: #d9c7ff;

  /* surfaces & text (mobile-first assumes dark page; cards are light) */
  --bg: #0b1220;
  --surface: #111827;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --ring: #1f2937;

  /* subline/venue default (DARKER by default for readability in light mode too) */
  --subtext: #1f2937; /* slate-800 */

  /* soft tints */
  --soft:        #0f172a;
  --soft-purple: #1a1630;
  --soft-blue:   #0e1a33;

  /* itinerary pastels (light cards) */
  --pastel-lilac: #f2e7ff; /* wedding */
  --pastel-sky:   #e8f0ff; /* tour */
  --pastel-peach: #ffe9d6; /* meal */
  --pastel-stone: #f3f4f6; /* free/other */

  /* legible text for light cards */
  --card-text:  #0f172a;
  --card-muted: #475569;

  /* effects */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
  --shadow-md: 0 10px 30px rgba(0,0,0,.45);

  --radius: 16px;
}

/* Light mode tokens (cards stay light either way) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --ring: #e2e8f0;
    --soft:        #F6F8FF;
    --soft-purple: #F2EEFF;
    --soft-blue:   #ECF3FF;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 6px 24px rgba(15, 23, 42, .06);
    /* keep --subtext dark in light mode */
    --subtext: #1f2937;
  }
}

/* Dark mode tokens */
@media (prefers-color-scheme: dark) {
  :root {
    /* Tokens that flip for dark mode */
    --subtext:   #d1d9e6; /* subline/venue on dark backgrounds */
    --card-text: #f3f7ff; /* used by .day-heading (bright) */
    --card-muted:#d1d9e6; /* used by .day-sub (light) */
  }
}

/* -------------------------
   Base layout (mobile first)
   ------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
}
img, picture, video, canvas { display:block; max-width:100%; }
.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* -------------------------
   Banner (pastel bloom) + countdown
   ------------------------- */
.banner {
  background:
    radial-gradient(900px 500px at 10% 15%, var(--bloom-peach) 0%, transparent 60%),
    radial-gradient(800px 480px at 80% 10%, var(--bloom-pink) 0%, transparent 60%),
    radial-gradient(900px 520px at 70% 90%, var(--bloom-sky) 0%, transparent 60%),
    linear-gradient(90deg, var(--bloom-lilac), var(--bloom-sky));
  color: #111;
}
.banner .inner { padding: 36px 16px; }
.countdown-wrap { display: flex; justify-content: center; }
.pill {
  display:inline-flex; align-items:center; gap:8px;
  background: rgba(255,255,255,.92); color:#111;
  padding: 10px 16px; border-radius: 999px; font-size: 16px; font-weight: 600;
}

/* -------------------------
   Site tabs (Home / Calendar)
   ------------------------- */
.site-tabs {
  position: sticky; top: 0; z-index: 5;
  backdrop-filter: saturate(1.2) blur(6px);
  background: linear-gradient(90deg,#ffe5c7,#f6d0f0 55%,#d7e9ff);
  border-bottom: 1px solid rgba(15,23,42,.08);
  display: flex; gap: 6px; padding: 8px 12px; justify-content: center;
}
.site-tab {
  text-decoration: none;
  color: #111;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(15,23,42,.15);
  padding: 8px 12px; border-radius: 999px; font-weight: 700;
}
.site-tab[aria-selected="true"] {
  background: #fff; border-color: rgba(15,23,42,.28);
}

/* -------------------------
   Views
   ------------------------- */
.view.hidden { display: none; }

/* Home hero (mobile) */
.hero { text-align: center; margin: 24px auto 8px; }
.hero-title {
  font-family: "Dancing Script", cursive;
  font-size: clamp(28px, 9vw, 42px);
  margin: 0; line-height: 1.1;
}
.hero-sub   { color: var(--subtext); margin: 10px 0 0; font-weight: 500; }
.venue-link { color: var(--subtext); text-decoration: underline; text-underline-offset: 3px; }

/* Couple photo — fuller bleed on mobile */
.hero-photo { margin: 16px -16px 32px; }
.hero-photo img { width: 100%; height: auto; border-radius: 22px; box-shadow: var(--shadow-md); }

/* Calendar (all days stacked) */
.section-title { font-size: 18px; margin: 18px 0 6px; }
.day-group { margin: 22px 0 30px; }
.day-heading { font-weight: 700; font-size: 17px; margin: 0 0 6px; color: var(--card-text); }
.day-sub { color: var(--card-muted); margin: 0 0 12px; }

/* -------------------------
   Cards, buttons, badges — PASTEL & LEGIBLE
   ------------------------- */
.grid { display: grid; gap: 10px; margin: 12px 0 0; }

/* Event cards use the Tel Aviv tour pastel sky color */
.card {
  background: var(--pastel-sky);
  border: 1px solid #cfe0ff;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.row { display:flex; flex-direction: column; align-items:flex-start; gap: 8px; }
.time { min-width: 0; display:flex; align-items:center; gap:8px; color: #334155; font-weight: 600; }
.title { font-weight: 700; color: var(--card-text); }
.muted { color: var(--card-muted); font-size: 14px; }

/* Buttons: Map, Google, and ICS all match */
.btns { display:flex; flex-wrap:wrap; gap:10px; margin-top: 10px; }
.btn  { width: 100%; justify-content: center; padding: 10px 14px; border-radius: 12px; border: 1px solid transparent; cursor:pointer; text-decoration:none; color: #0f172a; }
.btn.map,
.btn.google,
.btn.ics { background: #dbeafe; border-color: #bfdbfe; }
.btn:hover  { filter: brightness(0.99); }
.btn:active { transform: translateY(0.5px); }
:where(.btn, .site-tab):focus-visible { outline: 2px solid #93c5fd; outline-offset: 2px; }

/* Badges */
.badge { display:inline-flex; align-items:center; gap:6px; font-size:12px; padding:6px 10px; border-radius:999px; color:#0f172a; background:#e2e8f0; }
.badge.meal    { background:#f5e9ff; }
.badge.tour    { background:#dbeafe; }
.badge.free    { background:#e2e8f0; }
.badge.wedding { background:#f0e3ff; }

/* Footer & error banner */
.site-footer { text-align:center; color:#94a3b8; font-size:12px; padding: 28px 0 56px; }
.error { background:#fff1f2; color:#9f1239; border:1px solid #fecdd3; padding:12px 14px; border-radius:12px; margin-top:16px; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ===================================================================
   DESKTOP / WIDER SCREENS (≥ 768px)
   =================================================================== */
@media (min-width: 768px) {
  .container { padding: 0 24px; }

  .banner .inner { padding: 56px 24px; }
  .pill { font-size: 14px; padding: 8px 12px; }

  .site-tabs {
    background: rgba(255,255,255,.65);
    border-bottom: 1px solid var(--ring);
    gap: 8px; padding: 10px 16px;
  }
  @media (prefers-color-scheme: dark) {
    .site-tabs { background: rgba(15,23,42,.6); }
  }
  .site-tab { color: var(--text); background: transparent; border: 1px solid transparent; }
  .site-tab[aria-selected="true"] { border-color: var(--ring); background: #fff; }
  @media (prefers-color-scheme: dark) {
    .site-tab[aria-selected="true"] { background: #111827; }
  }

  /* Home hero */
  .hero { margin: 28px auto 10px; }
  .hero-title { font-size: clamp(32px, 4.5vw, 44px); }

  /* Photo to normal width with gentle radius */
  .hero-photo { margin: 20px auto 40px; max-width: 820px; }
  .hero-photo img { border-radius: 24px; }

  /* Calendar headings */
  .section-title { font-size: 20px; }
  .day-heading { font-size: 18px; }
  .day-sub { font-size: 15px; }

  .grid { gap: 12px; }
  .row { flex-direction: row; gap: 12px; }
  .time { min-width: 120px; color: #334155; }
  .btn { width: auto; justify-content: center; padding: 8px 12px; }
}

/* ===================================================================
   DARK MODE — pastel tints
   =================================================================== */
@media (prefers-color-scheme: dark) {
  .card {
    background: rgba(191,224,255, .16);   /* #bfe0ff @ 16% */
    border-color: rgba(191,224,255, .32);
  }
  .title { color: #f3f7ff; }
  .muted, .time { color: #d1d9e6; }

  .btn.map,
  .btn.google,
  .btn.ics {
    background: rgba(191,224,255, .22);
    border-color: rgba(191,224,255, .38);
    color: #eff6ff;
  }

  .badge { color: #0b1220; }
  .badge.tour    { background: rgba(191,224,255, .60); }
  .badge.meal    { background: rgba(242,233,255, .65); }
  .badge.free    { background: rgba(226,232,240, .60); }
  .badge.wedding { background: rgba(240,227,255, .65); }
}

/* ===================================================================
   VERY NARROW phones (≤ 360px)
   =================================================================== */
@media (max-width: 360px) {
  .pill { font-size: 15px; padding: 9px 14px; }
  .site-tab { padding: 7px 10px; }
}
