/* Beaming Dental — brand guidelines site
   Tokens come straight from the December 2024 brand guide. */

:root {
  --blue: #3C4ACE;
  --blue-dark: #2E3AB0;
  --ivory: #FFFBF7;
  --bubble-gum: #FF8D8D;
  --grape: #8D8DFF;
  --mint: #7EE0D6;
  --peach: #FFAD8D;

  --ink: var(--blue);
  --muted: #6B6F99;
  --line: rgba(60, 74, 206, 0.22);
  --card: #FFFFFF;

  --radius: 8px;
  --btn-radius: 6px;
  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 48px);

  /* Type hierarchy — 1x = body cap height; headlines scale from it */
  --fs-body: 1.0625rem;
  --fs-sub: 1.375rem;
  --fs-h2: clamp(2.5rem, 6vw, 4.5rem);
  --fs-h3: clamp(1.5rem, 2.6vw, 2rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 251, 247, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.site-header .brand img { height: 34px; width: auto; }
.nav { display: flex; gap: 22px; font-size: 0.95rem; font-weight: 500; }
.nav a { text-decoration: none; opacity: 0.8; }
.nav a:hover, .nav a.active { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.nav-toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--ivory);
    border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; }
}

/* ---------- Buttons (guide p.13) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; font-weight: 600; font-size: 0.975rem;
  padding: 12px 22px; border-radius: var(--btn-radius);
  border: 1.5px solid transparent; text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.btn-secondary { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-secondary:hover { background: rgba(60, 74, 206, 0.07); }
.on-blue .btn-primary { background: #fff; color: var(--blue); border-color: #fff; }
.on-blue .btn-primary:hover { background: var(--ivory); }
.on-blue .btn-secondary { color: #fff; border-color: #fff; }
.on-blue .btn-secondary:hover { background: rgba(255, 255, 255, 0.12); }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; }

/* ---------- Hero ---------- */
.hero { background: var(--blue); color: #fff; padding: clamp(72px, 12vw, 140px) 0 clamp(64px, 10vw, 120px); }
.hero img.hero-logo { width: min(440px, 80%); height: auto; }
.hero hr { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.45); margin: 40px 0 28px; max-width: 760px; }
.hero h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; margin: 0; line-height: 1.2; }
.hero p { margin: 6px 0 0; font-weight: 300; font-size: 1.15rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---------- Sections ---------- */
section.block { padding: clamp(64px, 9vw, 112px) 0; border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head h2 { font-size: var(--fs-h2); font-weight: 700; line-height: 1.02; margin: 0; letter-spacing: -0.01em; }
.section-num { font-size: 1rem; font-weight: 300; opacity: 0.7; }
.eyebrow { font-size: 0.9rem; font-weight: 700; margin: 0 0 4px; }
.eyebrow span { font-weight: 300; }
h3 { font-size: var(--fs-h3); font-weight: 700; margin: 0 0 12px; line-height: 1.2; }
.sub { font-size: var(--fs-sub); font-weight: 300; margin: 0 0 16px; }
.lede { max-width: 640px; }
.sub-block { margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Logo variations ---------- */
.logo-variant { margin-bottom: 56px; }
.logo-variant:last-child { margin-bottom: 0; }
.logo-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.logo-pair > div { aspect-ratio: 16 / 9; position: relative; }
.logo-pair .ivory { background: var(--ivory); }
.logo-pair .blue { background: var(--blue); }
.logo-pair img { position: absolute; inset: 22% 16%; width: 68%; height: 56%; object-fit: contain; }
.logo-pair > .symbol img { inset: 28%; width: 44%; height: 44%; }
.dl-row { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; font-size: 0.9rem; }
.dl-row .group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dl-row .label { font-weight: 600; margin-right: 4px; }
.chip {
  font-size: 0.8rem; font-weight: 600; text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px;
  background: var(--card);
}
.chip:hover { border-color: var(--blue); }
@media (max-width: 640px) { .logo-pair { grid-template-columns: 1fr; } }

/* ---------- Safe zone ---------- */
.safezone { display: grid; gap: 24px; }
.safezone figure { margin: 0; background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.safezone img { margin: 0 auto; max-height: 300px; width: auto; }

/* ---------- Don'ts ---------- */
.donts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.donts figure { margin: 0; }
.donts .tile { background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative; }
.donts .tile::after {
  content: ""; position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--bubble-gum) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center/12px no-repeat;
}
.donts figcaption { font-size: 0.875rem; margin-top: 10px; line-height: 1.4; }
@media (max-width: 1000px) { .donts { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .donts { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

/* ---------- Typography ---------- */
.font-specimen { display: grid; gap: 4px; }
.font-specimen div { font-size: clamp(2.2rem, 5vw, 3.75rem); line-height: 1.2; }
.font-specimen small { display: block; font-size: 0.85rem; font-weight: 500; opacity: 0.7; margin-bottom: 18px; }
.w300 { font-weight: 300; } .w400 { font-weight: 400; } .w600 { font-weight: 600; } .w700 { font-weight: 700; }
.alphabet { font-size: 1.35rem; letter-spacing: 0.02em; word-break: break-all; margin-top: 12px; }

.hierarchy { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 48px); }
.hierarchy .h { font-size: 2.75rem; font-weight: 700; line-height: 1.1; margin: 0 0 16px; }
.hierarchy .s { font-size: 1.4rem; font-weight: 300; margin: 0 0 22px; }
.hierarchy .b { margin: 0; max-width: 60ch; }
.hierarchy .row { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: baseline; }
.hierarchy .row + .row { margin-top: 4px; }
.hierarchy .tag { font-size: 0.72rem; font-weight: 600; color: var(--bubble-gum); border: 1px solid var(--bubble-gum); border-radius: 4px; text-align: center; padding: 1px 0; }
.rule-list { padding-left: 1.1em; margin: 12px 0 0; }
.rule-list li { margin-bottom: 6px; }

.button-demo { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.button-demo > div { padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.button-demo .ivory-bg { background: var(--ivory); }
.button-demo .blue-bg { background: var(--blue); color: #fff; }
.button-demo .btns { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.button-demo p { margin: 0; font-size: 0.85rem; text-align: center; opacity: 0.85; }
@media (max-width: 640px) { .button-demo { grid-template-columns: 1fr; } }

/* ---------- Colour ---------- */
.swatches { display: grid; gap: 20px; }
.swatches.primary { grid-template-columns: 1fr 1fr; }
.swatches.secondary { grid-template-columns: repeat(4, 1fr); margin-top: 20px; }
.swatch { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.swatch .chipc { height: 140px; }
.swatches.primary .swatch .chipc { height: 220px; }
.swatch .meta { padding: 16px 18px 18px; font-size: 0.9rem; }
.swatch .name { font-weight: 700; font-size: 1.1rem; margin-bottom: 8px; }
.swatch dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; }
.swatch dt { font-weight: 600; }
.swatch dd { margin: 0; }
.copy { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.copy:hover { text-decoration-style: solid; }
@media (max-width: 860px) { .swatches.secondary { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .swatches.primary { grid-template-columns: 1fr; } }

/* ---------- Photography ---------- */
.photo-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.photo-row img { border-radius: var(--radius); aspect-ratio: 1; object-fit: cover; width: 100%; }
.photo-row.dont img { filter: saturate(0.9); }
.photo-group + .photo-group { margin-top: 48px; }
.photo-group ul { padding-left: 1.1em; margin: 8px 0 20px; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1rem; }
.badge i { width: 22px; height: 22px; border-radius: 50%; display: inline-block; }
.badge.do i { background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/13px no-repeat; }
.badge.dont i { background: var(--bubble-gum) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center/12px no-repeat; }

/* ---------- Applications ---------- */
.apps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.app { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 24px 20px; }
.app .pair { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; }
.app .pair img { max-height: 320px; width: auto; margin: 0 auto; object-fit: contain; }
.app p { margin: 16px 0 0; font-weight: 600; text-align: center; }
@media (max-width: 760px) { .apps { grid-template-columns: 1fr; } }

/* ---------- Downloads ---------- */
.downloads { background: var(--blue); color: #fff; border-bottom: 0; }
.downloads .section-head h2 { color: #fff; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.dl-card { border: 1px solid rgba(255, 255, 255, 0.35); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; transition: background .15s; }
.dl-card:hover { background: rgba(255, 255, 255, 0.08); }
.dl-card strong { font-size: 1.1rem; }
.dl-card span { font-weight: 300; font-size: 0.92rem; }
.dl-card em { font-style: normal; font-size: 0.8rem; opacity: 0.75; margin-top: auto; padding-top: 10px; }
.dl-card.featured { background: #fff; color: var(--blue); }
.dl-card.featured:hover { background: var(--ivory); }

/* ---------- Footer ---------- */
footer { background: var(--blue); color: rgba(255, 255, 255, 0.8); padding: 28px 0 40px; font-size: 0.85rem; border-top: 1px solid rgba(255, 255, 255, 0.2); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
footer img { height: 26px; width: auto; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px);
  background: var(--blue); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 0.9rem; font-weight: 600; opacity: 0; pointer-events: none; transition: all .2s; z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

:focus-visible { outline: 2px solid var(--grape); outline-offset: 3px; }
