/* Manitoba Association of Radiologists — shared styles
   Clean & modern theme */

:root {
  /* MAR brand colours */
  --brand-gold: #fbab18;
  --brand-brown: #3c2415;

  --ink: #3c2415;
  --muted: #6b5a4e;
  --primary: #3c2415;
  --primary-dark: #24150c;
  --accent: #fbab18;
  --accent-dark: #e39500;
  --accent-soft: #fef3dc;
  --gold-text: #8a5a00;      /* gold-toned text that stays readable on white */
  --bg: #ffffff;
  --surface: #fdf9f2;
  --border: #ece3d6;
  --danger: #b3261e;
  --footer-text: #e9dccd;
  --footer-muted: #c4ae9a;
  --shadow: 0 1px 2px rgba(60,36,21,.05), 0 8px 24px rgba(60,36,21,.07);
  --radius: 14px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Libre Franklin", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1rem; color: var(--muted); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
  border-top: 4px solid var(--brand-gold);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: .85rem; letter-spacing: .02em;
}
.brand .brand-text small { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); letter-spacing: .02em; }
.brand .brand-text strong { font-size: 1.05rem; }

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--gold-text); text-decoration: none; }
.nav-links a.btn, .nav-links a.btn:hover { color: #fff; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff;
  padding: 11px 22px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; border: 0; cursor: pointer;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: var(--brand-brown); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--primary); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--primary-dark); }
.btn-lg { padding: 14px 30px; font-size: 1.02rem; }

.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink); }

/* Language switch */
.lang-switch { display: inline-flex; align-items: center; gap: 4px; }
.lang-btn {
  background: none; border: 0; cursor: pointer; padding: 4px 6px;
  font-family: inherit; font-size: .9rem; font-weight: 600; color: var(--muted);
  border-radius: 6px; line-height: 1; transition: color .15s ease, background .15s ease;
}
.lang-btn:hover { color: var(--gold-text); }
.lang-btn.active { color: var(--brand-brown); background: var(--accent); }
.lang-sep { color: var(--border); font-weight: 400; }

/* Logo chooser */
.logo-grid { display: grid; grid-template-columns: 1fr; gap: 22px; max-width: 860px; margin: 0 auto; }
.logo-card {
  display: block; cursor: pointer; border: 2px solid var(--border);
  border-radius: var(--radius); overflow: hidden; background: #fff;
  box-shadow: var(--shadow); transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.logo-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.logo-card input { position: absolute; opacity: 0; pointer-events: none; }
.logo-card .logo-img { width: 100%; display: block; }
.logo-card .logo-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--border); }
.logo-card .logo-meta h3 { margin: 0 0 4px; font-size: 1.05rem; }
.logo-card .logo-meta p { margin: 0; font-size: .9rem; }
.logo-card .pick-flag {
  flex: none; font-size: .78rem; font-weight: 700; color: var(--brand-brown); background: var(--accent-soft);
  border: 1.5px solid var(--accent); border-radius: 999px; padding: 4px 12px;
  opacity: 0; transition: opacity .15s ease; white-space: nowrap;
}
.logo-card input:checked ~ .logo-meta .pick-flag { opacity: 1; }
.logo-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }

/* By-laws / legal content */
.legal-wrap { max-width: 820px; margin: 0 auto; }
.legal-actions { margin-bottom: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.legal {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 40px 44px; box-shadow: var(--shadow);
}
.legal h1, .legal h2, .legal h3, .legal h4 { color: var(--ink); }
.legal h2 { font-size: 1.25rem; margin: 1.8em 0 .5em; padding-top: 1.1em; border-top: 1px solid var(--border); }
.legal h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.legal h3 { font-size: 1.02rem; margin: 1.3em 0 .4em; }
.legal h4 { font-size: .95rem; margin: 1em 0 .3em; color: var(--muted); }
.legal p { color: var(--ink); margin: 0 0 1em; font-size: .96rem; }
.legal ul, .legal ol { color: var(--ink); padding-left: 24px; margin: 0 0 1em; }
.legal li { margin-bottom: .4em; font-size: .96rem; }
.legal strong { color: var(--ink); }
@media (max-width: 860px) { .legal { padding: 26px 22px; } }
.pdf-frame { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.pdf-frame iframe { display: block; width: 100%; height: 80vh; border: 0; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(251,171,24,.18), transparent),
    linear-gradient(180deg, var(--surface), #fff);
  padding: 88px 0 72px;
  border-bottom: 1px solid var(--border);
}
.hero .eyebrow {
  display: inline-block; background: var(--accent); color: var(--brand-brown);
  font-weight: 600; font-size: .8rem; padding: 6px 14px; border-radius: 999px;
  letter-spacing: .03em; text-transform: uppercase; margin-bottom: 18px;
}
.hero p.lead { font-size: 1.2rem; max-width: 620px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }

/* ---------- Photos ---------- */
.photo-frame {
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  border-bottom: 4px solid var(--brand-gold); background: var(--surface);
}
.photo-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-photo { aspect-ratio: 4 / 3; }
.hero-photo img { object-position: 38% 50%; }
.photo-band { margin-bottom: 72px; }
.photo-band .photo-frame { aspect-ratio: 21 / 9; }
.photo-band img { object-position: 50% 58%; }

/* ---------- Sections ---------- */
section.block { padding: 72px 0; }
section.block.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head p { font-size: 1.08rem; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow);
}
.card .icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent-soft); color: var(--primary);
  display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { margin-bottom: 0; font-size: .97rem; }

/* ---------- Membership tiers ---------- */
.tier {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.tier.featured { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.tier .badge {
  align-self: flex-start; background: var(--accent); color: var(--brand-brown);
  font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 12px;
}
.tier h3 { margin-bottom: 4px; }
.tier .price { font-size: 1.9rem; font-weight: 800; color: var(--primary); margin: 8px 0; }
.tier .price small { font-size: .85rem; font-weight: 500; color: var(--muted); }
.tier p { font-size: .95rem; flex-grow: 1; }

/* ---------- Form ---------- */
.form-wrap { max-width: 760px; margin: 0 auto; }
.form-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow);
}
fieldset { border: 0; padding: 0; margin: 0 0 28px; }
legend {
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--primary); padding-bottom: 10px; margin-bottom: 18px;
  border-bottom: 2px solid var(--accent); width: 100%;
}
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 18px; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
label .req { color: var(--danger); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
  width: 100%; padding: 11px 13px; font-size: .98rem; font-family: inherit;
  color: var(--ink); background: #fff; border: 1.5px solid var(--border);
  border-radius: 10px; transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.hint { font-size: .82rem; color: var(--muted); margin-top: 5px; }

.radio-group { display: grid; gap: 12px; }
.radio-card {
  display: flex; align-items: flex-start; gap: 12px; cursor: pointer;
  border: 1.5px solid var(--border); border-radius: 12px; padding: 14px 16px;
  transition: border-color .15s ease, background .15s ease;
}
.radio-card:hover { border-color: var(--accent); background: var(--surface); }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-card input { margin-top: 3px; accent-color: var(--primary); width: 18px; height: 18px; }
.radio-card .rc-body { flex: 1; }
.radio-card .rc-title { font-weight: 700; color: var(--ink); }
.radio-card .rc-title .rc-price { float: right; color: var(--primary); font-weight: 700; }
.radio-card .rc-desc { font-size: .88rem; color: var(--muted); }

.check-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: .92rem; color: var(--ink); }
.check-row input { margin-top: 3px; accent-color: var(--primary); width: 17px; height: 17px; }
.check-row label { font-weight: 500; margin: 0; }

.conditional { display: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.conditional.show { display: block; }

.form-status { margin-top: 18px; padding: 14px 16px; border-radius: 10px; font-size: .95rem; display: none; }
.form-status.show { display: block; }
.form-status.success { background: var(--accent-soft); color: var(--primary-dark); border: 1px solid var(--accent); }
.form-status.error { background: #fbeae8; color: var(--danger); border: 1px solid #f0c4bf; }

.honeypot { position: absolute; left: -9999px; opacity: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-brown); color: var(--footer-text); padding: 56px 0 28px; border-top: 4px solid var(--brand-gold); }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--brand-gold); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 36px; }
.site-footer h4 { color: var(--brand-gold); font-size: .95rem; margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; font-size: .92rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-top: 20px; font-size: .85rem; color: var(--footer-muted); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-3, .grid-2, .footer-grid, .hero-split { grid-template-columns: 1fr; }
  .hero-split { gap: 36px; }
  .photo-band .photo-frame { aspect-ratio: 16 / 10; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links .btn { margin-top: 12px; justify-content: center; }
  .nav-toggle { display: block; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
}

/* ---------- Brand logo (EN/FR swap follows <html lang>) ---------- */
.brand { flex-shrink: 0; }
.brand-logo { display: block; height: 52px; width: auto; max-width: 100%; }
.logo-fr { display: none; }
html[lang="fr"] .logo-en { display: none; }
html[lang="fr"] .logo-fr { display: block; }
.footer-logo {
  display: inline-block; background: #fff; border-radius: 10px;
  padding: 12px 16px; margin-bottom: 16px;
}
.footer-logo .brand-logo { height: 60px; }
@media (max-width: 860px) {
  .brand-logo { height: 42px; }
}
