/* ============================================================
   Doherty × Ferns — World Cup 2026
   Scotland (Saltire blue) × USA (Old Glory red / navy)
   Theme: bold & playful, tartan textures, flag motifs
   ============================================================ */

:root {
  --scot-blue: #005eb8;   /* Saltire blue */
  --scot-deep: #003f7d;
  --usa-red:   #b31942;   /* Old Glory red */
  --usa-navy:  #0a3161;   /* Old Glory blue */
  --cream:     #fbf7ee;
  --ink:       #14233b;
  --paper:     #ffffff;
  --gold:      #f3c14b;
  --muted:     #5b6b82;
  --line:      #e4e7ee;
  --shadow:    0 10px 30px rgba(10, 49, 97, 0.12);
  --radius:    16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -5%, rgba(0, 94, 184, 0.08), transparent 40%),
    radial-gradient(circle at 92% 0%, rgba(179, 25, 66, 0.08), transparent 42%),
    var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Tartan pattern (reusable) ---------- */
.tartan {
  background-color: var(--usa-navy);
  background-image:
    repeating-linear-gradient(90deg, transparent 0 28px, rgba(255,255,255,.10) 28px 32px, transparent 32px 60px),
    repeating-linear-gradient(0deg,  transparent 0 28px, rgba(255,255,255,.10) 28px 32px, transparent 32px 60px),
    repeating-linear-gradient(90deg, transparent 0 13px, rgba(179,25,66,.55) 13px 19px, transparent 19px 60px),
    repeating-linear-gradient(0deg,  transparent 0 13px, rgba(179,25,66,.55) 13px 19px, transparent 19px 60px),
    repeating-linear-gradient(90deg, transparent 0 44px, rgba(243,193,75,.85) 44px 47px, transparent 47px 60px),
    repeating-linear-gradient(0deg,  transparent 0 44px, rgba(243,193,75,.85) 44px 47px, transparent 47px 60px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--scot-deep) 0%, var(--scot-blue) 48%, var(--usa-navy) 100%);
  border-bottom: 6px solid var(--gold);
}
.hero__tartan {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-color: transparent;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 34px, rgba(255,255,255,.5) 34px 38px, transparent 38px 74px),
    repeating-linear-gradient(0deg,  transparent 0 34px, rgba(255,255,255,.5) 34px 38px, transparent 38px 74px),
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(179,25,66,.9) 16px 23px, transparent 23px 74px),
    repeating-linear-gradient(0deg,  transparent 0 16px, rgba(179,25,66,.9) 16px 23px, transparent 23px 74px);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 64px 24px 56px;
  text-align: center;
}
.hero__kicker {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 700;
  font-size: 0.82rem;
  margin: 0 0 14px;
  color: var(--gold);
}
.hero__kicker .amp { color: #fff; }
.hero__title {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 6.2rem);
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 28px);
  flex-wrap: wrap;
  text-shadow: 0 4px 18px rgba(0,0,0,0.25);
}
.hero__year { color: var(--gold); }
.hero__sub {
  max-width: 620px;
  margin: 18px auto 0;
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  color: rgba(255,255,255,0.92);
}
.hero__meta {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 26px;
}
.pill {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.32);
  backdrop-filter: blur(4px);
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Flag chips flanking the title */
.flag-scot, .flag-usa {
  width: clamp(48px, 9vw, 78px);
  height: clamp(32px, 6vw, 52px);
  border-radius: 7px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  flex: 0 0 auto;
}
.flag-scot {
  background:
    linear-gradient(to bottom right, transparent calc(50% - 4px), #fff calc(50% - 4px), #fff calc(50% + 4px), transparent calc(50% + 4px)),
    linear-gradient(to bottom left,  transparent calc(50% - 4px), #fff calc(50% - 4px), #fff calc(50% + 4px), transparent calc(50% + 4px)),
    var(--scot-blue);
}
.flag-usa {
  background:
    repeating-linear-gradient(to bottom, var(--usa-red) 0 14.28%, #fff 14.28% 28.57%);
  position: relative;
}
.flag-usa::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 42%; height: 53%;
  background: var(--usa-navy);
  border-radius: 7px 0 0 0;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 20px 20px;
}
.section-title {
  font-family: "Fraunces", serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  margin: 8px 0 20px;
  letter-spacing: -0.01em;
  position: relative;
  padding-bottom: 10px;
}
.section-title::after {
  content: "";
  display: block;
  position: absolute;
  bottom: 0; left: 0;
  width: 68px; height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--scot-blue), var(--usa-red));
}

/* ---------- Photo strip (instant-print style) ---------- */
.photos {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(16px, 5vw, 56px);
  flex-wrap: wrap;
  margin: 4px 0 56px;
}
.snap {
  margin: 0;
  background: #fff;
  padding: 12px 12px 0;
  border-radius: 4px;
  box-shadow: 0 14px 34px rgba(10, 49, 97, 0.22);
  width: clamp(220px, 40vw, 320px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.snap--left  { transform: rotate(-3deg); }
.snap--right { transform: rotate(3deg); }
.snap:hover { transform: rotate(0deg) translateY(-4px) scale(1.02); box-shadow: 0 20px 44px rgba(10,49,97,0.28); z-index: 2; }
.snap img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
  background: #e9edf4;
}
.snap figcaption {
  font-family: "Fraunces", serif;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  padding: 12px 6px 16px;
  font-size: 0.96rem;
}
.snap--empty { display: none; }

/* ---------- Anchors ---------- */
.anchors { margin-bottom: 52px; }
.anchors__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.anchor {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  color: #fff;
  box-shadow: var(--shadow);
  isolation: isolate;
}
.anchor--scot { background: linear-gradient(140deg, var(--scot-deep), var(--scot-blue)); }
.anchor--usa  { background: linear-gradient(140deg, var(--usa-navy), #16407a); }
.anchor--golf { background: linear-gradient(140deg, #1f5c3a, #2e8b57); }
.anchor::after {
  content: "";
  position: absolute;
  right: -20px; bottom: -20px;
  font-size: 7rem;
  z-index: -1;
}
.anchor__icon { font-size: 1.7rem; }
.anchor__date {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 700;
  opacity: 0.85;
  margin: 10px 0 4px;
}
.anchor__title {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 0 6px;
}
.anchor__meta { font-size: 0.9rem; opacity: 0.9; margin: 0; }

/* ---------- Day cards ---------- */
.weather-note {
  font-size: 0.86rem;
  color: var(--muted);
  margin: -8px 0 22px;
}
.days {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
}
.day {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.day:hover { transform: translateY(-3px); box-shadow: 0 16px 38px rgba(10,49,97,0.16); }
.day--match { border: 2px solid var(--usa-red); }
.day--match.day--scot { border-color: var(--scot-blue); }

.day__head {
  padding: 18px 20px 16px;
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, var(--scot-deep), var(--scot-blue));
}
.day--usa .day__head  { background: linear-gradient(135deg, var(--usa-navy), #16407a); }
.day--golf .day__head { background: linear-gradient(135deg, #1f5c3a, #2e8b57); }

.day__dow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.9;
  margin: 0;
}
.day__title {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.22rem;
  margin: 4px 0 0;
  line-height: 1.2;
}
.day__badge {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--gold);
  color: var(--ink);
  padding: 4px 10px;
  border-radius: 999px;
}

/* Weather strip */
.day__weather {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: #f4f7fc;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.day__weather .wx-emoji { font-size: 1.5rem; line-height: 1; }
.day__weather .wx-temp { font-weight: 700; color: var(--ink); }
.day__weather .wx-desc { color: var(--muted); }
.day__weather .wx-loc {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
}
.day__weather .wx-tag {
  display: inline-block;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  margin-top: 3px;
}
.wx-tag--live { background: #e3f6ea; color: #1f7a43; }
.wx-tag--avg  { background: #eef1f7; color: #5b6b82; }

/* Timeline */
.day__body { padding: 16px 20px 20px; flex: 1; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.92rem;
}
.timeline li:last-child { border-bottom: none; }
.timeline .t-time {
  font-weight: 700;
  color: var(--scot-blue);
  font-size: 0.82rem;
  white-space: nowrap;
  padding-top: 1px;
}
.day--usa .timeline .t-time  { color: var(--usa-red); }
.day--golf .timeline .t-time { color: #2e8b57; }
.timeline .t-time.is-key { color: var(--usa-red); }
.timeline a { color: var(--ink); text-decoration: none; border-bottom: 1.5px solid rgba(0,94,184,0.35); }
.timeline a:hover { border-bottom-color: var(--usa-red); }
.timeline .t-text strong { color: var(--ink); }

.day__note {
  margin: 14px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  background: #fff8e9;
  border-left: 3px solid var(--gold);
  padding: 9px 12px;
  border-radius: 0 8px 8px 0;
}

/* ---------- Footer ---------- */
.foot {
  position: relative;
  margin-top: 56px;
  padding: 44px 20px 50px;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, var(--usa-navy), var(--scot-deep));
  border-top: 6px solid var(--gold);
}
.foot__tartan {
  position: absolute; inset: 0; opacity: 0.12; pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 30px, rgba(255,255,255,.5) 30px 34px, transparent 34px 66px),
    repeating-linear-gradient(0deg,  transparent 0 30px, rgba(255,255,255,.5) 30px 34px, transparent 34px 66px);
}
.foot__line {
  position: relative;
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 1.15rem;
  margin: 0 0 8px;
}
.foot__line .amp { color: var(--gold); margin: 0 6px; }
.foot__small {
  position: relative;
  font-size: 0.8rem;
  opacity: 0.78;
  max-width: 540px;
  margin: 0 auto;
}

@media (max-width: 560px) {
  .hero__inner { padding: 48px 18px 42px; }
  .days { grid-template-columns: 1fr; }
  .timeline li { grid-template-columns: 56px 1fr; }
}
