/* ------------------------------------------------------------------
   Canadian Masters Curling Federation — design tokens
   Derived from the Corporate Partnership Program brochure:
   deep pine + cream + brass, ribbon sweep, condensed caps display,
   serif-italic taglines.
------------------------------------------------------------------- */
:root {
  --pine: #1d3a2a;
  --pine-deep: #12271b;
  --cream: #f4f0e4;
  --paper: #fbf8f0;
  --gold: #b3893a;
  --gold-bright: #c9a44c;
  --red: #9e1c22;
  --ink: #24312a;
  --ink-soft: #4c584f;

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-accent: "Playfair Display", Georgia, serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;

  --wrap: 68rem;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }

a { color: var(--pine); }
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 2px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--pine-deep); color: var(--cream);
  padding: .6rem 1rem; z-index: 99;
}
.skip-link:focus { left: 0; }

/* --- type roles ------------------------------------------------- */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .015em;
  line-height: 1.04;
  color: var(--pine-deep);
  margin: 0;
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .32em;
  font-size: .8rem;
  color: var(--gold);
  margin: 0 0 .5rem;
}

.accent {
  font-family: var(--font-accent);
  font-style: italic;
  color: var(--pine);
}

.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }

/* --- header ------------------------------------------------------ */
.site-header {
  background: var(--pine-deep);
  color: var(--cream);
  border-bottom: 3px solid var(--gold);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding-block: .8rem;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--cream); }
.brand-logo { flex: none; width: 48px; height: 48px; object-fit: contain; }
.brand-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  font-size: 1.05rem; line-height: 1.1;
}
.brand-sep { color: var(--gold-bright); }
.brand-sub {
  display: block; font-size: .68rem; letter-spacing: .14em;
  text-transform: uppercase; color: #bcc9bd;
}
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.site-nav a {
  color: var(--cream); text-decoration: none;
  font-family: var(--font-display); font-weight: 500;
  text-transform: uppercase; letter-spacing: .08em; font-size: .85rem;
  padding: .45rem .7rem; border-radius: 4px;
}
.site-nav a:hover { background: rgba(201, 164, 76, .18); }
.lang-switch {
  margin-left: .5rem; border: 1px solid rgba(201, 164, 76, .5);
  border-radius: 4px !important;
}
.site-nav a[aria-current="page"] {
  color: var(--gold-bright);
  box-shadow: inset 0 -2px 0 var(--gold-bright);
  border-radius: 0;
}

/* --- home hero ---------------------------------------------------- */
.hero {
  position: relative; color: var(--cream);
  background: var(--pine-deep);
  overflow: hidden;
}
.hero-media img {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; inset: 0;
  opacity: .72;
  filter: brightness(1.4);
}
.hero-inner {
  position: relative;
  padding-block: 5.5rem 6.5rem;
  text-align: center;
}
.hero .eyebrow { color: var(--gold-bright); }
.hero .display { color: #fff; font-size: clamp(2.4rem, 6vw, 4.2rem); }
.hero-tagline {
  font-family: var(--font-accent); font-style: italic;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--gold-bright);
  margin: 1rem 0 0;
}
.hero-sub { max-width: 44ch; margin: 1.25rem auto 2rem; color: #dfe6dc; }
.hero .ribbon { position: absolute; bottom: -1px; left: 0; width: 100%; height: 70px; }

.button {
  display: inline-block; text-decoration: none;
  font-family: var(--font-display); font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em; font-size: .9rem;
  padding: .85rem 1.6rem; border-radius: 999px;
}
.button--gold { background: var(--gold-bright); color: var(--pine-deep); }
.button--gold:hover { background: #d9b65e; }
.button--outline { border: 2px solid var(--pine); color: var(--pine); }
.button--outline:hover { background: var(--pine); color: var(--cream); }

/* --- shared section chrome --------------------------------------- */
section.block { padding-block: 4rem; }
section.block--paper { background: var(--paper); }
.block-head { text-align: center; max-width: 52rem; margin-inline: auto; }
.block-head .display { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.block-head .lede { margin-inline: auto; }

.leaf-divider {
  display: flex; align-items: center; justify-content: center;
  gap: .8rem; margin: 1.4rem auto;
}
.leaf-divider .rule { width: 72px; height: 1px; background: var(--gold); }

/* --- stats -------------------------------------------------------- */
.stat-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-top: 2.5rem;
}
.stat {
  background: var(--paper);
  border-top: 3px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 1.4rem 1.2rem;
  text-align: center;
  box-shadow: 0 1px 0 rgba(29, 58, 42, .12);
}
.stat--deep { background: var(--pine); border-top-color: var(--gold-bright); }
.stat--deep .stat-value { color: var(--gold-bright); }
.stat--deep .stat-label { color: #d6ddd2; }
.stat-value {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.9rem; line-height: 1.1;
  color: var(--pine-deep); text-transform: uppercase;
}
.stat-label { margin: .4rem 0 0; font-size: .92rem; color: var(--ink-soft); }

/* --- cards (More Than… index) ------------------------------------- */
.mtx-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 2.5rem;
}
.mtx-card {
  display: block; text-decoration: none;
  background: var(--pine-deep); color: var(--cream);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  border: 1px solid rgba(201, 164, 76, .35);
  transition: transform .15s ease, border-color .15s ease;
}
.mtx-card:hover { transform: translateY(-3px); border-color: var(--gold-bright); }
.mtx-card .eyebrow { color: var(--gold-bright); margin-bottom: .2rem; }
.mtx-card h3 {
  font-family: var(--font-display); text-transform: uppercase;
  font-size: 1.35rem; margin: 0 0 .5rem; color: #fff;
}
.mtx-card p { margin: 0; font-size: .95rem; color: #ccd6c9; }

/* --- feature list (icon rows) -------------------------------------- */
.feature-list { list-style: none; margin: 2.25rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.feature-list li {
  display: grid; grid-template-columns: 10px 1fr; gap: 1rem;
  background: var(--paper); border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  box-shadow: 0 1px 0 rgba(29, 58, 42, .12);
}
.feature-list li::before {
  content: ""; width: 10px; border-radius: 6px;
  background: linear-gradient(var(--red), var(--gold-bright), var(--pine));
}
.feature-list h3 {
  margin: 0 0 .25rem;
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .04em; font-size: 1.05rem; color: var(--pine-deep);
}
.feature-list p { margin: 0; color: var(--ink-soft); }

/* --- split layout (photo + content) -------------------------------- */
.page-hero { background: var(--paper); }
.page-hero--photo {
  display: grid; grid-template-columns: minmax(260px, 2fr) 3fr;
  align-items: stretch; min-height: 380px;
}
.page-hero-media { position: relative; }
.page-hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.page-hero--pair { grid-template-columns: minmax(160px, 1fr) minmax(300px, 2fr) minmax(160px, 1fr); }
.page-hero-text { padding: 4rem clamp(1.25rem, 5vw, 4rem); align-self: center; }
.page-hero-text .display { font-size: clamp(2rem, 4.5vw, 3.1rem); }
.page-hero:not(.page-hero--photo) .page-hero-text {
  max-width: var(--wrap); margin-inline: auto; text-align: center;
}
.page-hero:not(.page-hero--photo) .lede { margin-inline: auto; }

/* --- photo grid (celebration photos) --------------------------------- */
.photo-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 2.5rem;
}
.photo-grid figure {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 0 rgba(29, 58, 42, .12);
}
.photo-grid img { width: 100%; height: 320px; object-fit: cover; }
.photo-grid figcaption {
  padding: .6rem .9rem; background: var(--paper);
  font-size: .85rem; color: var(--ink-soft);
}

/* --- map image ---------------------------------------------------------- */
.map-image {
  margin-top: 2.5rem; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 0 rgba(29, 58, 42, .12);
}
.map-image img { width: 100%; height: auto; display: block; }

/* --- next host callout ------------------------------------------------ */
.next-host {
  background: var(--pine); color: var(--cream);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  margin-top: 2.5rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.25rem;
}
.next-host-text .eyebrow { color: var(--gold-bright); }
.next-host-text h3 {
  margin: .2rem 0 0; font-family: var(--font-display); text-transform: uppercase;
  font-size: 1.25rem; color: #fff;
}
.next-host-text p { margin: .3rem 0 0; color: #d6ddd2; }
.next-host .button--gold { flex-shrink: 0; }

/* --- facebook embed ---------------------------------------------------- */
.facebook-embed { display: flex; justify-content: center; margin-top: 2.5rem; overflow-x: auto; }

/* --- pull quote ----------------------------------------------------- */
.pull-quote {
  max-width: 40rem; margin: 3rem auto 0; text-align: center;
  font-family: var(--font-accent); font-style: italic;
  font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.45;
  color: var(--pine);
}
.pull-quote::before, .pull-quote::after {
  content: "”"; color: var(--gold-bright);
  font-size: 2.2em; line-height: 0; vertical-align: -0.35em;
  display: inline-block; padding-inline: .15em;
}
.pull-quote::before { content: "“"; }

/* --- host cities ----------------------------------------------------- */
.host-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-top: 2.5rem;
}
.host {
  background: var(--paper); border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  border-left: 4px solid var(--pine);
}
.host--future { border-left-color: var(--red); background: #fdf6ee; }
.host h3 {
  margin: 0; font-family: var(--font-display);
  text-transform: uppercase; font-size: 1.1rem; color: var(--pine-deep);
}
.host p { margin: .15rem 0 0; font-size: .9rem; color: var(--ink-soft); }
.host-badge {
  display: inline-block; margin-top: .5rem;
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .1em; font-size: .68rem;
  background: var(--red); color: #fff;
  padding: .2rem .55rem; border-radius: 999px;
}

/* --- CTA band --------------------------------------------------------- */
.cta-band { background: var(--pine); }
.cta-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-block: 2.75rem;
}
.cta-quote {
  font-family: var(--font-accent); font-style: italic;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  color: var(--gold-bright); margin: 0; max-width: 34ch;
}

/* --- footer ------------------------------------------------------------ */
.site-footer { background: var(--cream); margin-top: 0; }
.site-footer .ribbon { display: block; width: 100%; height: 70px; }
.footer-body { background: var(--pine-deep); color: #ccd6c9; margin-top: -1px; }
.footer-grid {
  display: grid; gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding-block: 3rem 2rem;
}
.footer-title {
  font-family: var(--font-display); text-transform: uppercase;
  color: #fff; font-size: 1.15rem; margin: 0 0 .3rem;
}
.footer-tagline { font-family: var(--font-accent); font-style: italic; color: var(--gold-bright); margin: 0; }
.footer-heading {
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .12em; font-size: .8rem; color: var(--gold-bright); margin: 0 0 .6rem;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.footer-links a, .footer-cta { color: #e6ebe2; text-decoration: none; }
.footer-links a:hover, .footer-cta:hover { color: var(--gold-bright); }
.footer-legal {
  border-top: 1px solid rgba(201, 164, 76, .3);
  padding-block: 1.2rem; font-size: .85rem; color: #9fae9e;
}

/* --- history table ------------------------------------------------------ */
.history-table-wrap { overflow-x: auto; }
.history-table {
  width: 100%; border-collapse: collapse;
  font-size: .95rem; color: var(--ink);
}
.history-table thead tr {
  background: var(--pine); color: #fff;
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: .1em; font-size: .8rem;
}
.history-table th { padding: .75rem 1rem; text-align: left; white-space: nowrap; }
.history-table td { padding: .65rem 1rem; border-bottom: 1px solid #ddd8c8; vertical-align: top; }
.history-table tbody tr:nth-child(even) { background: var(--cream); }
.history-table tbody tr:hover { background: #eae6d6; }
.history-year { font-family: var(--font-display); font-size: 1.05rem; white-space: nowrap; }
.history-province {
  display: inline-block; background: var(--pine); color: var(--gold-bright);
  font-family: var(--font-display); font-size: .7rem; text-transform: uppercase;
  letter-spacing: .08em; padding: .1rem .4rem; border-radius: 3px;
  margin-right: .35rem; white-space: nowrap;
}
.history-row--cancelled td { color: var(--ink-soft); font-style: italic; }
.history-cancelled { text-align: center; }

/* --- hamburger ---------------------------------------------------------- */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; padding: 4px;
  background: none; border: none; cursor: pointer; border-radius: 4px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block; height: 2px;
  background: var(--cream); border-radius: 1px;
  transition: transform .22s ease, opacity .22s ease;
}
@media (prefers-reduced-motion: reduce) {
  .nav-toggle span { transition: none; }
}
.nav-is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- responsive --------------------------------------------------------- */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-header { position: relative; }
  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
    background: var(--pine-deep);
    border-top: 1px solid rgba(201, 164, 76, .25);
    padding: .75rem 1.25rem 1.25rem;
    flex-direction: column; gap: .15rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
  }
  .nav-is-open .site-nav { display: flex; }
  .site-nav a { padding: .65rem .5rem; font-size: .9rem; }
  .lang-switch { margin-left: 0; margin-top: .5rem; align-self: flex-start; }
  .page-hero--photo { grid-template-columns: 1fr; }
  .page-hero-media { min-height: 240px; }
  .page-hero-media img { position: absolute; }
  .hero-inner { padding-block: 4rem 5.5rem; }
}
