/* ==========================================================================
   COMPONENTS — pieces used on more than one page.
   Header · Works menu · Footer · Buttons · Cards · Chips · Lists ·
   Image wells · Marquee · Dark band · Hero background · Availability dot
   ========================================================================== */

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 242, 251, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-cool);
}
.site-nav {
  min-height: var(--nav-height); padding-block: 12px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px;
}
.site-logo img { height: 40px; width: auto; }
.nav-location {
  font-size: 11.5px; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase;
  color: var(--ink-600); white-space: nowrap;
}
.nav-clock {
  font-size: 11.5px; color: var(--ink-600); white-space: nowrap; font-variant-numeric: tabular-nums;
  border: 1px solid #D8CCEC; border-radius: var(--radius-pill); padding: 3px 10px;
}
.nav-clock:empty { display: none; }
.nav-spacer { flex: 1; }
.nav-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px;
  font-size: var(--size-nav); letter-spacing: var(--tracking-nav); text-transform: uppercase;
}
.nav-links > li { display: flex; align-items: center; }
.nav-link {
  color: var(--ink-900); padding-bottom: 3px; border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.nav-link:hover, .nav-link[aria-current] { color: var(--accent); border-bottom-color: var(--accent); }
.nav-works { display: inline-flex; align-items: center; gap: 4px; }
.nav-caret {
  display: inline-grid; place-items: center; width: 22px; height: 22px; padding: 0;
  background: none; border: 0; cursor: pointer; color: var(--ink-900); border-radius: 6px;
}
.nav-caret svg { transition: transform 240ms ease; }
.nav-caret[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-caret:hover { color: var(--accent); }

/* ---------- Burger menu (tablet & mobile) ---------- */
.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0; margin-right: -10px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer; color: var(--ink-900);
}
.nav-toggle-bar {
  display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform var(--dur-shift) var(--ease), opacity var(--dur-fast) ease;
}
.site-header.is-nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.site-header.is-nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1024px) {
  .site-nav { flex-wrap: nowrap; }
  .nav-toggle { display: inline-flex; }
  .nav-caret, .works-menu { display: none; }
  .site-nav .nav-links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px; font-size: 15px;
    background: var(--surface-hero); border-bottom: 1px solid var(--line-cool); box-shadow: var(--shadow-panel);
    opacity: 0; transform: translateY(-8px); visibility: hidden; pointer-events: none;
    transition: opacity var(--dur-menu) ease, transform var(--dur-shift) var(--ease), visibility 0s linear var(--dur-shift);
  }
  .site-header.is-nav-open .nav-links {
    opacity: 1; transform: none; visibility: visible; pointer-events: auto;
    transition: opacity var(--dur-menu) ease, transform var(--dur-shift) var(--ease), visibility 0s;
  }
  .nav-links > li { border-bottom: 1px solid var(--line-cool); }
  .nav-links > li:last-child { border-bottom: 0; }
  .nav-link { display: block; width: 100%; padding: 16px 0; border-bottom: 0; }
  .nav-link:hover, .nav-link[aria-current] { border-bottom: 0; }
}
@media (max-width: 767px) {
  :root { --nav-height: 60px; }
  .site-nav { padding-block: 8px; }
  .site-logo img { height: 32px; }
  .nav-location, .nav-clock { display: none; }
}

/* ---------- Works dropdown (home page) ---------- */
.works-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  display: flex; justify-content: center; padding-inline: var(--gutter);
  opacity: 0; transform: translateY(-10px); visibility: hidden; pointer-events: none;
  transition: opacity var(--dur-menu) ease, transform var(--dur-shift) var(--ease), visibility 0s linear var(--dur-shift);
}
.site-header.is-menu-open .works-menu {
  opacity: 1; transform: none; visibility: visible; pointer-events: auto;
  transition: opacity var(--dur-menu) ease, transform var(--dur-shift) var(--ease), visibility 0s;
}
.works-menu-panel {
  width: 100%; max-width: 980px; padding: 16px;
  background: var(--surface-card); border: 1px solid var(--line-violet);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg); box-shadow: var(--shadow-panel);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px;
}
.works-menu-tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 12px;
  border: 1px solid #EDE7F5; border-radius: var(--radius-md); color: var(--ink-900); font-size: 14.5px;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.works-menu-tile .icon { color: var(--accent); }
.works-menu-tile:hover { border-color: var(--accent); background: #FAF7FE; color: var(--ink-900); }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line-warm); padding-top: clamp(40px, 6vw, 72px); }
.footer-cta {
  background: var(--surface-tint); border-radius: var(--radius-xl); padding: clamp(28px, 4vw, 44px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(24px, 3vw, 32px); align-items: center;
}
.footer-cta h2 { font-size: clamp(32px, 3.6vw, 46px); letter-spacing: -0.02em; }
.footer-cta p { margin-top: 10px; font-size: 17px; line-height: 1.6; color: #45395E; }
.footer-cta-action { display: flex; justify-content: flex-end; }
.footer-details {
  padding-top: clamp(64px, 9vw, 104px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: clamp(24px, 3vw, 32px);
}
.footer-details--first { padding-top: 0; }
.footer-col { border-top: 1px solid var(--line-warm); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.footer-col .eyebrow { font-size: 12.5px; }
.footer-col a, .footer-links { font-size: 16px; color: var(--ink-600); }
.footer-col a:hover { color: var(--accent); }
.footer-links { display: flex; gap: 8px; }
.footer-base {
  padding-block: clamp(56px, 8vw, 88px) 40px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.footer-base img { height: 34px; width: auto; }
.footer-base p { font-size: 13.5px; color: var(--ink-500); }
.to-top {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--ink-900);
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.to-top:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; border: 0; cursor: pointer;
  font-size: 15.5px; font-weight: 500; padding: 15px 24px; border-radius: var(--radius-pill);
  transition: background var(--dur-fast) var(--ease);
}
.btn:hover { background: var(--accent-hover); color: #fff; }
.btn--full { width: 100%; padding: 18px 22px; }
.btn[disabled] { cursor: default; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface-card); border: 1px solid var(--line-warm); border-radius: var(--radius-lg);
  padding: 30px; display: flex; flex-direction: column; gap: 14px;
  transition: border-color var(--dur-fast) var(--ease);
}
/* One dark card per row is the system's emphasis device */
.card--dark { background: var(--surface-dark); border-color: var(--surface-dark); color: #fff; }
.card--dark h3, .card--dark .edu-title { color: #fff; }
.card--dark p { color: var(--ink-on-dark-strong); }

/* Em-dash bullet list */
.dash-list { display: flex; flex-direction: column; gap: 8px; padding: 0; list-style: none; font-size: 15px; color: var(--ink-600); }
.dash-list li { display: flex; gap: 10px; }
.dash-list li::before { content: "—"; color: var(--accent); }
.card--dark .dash-list li { color: var(--ink-on-dark-strong); }
.card--dark .dash-list li::before { color: var(--violet-300); }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  padding: 8px 16px; font-size: 14px; color: var(--ink-600);
}

/* Image wells — tinted boxes that hold images and video */
.well { position: relative; overflow: hidden; background: var(--surface-tint); border-radius: var(--radius-lg); }
.media-fill { width: 100%; height: 100%; object-fit: cover; }
.captioned { display: flex; flex-direction: column; gap: 12px; }

/* CSS phone mock-ups (used for Fjorten until real screens exist) */
/* Title card used as a cover until real project media exists */
.cover-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 6%;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 4vw, 56px);
  line-height: 1.05; text-align: center; color: var(--ink-900);
}
.phones { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 6%; padding: 6%; }
.phone {
  height: 88%; aspect-ratio: 9 / 19; border-radius: 22px; background: var(--ink-900); padding: 3.5%;
  box-shadow: var(--shadow-float);
}
.phone span {
  width: 100%; height: 100%; border-radius: 16px; background: var(--surface-card);
  display: grid; place-items: center; text-align: center; padding: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(11px, 1.2vw, 15px); color: var(--ink-700);
}
.phone.is-lifted { transform: translateY(-5%); }

/* Monogram circle (quotes) */
.monogram {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-tint); color: var(--violet-700); font-size: 12px; font-weight: 700;
}
.ref-name { display: block; font-size: 14.5px; font-weight: 500; color: var(--ink-900); }

/* ---------- Marquee (services ticker) ---------- */
.marquee {
  overflow: hidden; background: var(--surface-hero); padding-block: 26px;
  border-top: 1px solid var(--line-warm); border-bottom: 1px solid var(--line-cool);
}
.marquee-track { display: flex; width: max-content; animation: marquee var(--dur-marquee) linear infinite; }
.marquee-run { display: flex; align-items: center; gap: 46px; padding-right: 46px; font-size: 19px; color: var(--ink-700); white-space: nowrap; }
.marquee-sep { color: #C9BFD8; }
@keyframes marquee { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }

/* ---------- Dark band (one per page) ---------- */
.dark-band { background: var(--surface-dark); color: #fff; margin-top: 88px; padding-block: var(--section-y); }
.band-head { display: flex; flex-direction: column; gap: 14px; max-width: 40em; margin-bottom: 48px; }
.band-head .eyebrow { color: var(--violet-300); }
.band-head h2 { color: #fff; }
.band-head p { font-size: 16.5px; line-height: 1.6; color: var(--ink-on-dark); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); gap: clamp(24px, 3vw, 32px); }
.steps--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.step { border-top: 1px solid var(--line-dark); padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.step-label { font-size: 13px; letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; color: var(--violet-300); }
.step h3 { color: #fff; font-size: 20px; }
.step p:not(.step-label) { font-size: 15px; line-height: 1.62; color: var(--ink-on-dark); }

/* ---------- Hero background layers (home + about) ---------- */
.hero-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-bg > div { position: absolute; pointer-events: none; }
.hero-aurora {
  inset: 0; opacity: 0.16;
  background: radial-gradient(120% 90% at 50% 120%, #2A0B57 0%, #4A17A0 26%, #7C2CDD 48%, rgba(124, 44, 221, 0) 72%);
}
.hero-dots {
  inset: 0; opacity: 0.55; background-size: 16px 16px;
  background-image: radial-gradient(rgba(58, 20, 130, 0.16) 1px, transparent 1.2px);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 62%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 62%);
}

/* ---------- Availability dot ---------- */
.availability { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 500; color: var(--ink-900); }
.dot { position: relative; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
/* A ring that swells out from the dot and fades, like a live signal */
.dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent);
  animation: dot-pulse 2s ease-out infinite;
}
@keyframes dot-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(2.8); opacity: 0; }
}

/* ---------- Work filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter {
  font-size: 14px; padding: 9px 16px; border-radius: var(--radius-pill); cursor: pointer;
  background: var(--surface-card); color: var(--ink-600); border: 1px solid var(--line-strong);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.filter:hover { border-color: var(--ink-900); }
.filter[aria-pressed="true"] { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }

/* ---------- Work grid ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 32px 20px; }
.work-tile { color: var(--ink-900); display: block; }
.work-tile[hidden] { display: none; }
.work-tile figure { display: flex; flex-direction: column; gap: 14px; }
.work-media { height: clamp(200px, 26vw, 300px); }
/* The first visible tile spans the full row and is taller */
.work-tile.is-featured { grid-column: 1 / -1; }
.work-tile.is-featured .work-media { height: clamp(230px, 34vw, 420px); }
/* Wide 2:1 thumbnails: on phones the frame takes the image's shape so nothing is cropped */
@media (max-width: 767px) {
  .work-media.well--wide, .work-tile.is-featured .work-media.well--wide, .next-media.well--wide { height: auto; aspect-ratio: 2 / 1; }
}
.work-tile figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.work-title { font-size: 17px; font-weight: 500; }
.work-tile:hover .work-title { color: var(--accent); }
