/* =========================================================
   Franchise Partner Directory — 2026 Conference Edition
   Themed to match conference.amadaseniorcare.com ("A New Frontier").
   Standalone: this page does NOT load the evergreen ../styles.css.
   Source of truth is conference.css in the franchisee-directory
   project; build_conference.py copies it into build/conference/.
   ========================================================= */

:root {
  /* Conference palette — Amada navy + cowboy/sunset accents */
  --navy:       #1f2a48;
  --navy-deep:  #131b31;
  --sunset:     #e87722;
  --sunset-deep:#c1440e;
  --gold:       #c9a227;
  --cream:      #f7efde;
  --cream-soft: #fdf8ec;
  --parchment:  #f3e9d2;
  --ink:        #1c1c1c;
  --ink-soft:   #3c3c3c;
  --muted:      #6b6b6b;
  --line:       rgba(31, 42, 72, 0.12);

  --radius:     14px;
  --radius-sm:  8px;
  --shadow-sm:  0 2px 10px rgba(19, 27, 49, 0.08);
  --shadow-md:  0 10px 30px rgba(19, 27, 49, 0.12);

  /* Amada brand-book web fonts */
  --font-head: "Oswald", "Helvetica Neue", Arial, sans-serif;
  --font-ui:   "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;

  --nav-h: 76px;
  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 60px); }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream-soft);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--sunset-deep); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--sunset); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; color: var(--navy); line-height: 1.2; margin: 0 0 .6em; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  height: calc(var(--nav-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: #fff;
  border-bottom: 1px solid var(--line);
  z-index: 200;
}
.nav-wrap {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
  padding: 0 32px;
}
.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.brand img { height: 38px; width: auto; }
.brand-tag {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  border-left: 1px solid var(--line);
  padding-left: 14px;
  white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav a {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy);
  white-space: nowrap;
}
.site-nav a:hover { color: var(--sunset); }
.site-nav a.cta-pill {
  background: var(--sunset);
  color: #fff;
  padding: 9px 20px;
  border-radius: 50px;
}
.site-nav a.cta-pill:hover { background: var(--sunset-deep); color: #fff; }

/* ---------- Page banner ---------- */
/* Height is content + padding, not a fixed min-height: the banner ends a set
   distance below the last line of text instead of leaving dead space. */
.page-banner {
  position: relative;
  padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 28px) 0 40px;
  display: flex; align-items: center;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.page-banner::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("assets/hero-cowboy-creek.jpg");
  background-size: cover;
  background-position: center 40%;
  z-index: -2;
}
.page-banner::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg,
    rgba(10, 12, 30, 0.80) 0%,
    rgba(10, 12, 30, 0.60) 35%,
    rgba(10, 12, 30, 0.24) 75%,
    rgba(10, 12, 30, 0.20) 100%);
  z-index: -1;
}
.page-banner-inner {
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
}
.page-banner-eyebrow {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}
.page-banner h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: 0.03em;
  color: #fff;
  margin: 0 0 14px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
}
.page-banner-sub {
  font-family: var(--font-ui);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: #f5e5c4;
  max-width: 760px;
  margin: 0;
}
/* ---------- Tabs + controls ---------- */
.conference-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 28px;
  padding: 28px 24px 4px;
}
.view-toggle {
  display: inline-flex;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 5px;
  box-shadow: var(--shadow-sm);
}
.view-btn {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  color: var(--navy);
  border: 0;
  border-radius: 50px;
  padding: 10px 22px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.view-btn:hover { color: var(--sunset-deep); }
.view-btn.is-active {
  background: var(--sunset);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.quotes-only {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.82rem;
  color: var(--navy);
  cursor: pointer;
  user-select: none;
}
.quotes-only input { accent-color: var(--sunset); width: 1rem; height: 1rem; cursor: pointer; }

/* Which view is showing */
.view-by-name, .view-sponsors { display: none; }
body.view-mode-name .view-by-state,
body.view-mode-name .state-nav-wrapper { display: none; }
body.view-mode-name .view-by-name { display: block; }
body.view-mode-sponsors .view-by-state,
body.view-mode-sponsors .state-nav-wrapper,
body.view-mode-sponsors .quotes-only { display: none; }
body.view-mode-sponsors .view-sponsors { display: block; }

/* ---------- State nav ---------- */
.state-nav-wrapper { background: #fff; border-bottom: 1px solid var(--line); }
.state-nav-toggle { display: none; }
.state-nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
}
.state-nav a { color: var(--navy); padding: 2px 4px; }
.state-nav a:hover, .state-nav a:focus-visible { color: var(--sunset); text-decoration: underline; }
@media (min-width: 601px) {
  .state-nav-wrapper { position: sticky; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); z-index: 100; }
  .state-nav-wrapper > .state-nav { display: flex !important; }
}

/* ---------- Directory ---------- */
main { max-width: var(--container); margin: 0 auto; padding: 32px 24px 80px; }

.state-section { margin-bottom: 56px; }
.state-heading {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy);
  margin: 0 0 24px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
  position: relative;
}
.state-heading::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 72px; height: 2px;
  background: var(--sunset);
}

.owner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 26px 22px;
}

.owner-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 18px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  align-content: start;
  transition: transform .15s ease, box-shadow .15s ease;
}
.owner-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.owner-photo {
  width: 150px;
  height: 150px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  background: var(--parchment);
  border: 3px solid var(--cream);
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(19, 27, 49, 0.14);
}
.owner-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.owner-photo.placeholder::after { content: "No photo"; }

.owner-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.12rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--navy);
  margin: 0 0 6px;
  line-height: 1.25;
}
.owner-business {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--sunset-deep);
  margin: 0 0 8px;
  line-height: 1.35;
}
.owner-state {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 6px;
}
.territory-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ---------- Partner quotes ---------- */
.quote-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: left;
  width: 100%;
}
.partner-quote {
  margin: 0;
  position: relative;
  background: var(--cream-soft);
  border-left: 3px solid var(--sunset);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 14px 12px 26px;
}
.partner-quote + .partner-quote { margin-top: 12px; }
.partner-quote::before {
  content: "\201C";
  position: absolute;
  left: 8px;
  top: 2px;
  font-family: var(--font-head);
  font-size: 1.9rem;
  line-height: 1;
  color: var(--gold);
}
.partner-quote p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-soft);
  font-style: italic;
}
.partner-quote footer {
  margin-top: 8px;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted);
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.quote-author { color: var(--sunset-deep); font-weight: 600; }
.quote-credit { font-size: 0.68rem; opacity: 0.9; }

body.quotes-only-mode .owner-card:not(.has-quote) { display: none; }
body.quotes-only-mode .state-section.is-empty { display: none; }

/* ---------- Sponsors ---------- */
.sponsors-intro { margin-bottom: 36px; max-width: 780px; }
.sponsors-intro .kicker {
  font-family: var(--font-ui);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: var(--sunset-deep);
  margin: 0 0 10px;
}
.sponsors-intro h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin: 0 0 12px;
}
.sponsors-intro p {
  margin: 0;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.sponsor-tier-group { margin-bottom: 52px; }
.sponsor-tier-name {
  font-family: var(--font-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy);
  font-size: 1.25rem;
  margin: 0 0 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
  position: relative;
}
.sponsor-tier-name::after {
  content: "";
  position: absolute; left: 0; bottom: -2px;
  width: 56px; height: 2px;
  background: var(--gold);
}
.sponsor-tier-group[data-tier="premier"] .sponsor-tier-name { font-size: 1.55rem; }
.sponsor-tier-group[data-tier="dynamic"] .sponsor-tier-name { font-size: 1.4rem; }

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
/* Higher tiers get wider cards; auto-fit so a tier with a single sponsor
   stretches rather than sitting in a half-empty row. */
.sponsor-tier-group[data-tier="dynamic"] .sponsor-grid {
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}
.sponsor-tier-group[data-tier="premier"] .sponsor-grid {
  grid-template-columns: 1fr;
}

.sponsor-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.sponsor-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.sponsor-body { display: flex; flex-direction: column; flex: 1 1 auto; }

/* Premier: logo panel on the left, everything else in a column beside it. */
.sponsor-tier-group[data-tier="premier"] .sponsor-card {
  flex-direction: row;
  align-items: stretch;
  gap: 32px;
  padding: 32px;
}
.sponsor-tier-group[data-tier="premier"] .sponsor-logo-wrap {
  flex: 0 0 300px;
  height: auto;
  min-height: 170px;
  margin-bottom: 0;
}

.sponsor-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 88px;
  margin-bottom: 18px;
  padding: 8px 12px;
  background: var(--cream-soft);
  border-radius: var(--radius-sm);
}
.sponsor-tier-group[data-tier="premier"] .sponsor-logo-wrap { height: 112px; }
.sponsor-logo-wrap img { max-height: 100%; width: auto; object-fit: contain; }
.sponsor-logo-fallback {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--navy);
  text-align: center;
}

.sponsor-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--navy);
  margin: 0 0 6px;
}
.sponsor-tagline {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--sunset-deep);
  margin: 0 0 12px;
  line-height: 1.4;
}
.sponsor-desc {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 16px;
  line-height: 1.55;
}

.sponsor-reps {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.sponsor-reps-title {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin: 0 0 12px;
}
.sponsor-rep-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}
.sponsor-rep { display: flex; align-items: center; gap: 10px; }
.rep-meta { display: flex; flex-direction: column; }
.sponsor-rep img,
.sponsor-rep .rep-initials {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  background: var(--parchment);
  border: 2px solid var(--cream);
  flex-shrink: 0;
}
.sponsor-rep .rep-initials {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--navy);
}
.rep-name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--navy);
  line-height: 1.3;
}
.rep-title {
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.3;
}

.sponsor-link {
  margin-top: 16px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sponsors-empty {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-ui);
}

.sponsors-cta {
  background: var(--navy-deep);
  color: #e9eaf0;
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-top: 8px;
}
.sponsors-cta h3 { color: #fff; margin: 0 0 8px; font-size: 1.2rem; }
.sponsors-cta p { margin: 0; font-size: 0.98rem; }
.sponsors-cta a { color: var(--gold); }
.sponsors-cta a:hover { color: var(--sunset); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #c9cde0;
  text-align: center;
  padding: 40px 24px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
}
.site-footer img { height: 34px; width: auto; margin: 0 auto 16px; filter: brightness(0) invert(1); opacity: 0.9; }
.site-footer p { margin: 0 0 6px; }
.footer-note { color: #8f96b3; font-size: 0.78rem; }

/* ---------- Mobile ---------- */
@media (max-width: 1024px) {
  .nav-wrap { padding: 0 16px; }
  .brand-tag { display: none; }
  .site-nav { gap: 14px; }
  .site-nav a { font-size: 0.74rem; }
  .site-nav a.cta-pill { padding: 8px 16px; }
}

@media (max-width: 640px) {
  :root { --nav-h: 64px; }
  body { font-size: 16px; }
  .page-banner { padding-bottom: 28px; }
  .brand img { height: 30px; }

  .site-nav { gap: 12px; }
  .site-nav a { font-size: 0.7rem; }
  .site-nav a.cta-pill { padding: 8px 14px; }
  .conference-controls { padding: 20px 12px 4px; gap: 12px 16px; }

  main { padding: 20px 14px 56px; }
  .owner-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .owner-card { padding: 16px 10px 16px; border-radius: var(--radius-sm); }
  .owner-photo { width: 110px; height: 110px; border-width: 2px; margin-bottom: 12px; }
  .owner-name { font-size: 0.98rem; }
  .owner-business { font-size: 0.74rem; }
  .territory-list { font-size: 0.8rem; }
  .partner-quote p { font-size: 0.88rem; }

  .sponsor-grid,
  .sponsor-tier-group[data-tier="premier"] .sponsor-grid,
  .sponsor-tier-group[data-tier="dynamic"] .sponsor-grid {
    grid-template-columns: 1fr;
  }
  .sponsor-card { padding: 18px; }
  /* Premier's side-by-side logo panel stacks on small screens */
  .sponsor-tier-group[data-tier="premier"] .sponsor-card {
    flex-direction: column;
    gap: 0;
    padding: 18px;
  }
  .sponsor-tier-group[data-tier="premier"] .sponsor-logo-wrap {
    flex: 0 0 auto;
    min-height: 0;
    height: 100px;
    margin-bottom: 18px;
  }

  .view-btn { padding: 11px 16px; font-size: 0.74rem; }

  /* State nav collapses to a dropdown */
  .state-nav-toggle {
    display: block;
    cursor: pointer;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--navy);
    padding: 14px 16px;
    background: #fff;
    list-style: none;
    text-align: center;
  }
  .state-nav-toggle::-webkit-details-marker { display: none; }
  .state-nav-toggle::after { content: " ▾"; color: var(--sunset); }
  details[open] .state-nav-toggle::after { content: " ▴"; }
  details:not([open]) .state-nav { display: none; }
  .state-nav {
    flex-direction: column;
    gap: 0;
    padding: 0;
    font-size: 0.95rem;
    max-height: 60vh;
    overflow-y: auto;
  }
  .state-nav a { padding: 12px 18px; border-top: 1px solid var(--line); text-align: left; }
}

@media print {
  .site-header, .conference-controls, .state-nav-wrapper, .sponsors-cta { display: none; }
  .page-banner { padding: 0 0 12px; color: var(--navy); }
  .page-banner::before, .page-banner::after { display: none; }
  .page-banner h1, .page-banner-sub, .page-banner-eyebrow { color: var(--navy); text-shadow: none; }
  body { background: #fff; }
  .owner-card, .sponsor-card { break-inside: avoid; box-shadow: none; }
}
