/* ==========================================================================
   Nibi's Tech — Design System
   Brand: #02aff3 (Nibi Blue) + Black
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  --brand: #02aff3;
  --brand-deep: #0189c0;
  --brand-dark: #016f9c;
  --brand-tint: #e6f8fe;
  --brand-tint-2: #cceffd;

  --ink: #06070a;
  --ink-2: #0e1116;
  --ink-3: #171b22;
  --line-dark: rgba(255, 255, 255, .12);

  --paper: #ffffff;
  --paper-2: #f6f8fa;
  --paper-3: #eef2f6;
  --line: #e3e8ee;

  --text: #10151c;
  --text-2: #4a5462;
  --text-3: #737f8d;
  --text-inv: #ffffff;
  --text-inv-2: rgba(255, 255, 255, .68);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(6, 7, 10, .05), 0 4px 12px rgba(6, 7, 10, .04);
  --shadow: 0 2px 6px rgba(6, 7, 10, .06), 0 18px 40px -18px rgba(6, 7, 10, .18);
  --shadow-lg: 0 30px 70px -30px rgba(6, 7, 10, .35);
  --glow: 0 20px 50px -22px rgba(2, 175, 243, .55);

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 40px);
  --sect: clamp(64px, 9vw, 120px);

  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
          Roboto, Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(.22, .78, .35, 1);
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--brand); color: #fff; }

/* --- Typography --------------------------------------------------------- */
h1, h2, h3, h4 {
  line-height: 1.08;
  letter-spacing: -.03em;
  font-weight: 800;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6.2vw, 4.3rem); }
h2 { font-size: clamp(1.95rem, 4.4vw, 3.05rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); letter-spacing: -.02em; line-height: 1.22; }
h4 { font-size: 1.06rem; letter-spacing: -.015em; line-height: 1.3; }

p { text-wrap: pretty; }

.lead {
  font-size: clamp(1.05rem, 1.9vw, 1.24rem);
  line-height: 1.62;
  color: var(--text-2);
}

.hl { color: var(--brand); }

/* --- Layout ------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-wide { max-width: 1340px; }
.wrap-narrow { max-width: 820px; }

.section { padding-block: var(--sect); position: relative; }
.section-tight { padding-block: clamp(48px, 6vw, 76px); }
.bg-soft { background: var(--paper-2); }
.bg-dark { background: var(--ink); color: var(--text-inv); }
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4 { color: #fff; }
.bg-dark .lead { color: var(--text-inv-2); }

/* --- Eyebrow / section head --------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.bg-dark .eyebrow { color: var(--brand); }

.sect-head { max-width: 720px; margin-bottom: clamp(38px, 5vw, 60px); }
.sect-head.center { margin-inline: auto; text-align: center; }
.sect-head.center .eyebrow::before { display: none; }
.sect-head p { margin-top: 18px; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 28px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background-color .25s var(--ease), border-color .25s var(--ease),
              color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; flex: none; }

.btn-dark { --btn-bg: var(--ink); --btn-fg: #fff; }
.btn-dark:hover { box-shadow: 0 18px 40px -20px rgba(6, 7, 10, .7); }

.btn-light { --btn-bg: #fff; --btn-fg: var(--ink); }
.btn-light:hover { box-shadow: 0 18px 40px -20px rgba(255, 255, 255, .35); }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); box-shadow: none; background: var(--paper-2); }

/* Ghost buttons on any dark surface — hero, CTA band and .bg-dark sections. */
.bg-dark .btn-ghost,
.hero .btn-ghost,
.cta .btn-ghost,
.site-footer .btn-ghost {
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, .28);
}
.bg-dark .btn-ghost:hover,
.hero .btn-ghost:hover,
.cta .btn-ghost:hover,
.site-footer .btn-ghost:hover {
  background: rgba(255, 255, 255, .09);
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
}

.btn-sm { padding: 11px 20px; font-size: .88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.center .btn-row { justify-content: center; }

/* Text link with arrow */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: .93rem;
  color: var(--brand-deep);
  transition: gap .25s var(--ease);
}
.tlink svg { width: 15px; height: 15px; }
.tlink:hover { gap: 12px; }
.bg-dark .tlink { color: var(--brand); }

/* --- Header ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, .93);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  line-height: 0;
}
.brand img {
  height: 30px;
  width: auto;
  max-width: none;
}
@media (max-width: 420px) { .brand img { height: 26px; } }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  position: relative;
  padding: 9px 13px;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-2);
  border-radius: 8px;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--paper-2); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 13px; right: 13px; bottom: 3px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.nav-cta { flex: none; }

/* The in-drawer CTA is for mobile only — the header CTA covers desktop. */
.nav-links > .btn { display: none; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  padding: 0;
  place-items: center;
}
.nav-toggle span {
  display: block;
  width: 17px; height: 1.8px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span + span { margin-top: 4.5px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.3px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 14px var(--gutter) 26px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform .28s var(--ease), opacity .28s var(--ease), visibility .28s;
    max-height: calc(100dvh - 74px);
    overflow-y: auto;
  }
  .nav-links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a { padding: 13px 12px; font-size: 1rem; }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-links a[aria-current="page"] { color: var(--brand-deep); }
  .nav-links > .btn { display: inline-flex; margin-top: 12px; }
  .nav-cta { display: none; }
}

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .1) 1px, transparent 0);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 30%, #000 20%, transparent 78%);
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  width: min(900px, 120%);
  aspect-ratio: 1;
  left: 50%;
  top: -46%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(2, 175, 243, .34) 0%, rgba(2, 175, 243, .07) 42%, transparent 68%);
  z-index: -1;
  pointer-events: none;
}

.hero-inner {
  padding-block: clamp(72px, 11vw, 132px) clamp(64px, 9vw, 104px);
  text-align: center;
  position: relative;
}

.hero h1 { color: #fff; margin-bottom: 24px; }
.hero .lead { max-width: 640px; margin-inline: auto; color: var(--text-inv-2); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px 7px 14px;
  margin-bottom: 28px;
  border: 1px solid var(--line-dark);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .05);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-inv-2);
  letter-spacing: -.005em;
}
.pill b {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #04222e;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Page hero (inner pages) */
.page-hero { padding-block: clamp(56px, 8vw, 96px) clamp(50px, 7vw, 84px); text-align: left; }
.page-hero h1 { font-size: clamp(2.15rem, 5.2vw, 3.6rem); }
.page-hero .lead { margin-inline: 0; max-width: 620px; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-inv-2);
  margin-bottom: 20px;
}
.crumbs a { color: var(--brand); }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { opacity: .45; }

/* --- Trust strip -------------------------------------------------------- */
.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: clamp(44px, 6vw, 66px);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-lg);
  background: var(--line-dark);
  overflow: hidden;
}
.trust div {
  background: rgba(10, 12, 16, .78);
  backdrop-filter: blur(8px);
  padding: 22px 16px;
  text-align: center;
}
.trust b {
  display: block;
  font-size: clamp(1.5rem, 3.4vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
  color: #fff;
}
.trust small {
  display: block;
  margin-top: 5px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-inv-2);
}
@media (max-width: 700px) {
  .trust { grid-template-columns: repeat(2, 1fr); }
}

/* --- School logos ------------------------------------------------------- */
/* A quiet band of partner-school crests. The logos are the message, so the
   tiles stay plain and the type around them stays small. */
.logos {
  padding: clamp(38px, 5.5vw, 60px) 0;
  border-bottom: 1px solid var(--line);
}
.logos-head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: clamp(26px, 3.4vw, 38px);
  text-align: center;
}
.logos-head p {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--text-3);
}
.logos-head p b { color: var(--brand-deep); font-weight: 800; }

/* One unbroken line that drifts on its own and can also be swiped. The list is
   duplicated in the markup so the reset at the halfway point is invisible. */
.logo-track {
  position: relative;
  margin-inline: calc(var(--gutter) * -1);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.logo-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(30px, 4.6vw, 62px);
  padding-inline: var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.logo-row::-webkit-scrollbar { display: none; }
.logo-row img {
  flex: none;
  display: block;
  width: auto;
  height: clamp(58px, 6.2vw, 84px);
  object-fit: contain;
  opacity: .88;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.logo-row img:hover { opacity: 1; transform: scale(1.06); }

/* Full grid — named tiles, used on the For Schools page. Flex rather than
   grid so an odd count centres its last row instead of orphaning it left. */
.logo-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.logo-card {
  flex: 0 1 194px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  text-align: center;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.logo-card:hover {
  border-color: var(--brand);
  box-shadow: 0 12px 30px rgba(2, 175, 243, .12);
  transform: translateY(-3px);
}
.logo-card img {
  width: 100%;
  height: 92px;
  object-fit: contain;
}
.logo-card span {
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -.01em;
  color: var(--text-2);
}
@media (max-width: 560px) {
  .logo-row { grid-template-columns: repeat(3, 1fr); }
  .logo-row img { height: 62px; }
  .logo-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-card img { height: 76px; }
}

/* --- Grids -------------------------------------------------------------- */
.grid { display: grid; gap: 20px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 940px) {
  .g-3, .g-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
}

.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.split.rev > *:first-child { order: 2; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split.rev > *:first-child { order: 0; }
}

/* --- Cards -------------------------------------------------------------- */
.card {
  position: relative;
  padding: 30px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--brand-tint-2);
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-2); font-size: .95rem; }
.card .tlink { margin-top: 18px; }

.bg-soft .card { background: #fff; }
.bg-dark .card {
  background: var(--ink-2);
  border-color: var(--line-dark);
}
.bg-dark .card:hover { border-color: rgba(2, 175, 243, .45); box-shadow: none; background: var(--ink-3); }
.bg-dark .card p { color: var(--text-inv-2); }

.icon {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  margin-bottom: 20px;
  border-radius: 14px;
  background: var(--brand-tint);
  color: var(--brand-deep);
  flex: none;
}
.icon svg { width: 24px; height: 24px; }
.bg-dark .icon { background: rgba(2, 175, 243, .13); color: var(--brand); }

.card-num {
  position: absolute;
  top: 22px; right: 26px;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1;
  color: var(--paper-3);
  pointer-events: none;
}
.bg-dark .card-num { color: rgba(255, 255, 255, .07); }

/* --- Pathway cards ------------------------------------------------------ */
.pathway {
  display: flex;
  flex-direction: column;
  padding: 32px 30px 30px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.pathway::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), transparent);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.pathway:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--brand-tint-2); }
.pathway:hover::before { opacity: 1; }
.pathway h3 { margin-bottom: 10px; }
.pathway > p { color: var(--text-2); font-size: .95rem; }

/* Icon and pathway label share one row instead of stacking. */
.p-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
}
.p-head .icon { margin-bottom: 0; }

/* Compact keyword row replaces a long bulleted list — same information,
   a fraction of the visual weight. */
.p-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.p-tags span {
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  border: 1px solid var(--line);
  font-size: .79rem;
  font-weight: 600;
  letter-spacing: -.005em;
  color: var(--text-2);
}
.bg-dark .p-tags { border-top-color: var(--line-dark); }
.bg-dark .p-tags span { background: rgba(255, 255, 255, .05); border-color: var(--line-dark); color: var(--text-inv-2); }

/* Anchor the link to the bottom so all cards line up. */
.pathway .tlink { margin-top: auto; padding-top: 26px; }

.pathway .tag {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.pathway .tag.alt { background: var(--brand); color: #04222e; }

/* --- Check list --------------------------------------------------------- */
.ticks { display: grid; gap: 13px; margin-top: 22px; }
.ticks li {
  position: relative;
  padding-left: 31px;
  font-size: .93rem;
  line-height: 1.55;
  color: var(--text-2);
}
.ticks li strong { color: var(--text); font-weight: 700; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--brand-tint) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230189c0' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.bg-dark .ticks li { color: var(--text-inv-2); }
.bg-dark .ticks li strong { color: #fff; }

/* Labelled variant — heading on its own line, description beneath.
   Used wherever a list item is "Label. Explanation" so it reads as two
   levels instead of one dense run-on line. */
.ticks-detail { gap: 26px; margin-top: 30px; }
.ticks-detail li { padding-left: 36px; font-size: .95rem; line-height: 1.62; }
.ticks-detail li::before { top: 0; width: 22px; height: 22px; background-size: 13px; }
.ticks-detail li strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.bg-dark .ticks li::before {
  background-color: rgba(2, 175, 243, .16);
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2302aff3' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

/* --- Media frame (image placeholders) ----------------------------------- */
.frame {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background:
    linear-gradient(140deg, var(--ink-2) 0%, var(--ink) 55%),
    var(--ink);
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 12%, rgba(2, 175, 243, .3), transparent 58%);
  pointer-events: none;
}
.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
}
.frame.tall { aspect-ratio: 3 / 4; }
.frame.wide { aspect-ratio: 16 / 9; }
.frame.square { aspect-ratio: 1; }

.frame-stack { position: relative; }
.frame-badge {
  position: absolute;
  z-index: 2;
  left: -14px;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 14px 16px;
  border-radius: var(--r);
  background: #fff;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.frame-badge b { display: block; font-size: 1.35rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--ink); }
.frame-badge small { font-size: .74rem; font-weight: 600; color: var(--text-3); letter-spacing: .04em; text-transform: uppercase; }
.frame-badge .icon { width: 40px; height: 40px; margin: 0; border-radius: 11px; }
.frame-badge .icon svg { width: 20px; height: 20px; }
@media (max-width: 880px) { .frame-badge { left: 14px; } }

/* --- Subject tiles ------------------------------------------------------ */
.subject {
  display: flex;
  gap: 18px;
  padding: 26px 24px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.subject:hover { border-color: var(--brand-tint-2); transform: translateY(-4px); box-shadow: var(--shadow); }
.subject .icon { margin-bottom: 0; width: 46px; height: 46px; border-radius: 13px; }
.subject h4 { margin-bottom: 6px; }
.subject p { font-size: .9rem; color: var(--text-2); line-height: 1.55; }
@media (max-width: 520px) { .subject { flex-direction: column; gap: 14px; } }

/* --- Stats -------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat {
  padding: 30px 26px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-dark);
  background: linear-gradient(160deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, 0));
}
.stat b {
  display: block;
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1;
  color: var(--brand);
}
.stat span { display: block; margin-top: 12px; font-weight: 700; font-size: .98rem; color: #fff; }
.stat small { display: block; margin-top: 5px; font-size: .84rem; color: var(--text-inv-2); line-height: 1.5; }
@media (max-width: 940px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stats { grid-template-columns: 1fr; } }

/* --- Timeline ----------------------------------------------------------- */
.timeline { position: relative; display: grid; gap: 30px; padding-left: 30px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(var(--brand), var(--brand-tint-2));
  border-radius: 2px;
}
.timeline li { position: relative; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -30px; top: 7px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
}
.timeline h4 { margin-bottom: 6px; }
.timeline time {
  display: block;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 7px;
}
.timeline p { color: var(--text-2); font-size: .95rem; }

/* --- Testimonials ------------------------------------------------------- */
.quotes {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(400px, 82vw);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 4px 26px;
  margin-inline: -4px;
  scrollbar-width: none;
}
.quotes::-webkit-scrollbar { display: none; }
.quote {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  padding: 32px 30px;
  border-radius: var(--r-xl);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.quote .mark {
  font-size: 3.2rem;
  line-height: .8;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 14px;
  height: 26px;
}
.quote p { font-size: 1.02rem; line-height: 1.6; color: var(--text); letter-spacing: -.012em; flex: 1; }
.quote footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: .86rem;
  color: var(--text-3);
  font-weight: 600;
}
.quote footer b { display: block; color: var(--text); font-weight: 700; font-size: .93rem; }

.quotes-nav { display: flex; gap: 10px; }
.qbtn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  color: var(--ink);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.qbtn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.qbtn svg { width: 17px; height: 17px; }
.quotes-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.quotes-head .sect-head { margin-bottom: 0; }
@media (max-width: 620px) { .quotes-nav { display: none; } }

/* --- Accordion ---------------------------------------------------------- */
.faq { display: grid; gap: 12px; }
.faq details {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  overflow: hidden;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.faq details[open] { border-color: var(--brand-tint-2); box-shadow: var(--shadow-sm); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -.015em;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--paper-2) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310151c' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 13px no-repeat;
  transition: transform .3s var(--ease), background-color .3s var(--ease);
}
.faq details[open] summary::after {
  transform: rotate(135deg);
  background-color: var(--brand-tint);
}
.faq summary:hover { color: var(--brand-deep); }
.faq .answer { padding: 0 24px 22px; color: var(--text-2); font-size: .96rem; max-width: 76ch; }
.faq .answer a { color: var(--brand-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* --- CTA band ----------------------------------------------------------- */
.cta {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--ink);
  color: #fff;
  padding: clamp(44px, 6vw, 76px) clamp(28px, 5vw, 68px);
  text-align: center;
  isolation: isolate;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .09) 1px, transparent 0);
  background-size: 30px 30px;
  mask-image: radial-gradient(ellipse 70% 90% at 50% 50%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 50% 50%, #000, transparent 75%);
  z-index: -2;
}
.cta::after {
  content: "";
  position: absolute;
  width: 620px; height: 620px;
  left: 50%; bottom: -72%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(2, 175, 243, .4), transparent 62%);
  z-index: -1;
}
.cta h2 { color: #fff; }
.cta p { max-width: 560px; margin: 18px auto 0; color: var(--text-inv-2); font-size: 1.06rem; }
.cta .btn-row { justify-content: center; }

/* --- Contact ------------------------------------------------------------ */
.contact-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(28px, 4vw, 52px); align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.info-list { display: grid; gap: 14px; }
.info {
  display: flex;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fff;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
.info:hover { border-color: var(--brand-tint-2); transform: translateY(-3px); }
.info .icon { width: 42px; height: 42px; margin: 0; border-radius: 12px; }
.info .icon svg { width: 20px; height: 20px; }
.info small {
  display: block;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 4px;
}
.info b { font-weight: 700; font-size: 1rem; letter-spacing: -.015em; line-height: 1.45; display: block; }
.info a:hover { color: var(--brand-deep); }

.form {
  padding: clamp(26px, 3.4vw, 40px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: #fff;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: -.005em;
  margin-bottom: 7px;
  color: var(--text);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
  font-size: .95rem;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 118px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(2, 175, 243, .13);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.form .btn { width: 100%; margin-top: 8px; }
.form-note { margin-top: 14px; font-size: .82rem; color: var(--text-3); text-align: center; line-height: 1.55; }

/* --- Footer ------------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--text-inv-2); padding-block: clamp(56px, 7vw, 84px) 32px; }
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: clamp(28px, 4vw, 52px);
}
@media (max-width: 880px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

.site-footer .brand { margin-bottom: 18px; }
.site-footer .brand img { height: 34px; }
.site-footer p { font-size: .92rem; line-height: 1.68; max-width: 34ch; }
.foot-h {
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}
.foot-list { display: grid; gap: 10px; }
.foot-list a, .foot-list li { font-size: .92rem; }
.foot-list a { color: var(--text-inv-2); transition: color .2s var(--ease); }
.foot-list a:hover { color: var(--brand); }

.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 11px;
  color: #fff;
  transition: background-color .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease);
}
.socials a:hover { background: var(--brand); border-color: var(--brand); transform: translateY(-2px); }
.socials svg { width: 17px; height: 17px; }

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(40px, 5vw, 62px);
  padding-top: 26px;
  border-top: 1px solid var(--line-dark);
  font-size: .85rem;
}
.foot-bottom p { max-width: none; }

/* --- Floating WhatsApp -------------------------------------------------- */
.wa {
  position: fixed;
  right: 18px; bottom: 18px;
  z-index: 90;
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  box-shadow: 0 12px 30px -8px rgba(34, 197, 94, .6);
  transition: transform .25s var(--ease);
}
.wa:hover { transform: scale(1.07); }
.wa svg { width: 27px; height: 27px; }
@media (max-width: 520px) { .wa { width: 50px; height: 50px; right: 14px; bottom: 14px; } }

/* --- Reveal animations -------------------------------------------------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal="1"] { transition-delay: .08s; }
.js [data-reveal="2"] { transition-delay: .16s; }
.js [data-reveal="3"] { transition-delay: .24s; }
.js [data-reveal="4"] { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* --- Utilities ---------------------------------------------------------- */
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  padding: 11px 20px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: .9rem;
}
.skip:focus { left: 12px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.mt-0 { margin-top: 0; }
.mt-l { margin-top: clamp(38px, 5vw, 58px); }
.text-center { text-align: center; }

/* ==========================================================================
   Navigation dropdown
   ========================================================================== */
.nav-item { position: relative; }

.nav-sub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border: 0;
  background: none;
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-2);
  border-radius: 8px;
  cursor: pointer;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-sub-toggle svg { width: 12px; height: 12px; transition: transform .25s var(--ease); }
.nav-sub-toggle:hover { color: var(--ink); background: var(--paper-2); }
.nav-item.is-active > .nav-sub-toggle { color: var(--ink); font-weight: 700; }

.nav-sub {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 244px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .22s var(--ease), transform .22s var(--ease), visibility .22s;
}
.nav-item:hover > .nav-sub,
.nav-item:focus-within > .nav-sub,
.nav-item.is-open > .nav-sub { opacity: 1; visibility: visible; transform: none; }
.nav-item:hover > .nav-sub-toggle svg,
.nav-item.is-open > .nav-sub-toggle svg { transform: rotate(180deg); }

.nav-sub a {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: .91rem;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}
.nav-sub a small {
  display: block;
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-3);
  margin-top: 2px;
}
.nav-sub a:hover { background: var(--paper-2); color: var(--ink); }
.nav-sub a:hover small { color: var(--text-2); }
.nav-sub a[aria-current="page"] { color: var(--brand-deep); background: var(--brand-tint); }

@media (max-width: 940px) {
  .nav-item { width: 100%; }
  .nav-sub-toggle { width: 100%; justify-content: space-between; padding: 13px 12px; font-size: 1rem; }
  .nav-sub {
    position: static;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: 0;
    box-shadow: none;
    padding: 0 0 6px 12px;
    display: none;
    background: none;
  }
  .nav-item.is-open > .nav-sub { display: block; }
  .nav-item:hover > .nav-sub, .nav-item:focus-within > .nav-sub { display: none; }
  .nav-item.is-open:hover > .nav-sub, .nav-item.is-open:focus-within > .nav-sub { display: block; }
  .nav-sub a { padding: 11px 12px; }
}

/* ==========================================================================
   Photo mosaic — asymmetric image collage
   ========================================================================== */
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(130px, 15vw, 190px);
  gap: 14px;
}
.m-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(140deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line);
}
.m-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s var(--ease);
}
.m-item:hover img { transform: scale(1.06); }
.m-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px 18px 15px;
  background: linear-gradient(transparent, rgba(6, 7, 10, .85));
  color: #fff;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: -.01em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.m-item:hover figcaption, .m-item:focus-within figcaption { opacity: 1; transform: none; }

.m-wide { grid-column: span 2; }
.m-tall { grid-row: span 2; }
.m-big  { grid-column: span 2; grid-row: span 2; }

@media (max-width: 880px) {
  .mosaic { grid-template-columns: repeat(2, 1fr); gap: 11px; }
  .m-big { grid-column: span 2; grid-row: span 2; }
  .m-wide { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 480px) {
  .mosaic { grid-auto-rows: 150px; }
  .m-tall { grid-row: span 1; }
  .m-big { grid-row: span 2; }
}

/* ==========================================================================
   Photo rail — horizontal scrolling strip
   ========================================================================== */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(320px, 74vw);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 18px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail figure {
  scroll-snap-align: start;
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(140deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line);
}
.bg-dark .rail figure, .bg-dark .m-item { border-color: var(--line-dark); }
.rail figure img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.rail figure:hover img { transform: scale(1.05); }
.rail figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px 18px 16px;
  background: linear-gradient(transparent, rgba(6, 7, 10, .88));
  color: #fff;
  font-size: .86rem;
  font-weight: 600;
}
.rail-bleed { margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }

/* ==========================================================================
   Gallery
   ========================================================================== */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: clamp(26px, 4vw, 40px);
}
.chip {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: #fff;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.gitem {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(140deg, var(--ink-2), var(--ink));
  cursor: zoom-in;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.gitem:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--brand-tint-2); }
.gitem img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.gitem:hover img { transform: scale(1.07); }
.gitem .cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 44px 18px 16px;
  background: linear-gradient(transparent, rgba(6, 7, 10, .9));
  color: #fff;
  text-align: left;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.gitem .cap em {
  display: block;
  font-style: normal;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 3px;
}
.gitem[hidden] { display: none; }

.gallery-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-3);
  font-weight: 600;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(6, 7, 10, .93);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lightbox.is-open { display: grid; }
.lightbox figure {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: lbIn .3s var(--ease);
}
@keyframes lbIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.lightbox img {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  margin-inline: auto;
  object-fit: contain;
  border-radius: var(--r);
}
.lightbox figcaption { color: #fff; text-align: center; font-size: .93rem; font-weight: 600; }
.lightbox figcaption span { display: block; color: var(--text-inv-2); font-weight: 500; font-size: .84rem; margin-top: 4px; }

.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  cursor: pointer;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.lb-btn:hover { background: var(--brand); border-color: var(--brand); transform: scale(1.06); }
.lb-btn svg { width: 19px; height: 19px; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.06); }
@media (max-width: 620px) {
  .lb-prev { left: 10px; } .lb-next { right: 10px; }
  .lb-btn { width: 42px; height: 42px; }
}

/* ==========================================================================
   Blog
   ========================================================================== */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 940px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }

.post {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.post:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--brand-tint-2); }
.post .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(140deg, var(--ink-2), var(--ink));
}
.post .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.post:hover .thumb img { transform: scale(1.05); }
.post .body { padding: 26px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.post h3 { margin-bottom: 10px; font-size: 1.18rem; }
.post p { color: var(--text-2); font-size: .93rem; flex: 1; }
.post .tlink { margin-top: 20px; }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text-3);
}
.meta .cat {
  padding: 4px 11px;
  border-radius: var(--r-pill);
  background: var(--brand-tint);
  color: var(--brand-deep);
  letter-spacing: .09em;
  text-transform: uppercase;
  font-size: .68rem;
  font-weight: 800;
}
.meta .dot { opacity: .4; }
.meta time { white-space: nowrap; }
.bg-dark .meta { color: var(--text-inv-2); }
.bg-dark .meta .cat { background: rgba(2, 175, 243, .16); color: var(--brand); }

/* Featured post */
.post-feature {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: clamp(28px, 4vw, 44px);
  transition: box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.post-feature:hover { box-shadow: var(--shadow-lg); border-color: var(--brand-tint-2); }
.post-feature .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(140deg, var(--ink-2), var(--ink)); }
.post-feature .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.post-feature:hover .thumb img { transform: scale(1.04); }
.post-feature .body { padding: clamp(28px, 4vw, 48px); align-self: center; }
.post-feature h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 14px; }
.post-feature p { color: var(--text-2); }
@media (max-width: 820px) {
  .post-feature { grid-template-columns: 1fr; }
  .post-feature .thumb { aspect-ratio: 16 / 9; }
}

/* ==========================================================================
   Article (blog detail)
   ========================================================================== */
.article-head { max-width: 760px; }
.article-hero {
  margin: clamp(30px, 4vw, 48px) 0 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line);
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 274px;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 940px) { .article-layout { grid-template-columns: 1fr; } }

.article { max-width: 68ch; font-size: 1.06rem; line-height: 1.75; color: var(--text-2); }
.article > * + * { margin-top: 1.25em; }
.article h2 {
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  color: var(--text);
  margin-top: 1.9em;
  scroll-margin-top: 100px;
}
.article h3 { font-size: 1.22rem; color: var(--text); margin-top: 1.6em; }
.article strong { color: var(--text); font-weight: 700; }
.article a { color: var(--brand-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.article a:hover { color: var(--ink); }
.article ul, .article ol { display: grid; gap: 11px; padding-left: 1.3em; }
.article ul li { list-style: disc; }
.article ol li { list-style: decimal; }
.article li::marker { color: var(--brand); }
.article figure { margin: 2.2em 0; }
.article figure img {
  width: 100%;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(140deg, var(--ink-2), var(--ink));
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.article figcaption {
  margin-top: 12px;
  font-size: .86rem;
  color: var(--text-3);
  text-align: center;
  line-height: 1.55;
}
.article blockquote {
  margin: 2em 0;
  padding: 26px 30px;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--r) var(--r) 0;
  background: var(--paper-2);
  font-size: 1.14rem;
  line-height: 1.6;
  letter-spacing: -.015em;
  color: var(--text);
  font-weight: 600;
}
.article hr { margin: 2.6em 0; border: 0; border-top: 1px solid var(--line); }

.article-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 2.2em 0; }
.article-figures figure { margin: 0; }
@media (max-width: 560px) { .article-figures { grid-template-columns: 1fr; } }

/* Author + sidebar */
.byline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line-dark);
}
.byline .av {
  width: 46px; height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #04222e;
  font-weight: 800;
  font-size: .95rem;
  letter-spacing: -.02em;
}
.byline b { display: block; font-size: .95rem; font-weight: 700; color: #fff; }
.byline small { font-size: .84rem; color: var(--text-inv-2); }

.aside { position: sticky; top: 96px; display: grid; gap: 20px; }
@media (max-width: 940px) { .aside { position: static; } }
.aside-card {
  padding: 24px 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
}
.aside-card h4 { margin-bottom: 14px; }
.toc { display: grid; gap: 2px; }
.toc a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: .89rem;
  font-weight: 600;
  color: var(--text-2);
  border-left: 2px solid transparent;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.toc a:hover { background: var(--paper-2); color: var(--ink); }
.toc a.is-current { color: var(--brand-deep); border-left-color: var(--brand); background: var(--brand-tint); }

.share { display: flex; gap: 9px; }
.share a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text-2);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.share a:hover { background: var(--ink); border-color: var(--ink); color: #fff; transform: translateY(-2px); }
.share svg { width: 17px; height: 17px; }

.aside-cta {
  padding: 26px 24px;
  border-radius: var(--r-lg);
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.aside-cta::after {
  content: "";
  position: absolute;
  width: 240px; height: 240px;
  right: -110px; bottom: -140px;
  background: radial-gradient(circle, rgba(2, 175, 243, .45), transparent 65%);
}
.aside-cta h4 { color: #fff; margin-bottom: 8px; position: relative; }
.aside-cta p { font-size: .89rem; color: var(--text-inv-2); margin-bottom: 18px; position: relative; }
.aside-cta .btn { width: 100%; position: relative; }

/* Prev / next */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: clamp(40px, 5vw, 60px);
  padding-top: clamp(32px, 4vw, 44px);
  border-top: 1px solid var(--line);
}
@media (max-width: 620px) { .post-nav { grid-template-columns: 1fr; } }
.post-nav a {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.post-nav a:hover { border-color: var(--brand-tint-2); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.post-nav small {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 7px;
}
.post-nav b { font-weight: 700; font-size: 1rem; letter-spacing: -.02em; line-height: 1.35; display: block; }
.post-nav .to-next { text-align: right; }
