/* =========================================================
   WEBFIX TECH CO LTD — design system
   Layout concept: a navy "stage" where a 3D laptop is directed by
   scroll, followed by calm white pages with a strict 12-col rhythm.
   Content is left-aligned; the stage is the one loud moment.
   ========================================================= */
:root {
  /* colour */
  --navy: #101C35;        /* primary, stage, footer */
  --navy-2: #16264A;      /* raised surfaces on navy */
  --navy-line: #263760;   /* hairlines on navy */
  --blue: #2563EB;        /* actions */
  --blue-ink: #1D4FD0;    /* action hover */
  --cyan: #06B6D4;        /* accent, highlights on navy */
  --white: #FFFFFF;
  --mist: #F5F7FA;        /* alternate section ground */
  --ink: #172033;         /* body text */
  --ink-2: #4E5A72;       /* secondary text, blue-biased grey */
  --line: #E1E6EF;        /* borders on light */
  --on-navy: #E8EEFA;
  --on-navy-2: #9FB0D3;
  --ok: #0E9F6E;
  --warn: #B7791F;
  --danger: #D33A3A;

  /* type */
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --t-xs: .8125rem;  --t-sm: .9375rem;  --t-md: 1.0625rem;  --t-lg: 1.25rem;
  --t-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --t-2xl: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --t-3xl: clamp(2.5rem, 1.5rem + 4.2vw, 4.75rem);

  /* space + shape */
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --wrap: 1200px;
  --r-sm: 8px; --r-md: 14px; --r-lg: 22px;
  --shadow: 0 1px 2px rgba(16,28,53,.06), 0 12px 32px -12px rgba(16,28,53,.18);
  --nav-h: 68px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--font); font-size: var(--t-md); line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--navy); }
img, svg, video, canvas { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-ink); }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -.022em; text-wrap: balance; font-weight: 800; color: inherit; }
h1 { font-size: var(--t-3xl); letter-spacing: -.035em; }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); letter-spacing: -.012em; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--white); color: var(--navy); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 700; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 48px); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
@media (min-width: 720px) { .wrap { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); } }
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--mist { background: var(--mist); }
.section--navy { background: var(--navy); color: var(--on-navy); }
.lede { font-size: var(--t-lg); color: var(--ink-2); max-width: 60ch; line-height: 1.6; }
.section--navy .lede, .on-navy .lede { color: var(--on-navy-2); }
.head { display: grid; gap: 16px; align-content: start; max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.kicker { font-family: var(--mono); font-size: var(--t-xs); color: var(--blue); letter-spacing: 0; }
.section--navy .kicker, .on-navy .kicker { color: var(--cyan); }
.muted { color: var(--ink-2); }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--blue); --fg: var(--white); --bd: var(--blue);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--bd);
  font: 700 var(--t-sm)/1 var(--font); text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { --bg: var(--blue-ink); --bd: var(--blue-ink); color: var(--white); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--line); }
.btn--ghost:hover { --bg: var(--ink); --bd: var(--ink); color: var(--white); }
.on-navy .btn--ghost, .section--navy .btn--ghost { --fg: var(--white); --bd: rgba(255,255,255,.28); }
.on-navy .btn--ghost:hover, .section--navy .btn--ghost:hover { --bg: var(--white); --bd: var(--white); color: var(--navy); }
.btn--sm { min-height: 40px; padding: 9px 16px; }
.btn[disabled], .btn.is-loading { opacity: .7; pointer-events: none; }
.btn.is-loading::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: var(--t-sm); text-decoration: none; }
.link-more svg { width: 16px; height: 16px; transition: transform .2s; }
.link-more:hover svg { transform: translateX(3px); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: var(--t-xs); font-weight: 700; line-height: 1.4; background: var(--mist); color: var(--ink-2); border: 1px solid var(--line); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--live { color: var(--ok); background: #E8F7F1; border-color: #BFE8D7; }
.badge--dev { color: var(--blue); background: #EAF1FE; border-color: #C8D9FB; }
.badge--concept { color: var(--warn); background: #FCF4E6; border-color: #F0DDB6; }
.badge--plain::before { display: none; }

/* ---------- navigation ---------- */
.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(16,28,53,.86); color: var(--white);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav__in { display: flex; align-items: center; gap: 24px; min-height: var(--nav-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-weight: 800; letter-spacing: -.01em; }
.brand:hover { color: var(--white); }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__name { font-size: 1.05rem; line-height: 1; }
.brand__name small { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .14em; color: var(--on-navy-2); margin-top: 4px; }
.nav__links { display: flex; gap: 2px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav__links a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--on-navy); text-decoration: none; font-size: var(--t-sm); font-weight: 600; }
.nav__links a:hover, .nav__links a[aria-current="page"] { background: rgba(255,255,255,.1); color: var(--white); }
.nav__cta { flex: none; }
.nav__toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: transparent; color: var(--white); cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 12px; right: 12px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s, opacity .2s, top .3s; }
.nav__toggle span:nth-child(1) { top: 15px; } .nav__toggle span:nth-child(2) { top: 21px; } .nav__toggle span:nth-child(3) { top: 27px; }
.nav.is-open .nav__toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
@media (max-width: 1120px) {
  .nav__toggle { display: block; }
  .nav__links, .nav__cta { display: none; }
  .nav__panel { position: fixed; inset: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) 0 0 0; background: var(--navy); padding: 20px var(--gutter-r) calc(28px + env(safe-area-inset-bottom, 0px)) var(--gutter); display: flex; flex-direction: column; gap: 18px; overflow-y: auto; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s; }
  .nav.is-open .nav__panel { opacity: 1; transform: none; visibility: visible; }
  .nav.is-open .nav__links { display: flex; flex-direction: column; margin: 0; }
  .nav.is-open .nav__links a { font-size: 1.35rem; padding: 12px 4px; border-radius: 0; border-bottom: 1px solid var(--navy-line); }
  .nav.is-open .nav__cta { display: inline-flex; }
}
@media (min-width: 1121px) { .nav__panel { display: contents; } }

/* ---------- the stage (hero + scroll story) ---------- */
.stage { position: relative; background: radial-gradient(120% 80% at 70% 20%, #1A2D5C 0%, var(--navy) 55%); color: var(--on-navy); }
.stage__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; pointer-events: none; }
.stage__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage__grid { position: absolute; inset: 0; background-image: radial-gradient(rgba(159,176,211,.16) 1px, transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(80% 70% at 65% 45%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(80% 70% at 65% 45%, #000 20%, transparent 75%); }
.stage__content { position: relative; margin-top: -100vh; margin-top: -100svh; z-index: 2; }
.scene { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding-block: calc(var(--nav-h) + 24px) 48px; }
.scene__copy { max-width: 520px; display: grid; gap: 22px; }
.hero h1 { color: var(--white); max-width: 14ch; font-size: clamp(2.4rem, 1.5rem + 3.2vw, 4.25rem); }
.hero h1 .line2 { display: block; color: var(--on-navy-2); }
.hero .lede { max-width: 46ch; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--t-sm); color: var(--on-navy-2); }
.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta svg { width: 16px; height: 16px; color: var(--cyan); }
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; font-size: var(--t-xs); color: var(--on-navy-2); margin-top: 8px; }
.scroll-cue i { width: 22px; height: 34px; border: 1.5px solid currentColor; border-radius: 12px; position: relative; }
.scroll-cue i::after { content: ""; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--cyan); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(10px); opacity: 0; } 100% { opacity: 0; } }
.step .scene__copy { background: linear-gradient(180deg, rgba(16,28,53,0), rgba(16,28,53,0)); }
.step__file { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: var(--t-xs); color: var(--cyan); background: rgba(6,182,212,.08); border: 1px solid rgba(6,182,212,.25); padding: 5px 10px; border-radius: 6px; width: max-content; }
.step h2 { color: var(--white); }
.step p { color: var(--on-navy-2); font-size: var(--t-lg); line-height: 1.6; }
.step ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.step li { display: flex; gap: 10px; align-items: baseline; color: var(--on-navy); }
.step li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); transform: translateY(-2px); }
.story-rail { position: absolute; right: max(18px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); display: grid; gap: 10px; z-index: 3; }
.story-rail b { display: block; width: 4px; height: 26px; border-radius: 4px; background: rgba(255,255,255,.18); transition: background .3s, height .3s; }
.story-rail b.on { background: var(--cyan); height: 40px; }

/* mascot */
.fixy { position: absolute; z-index: 4; left: 58%; top: 20%; display: flex; align-items: flex-start; gap: 10px; pointer-events: auto; transition: left .8s cubic-bezier(.2,.8,.2,1), top .8s cubic-bezier(.2,.8,.2,1), opacity .4s; }
.fixy__body { width: 54px; height: 54px; flex: none; border-radius: 50%; position: relative; cursor: pointer; border: 0; padding: 0;
  background: radial-gradient(circle at 32% 28%, #fff 0 6%, rgba(255,255,255,.55) 7% 16%, transparent 17%), radial-gradient(circle at 50% 55%, #4FD6EC, #2563EB 70%, #1B3FA6);
  box-shadow: 0 10px 30px -8px rgba(6,182,212,.7), inset 0 -6px 12px rgba(16,28,53,.35); animation: bob 3.2s ease-in-out infinite; }
.fixy__eye { position: absolute; top: 20px; width: 13px; height: 15px; border-radius: 50%; background: #fff; overflow: hidden; }
.fixy__eye:nth-child(1) { left: 12px; } .fixy__eye:nth-child(2) { right: 12px; }
.fixy__eye i { position: absolute; width: 7px; height: 8px; border-radius: 50%; background: var(--navy); left: 3px; top: 4px; transition: transform .12s; }
.fixy__body.blink .fixy__eye { transform: scaleY(.1); }
.fixy__bubble { position: relative; max-width: 230px; background: var(--white); color: var(--ink); font-size: var(--t-xs); line-height: 1.45; font-weight: 600; padding: 10px 30px 10px 12px; border-radius: 12px 12px 12px 4px; box-shadow: var(--shadow); transition: opacity .25s, transform .25s; }
.fixy__bubble.swap { opacity: 0; transform: translateY(4px); }
.fixy__close { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; background: transparent; color: var(--ink-2); border-radius: 6px; cursor: pointer; font-size: 16px; line-height: 1; }
.fixy.is-quiet .fixy__bubble { display: none; }
@keyframes bob { 50% { transform: translateY(-6px); } }

@media (max-width: 860px) {
  .scene { align-items: flex-end; padding-bottom: 40px; }
  .hero.scene { padding-top: calc(var(--nav-h) + 38vh); }
  .step.scene { padding-top: 0; padding-bottom: 92px; }
  .scene__copy { background: rgba(16,28,53,.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--navy-line); border-radius: var(--r-lg); padding: 22px; }
  .hero .scene__copy { background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0; }
  .step p { font-size: var(--t-md); }
  .fixy { left: auto !important; right: max(14px, env(safe-area-inset-right, 0px)); top: calc(var(--nav-h) + 14px) !important; flex-direction: row-reverse; }
  .fixy__bubble { border-radius: 12px 12px 4px 12px; max-width: 180px; font-size: .75rem; }
  .story-rail { display: none; }
  .stage__grid { mask-image: radial-gradient(90% 50% at 50% 28%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(90% 50% at 50% 28%, #000 20%, transparent 75%); }
}
.no-webgl .stage__canvas, .no-webgl .fixy { display: none; }

/* ---------- intro / values ---------- */
.intro { display: grid; gap: clamp(32px, 5vw, 72px); grid-template-columns: 1fr; }
@media (min-width: 900px) { .intro { grid-template-columns: 5fr 7fr; align-items: start; } }
.values { display: grid; gap: 0; border-top: 1px solid var(--line); }
.value { display: grid; grid-template-columns: 56px 1fr; gap: 6px 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.value svg { grid-row: span 2; width: 40px; height: 40px; color: var(--blue); }
.value p { color: var(--ink-2); }

/* ---------- service cards ---------- */
.grid { display: grid; gap: 20px; }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.svc { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); transition: border-color .25s, box-shadow .25s, transform .25s; overflow: hidden; }
.svc::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: linear-gradient(90deg, var(--blue), var(--cyan)); transform: scaleX(0); transform-origin: left; transition: transform .35s; }
.svc:hover, .svc:focus-within { border-color: #C8D6F3; box-shadow: var(--shadow); transform: translateY(-3px); }
.svc:hover::after, .svc:focus-within::after { transform: scaleX(1); }
.svc__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: #EEF3FE; color: var(--blue); transition: background .25s, color .25s; }
.svc:hover .svc__icon { background: var(--blue); color: var(--white); }
.svc__icon svg { width: 24px; height: 24px; }
.svc p { color: var(--ink-2); font-size: var(--t-sm); }
.svc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: var(--t-sm); }
.svc li { display: flex; gap: 10px; }
.svc li::before { content: ""; flex: none; width: 14px; height: 14px; margin-top: 5px; background: var(--cyan); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/contain no-repeat; }
.svc .link-more { margin-top: auto; padding-top: 6px; }

/* ---------- why ---------- */
.why { display: grid; gap: clamp(32px, 5vw, 72px); }
@media (min-width: 900px) { .why { grid-template-columns: 5fr 7fr; } }
.checks { display: grid; gap: 0; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); border-top: 1px solid var(--line); }
.check { display: grid; grid-template-columns: 28px 1fr; gap: 4px 12px; padding: 20px 16px 20px 0; border-bottom: 1px solid var(--line); }
.check svg { width: 22px; height: 22px; color: var(--blue); margin-top: 2px; grid-row: span 2; }
.check strong { font-size: var(--t-md); }
.check span { color: var(--ink-2); font-size: var(--t-sm); }

/* ---------- products ---------- */
.products { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.product { display: flex; flex-direction: column; gap: 16px; padding: 28px; border-radius: var(--r-lg); background: var(--navy-2); border: 1px solid var(--navy-line); color: var(--on-navy); transition: border-color .25s, transform .25s; }
.product:hover { border-color: rgba(6,182,212,.5); transform: translateY(-3px); }
.product__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product__logo { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: var(--white); }
.product__logo svg { width: 28px; height: 28px; }
.product h3 { color: var(--white); font-size: var(--t-xl); }
.product p { color: var(--on-navy-2); font-size: var(--t-sm); }
.product .link-more { color: var(--cyan); margin-top: auto; }
.section--navy .badge { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.section--navy .badge--live { color: #4ADE9F; } .section--navy .badge--dev { color: #7AA7FF; } .section--navy .badge--concept { color: #F2C46D; }

/* ---------- process ---------- */
.process { position: relative; display: grid; gap: 0; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.process__track { position: absolute; background: var(--line); border-radius: 2px; overflow: hidden; }
.process__fill { position: absolute; inset: 0; background: linear-gradient(90deg, var(--blue), var(--cyan)); transform-origin: left top; transform: scaleX(0); }
.pstep { position: relative; display: grid; gap: 8px; }
.pstep__n { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--white); border: 1.5px solid var(--line); font-weight: 800; color: var(--ink-2); position: relative; z-index: 1; transition: background .3s, color .3s, border-color .3s; font-variant-numeric: tabular-nums; }
.pstep.on .pstep__n { background: var(--blue); border-color: var(--blue); color: var(--white); }
.pstep p { color: var(--ink-2); font-size: var(--t-sm); max-width: 30ch; }
@media (min-width: 900px) {
  .process { grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 24px; }
  .process__track { left: 26px; right: 10%; top: 25px; height: 3px; }
  .pstep { padding-right: 8px; }
  .pstep__n { margin-bottom: 12px; }
}
@media (max-width: 899px) {
  .process { gap: 28px; }
  .process__track { left: 25px; top: 26px; bottom: 26px; width: 3px; }
  .process__fill { background: linear-gradient(180deg, var(--blue), var(--cyan)); transform: scaleY(0); }
  .pstep { grid-template-columns: 52px 1fr; column-gap: 18px; }
  .pstep__n { grid-row: span 2; }
}

/* ---------- portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter { min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--white); color: var(--ink); font: 600 var(--t-sm)/1 var(--font); cursor: pointer; }
.filter:hover { border-color: var(--ink-2); }
.filter[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.work { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--white); transition: box-shadow .25s, transform .25s; }
.work:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.work__media { aspect-ratio: 16/10; max-width: 100%; background: var(--navy); position: relative; overflow: hidden; }
.work__media img, .work__media svg { width: 100%; height: 100%; object-fit: cover; }
.work__media .note { position: absolute; left: 12px; bottom: 10px; font-size: .72rem; color: var(--on-navy-2); }
.work__body { display: flex; flex-direction: column; gap: 10px; padding: 22px; flex: 1; }
.work__cat { font-size: var(--t-xs); font-weight: 700; color: var(--blue); }
.work__body p { color: var(--ink-2); font-size: var(--t-sm); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .75rem; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--mist); color: var(--ink-2); }
.work__foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.work--next { justify-content: center; padding: 32px; gap: 14px; background: transparent; border: 1.5px dashed #C9D3E4; }
.work--next:hover { transform: none; box-shadow: none; }
.empty { padding: 48px 24px; text-align: center; color: var(--ink-2); border: 1px dashed var(--line); border-radius: var(--r-md); }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--navy); color: var(--on-navy); padding: clamp(36px, 6vw, 72px); display: grid; gap: 22px; }
.cta h2 { color: var(--white); max-width: 18ch; position: relative; }
.cta p { max-width: 56ch; color: var(--on-navy-2); position: relative; }
.cta .btns { position: relative; }
.cta__code { position: absolute; right: -20px; top: 50%; transform: translateY(-50%); font: 500 13px/1.75 var(--mono); color: rgba(159,176,211,.22); white-space: pre; pointer-events: none; user-select: none; }
@media (max-width: 860px) { .cta__code { display: none; } }

/* ---------- page header (inner pages) ---------- */
.page-hero { background: radial-gradient(100% 120% at 85% 0%, #1A2D5C 0%, var(--navy) 60%); color: var(--on-navy); padding-block: clamp(56px, 8vw, 104px) clamp(48px, 6vw, 80px); position: relative; overflow: hidden; }
.page-hero h1 { color: var(--white); font-size: var(--t-2xl); max-width: 20ch; }
.page-hero .lede { margin-top: 18px; }
.page-hero .crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: var(--t-xs); color: var(--on-navy-2); margin-bottom: 18px; list-style: none; padding: 0; }
.page-hero .crumbs a { color: var(--on-navy-2); }
.page-hero .crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.page-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(159,176,211,.14) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent 40%, #000); -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000); pointer-events: none; }
.page-hero > * { position: relative; z-index: 1; }

/* prose */
.prose { max-width: 70ch; display: grid; gap: 18px; }
.prose h2 { font-size: var(--t-xl); margin-top: 18px; }
.prose h3 { margin-top: 8px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.prose img { border-radius: var(--r-md); }
.split { display: grid; gap: clamp(28px, 5vw, 64px); }
@media (min-width: 900px) { .split { grid-template-columns: 4fr 8fr; } .split--even { grid-template-columns: 1fr 1fr; } }
.split > * { min-width: 0; }
.sticky-side { position: sticky; top: calc(var(--nav-h) + 24px); align-self: start; }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--white); }
.panel--mist { background: var(--mist); border-color: transparent; }
.dl { display: grid; gap: 14px; margin: 0; }
.dl dt { font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); }
.dl dd { margin: 2px 0 0; font-weight: 600; word-break: break-word; }
.toc { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; }
.toc a { display: block; padding: 8px 12px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-size: var(--t-sm); font-weight: 600; }
.toc a:hover { background: var(--mist); color: var(--ink); }
.svc-detail { padding-block: 40px; border-top: 1px solid var(--line); display: grid; gap: 22px; scroll-margin-top: calc(var(--nav-h) + 16px); }
.svc-detail:first-child { border-top: 0; padding-top: 0; }
.cols-2 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.cols-2 h4 { font-size: var(--t-sm); margin-bottom: 10px; }
.mini-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: var(--t-sm); color: var(--ink-2); }
.mini-list li { padding-left: 18px; position: relative; }
.mini-list li::before { content: ""; position: absolute; left: 0; top: .65em; width: 7px; height: 7px; border-radius: 2px; background: var(--cyan); }
.value-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.value-grid > div { background: var(--white); padding: 26px; display: grid; gap: 8px; align-content: start; }
.value-grid p { color: var(--ink-2); font-size: var(--t-sm); }
.statement { font-size: var(--t-xl); line-height: 1.35; font-weight: 700; letter-spacing: -.015em; max-width: 34ch; }
.module { display: grid; grid-template-columns: 44px 1fr; gap: 4px 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.module b { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #EEF3FE; color: var(--blue); font-family: var(--mono); font-size: .8rem; }
.module p { color: var(--ink-2); font-size: var(--t-sm); }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.form__row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { font-size: var(--t-sm); font-weight: 700; }
.field label .opt { font-weight: 500; color: var(--ink-2); }
.input, .select, .textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--white); color: var(--ink); font: 500 1rem/1.4 var(--font); transition: border-color .2s, box-shadow .2s; }
.textarea { min-height: 140px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,.14); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.field__err { font-size: var(--t-xs); color: var(--danger); font-weight: 600; min-height: 0; }
.field__hint { font-size: var(--t-xs); color: var(--ink-2); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 14px 16px; border-radius: 10px; font-size: var(--t-sm); font-weight: 600; border: 1px solid; }
.alert--ok { background: #E8F7F1; border-color: #BFE8D7; color: #0B6B4B; }
.alert--err { background: #FDECEC; border-color: #F5C2C2; color: #A12626; }
.ref { font-family: var(--mono); font-weight: 700; font-size: 1.15rem; color: var(--navy); background: var(--mist); padding: 6px 12px; border-radius: 8px; display: inline-block; margin-top: 6px; }
.contact-list { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.contact-list li { display: grid; grid-template-columns: 44px 1fr; gap: 2px 14px; }
.contact-list svg { grid-row: span 2; width: 44px; height: 44px; padding: 11px; border-radius: 12px; background: #EEF3FE; color: var(--blue); }
.contact-list small { color: var(--ink-2); font-size: var(--t-xs); font-weight: 700; }
.contact-list a, .contact-list span { font-weight: 700; color: var(--ink); text-decoration: none; word-break: break-word; }

/* ---------- blog ---------- */
.post-card { display: flex; flex-direction: column; gap: 10px; padding: 26px; border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.post-card:hover { border-color: #C8D6F3; box-shadow: var(--shadow); color: var(--ink); }
.post-card time { font-size: var(--t-xs); color: var(--ink-2); font-weight: 600; }
.post-card p { color: var(--ink-2); font-size: var(--t-sm); }

/* ---------- footer ---------- */
.footer { background: var(--navy); color: var(--on-navy-2); padding-block: 72px calc(28px + env(safe-area-inset-bottom, 0px)); font-size: var(--t-sm); }
.footer__grid { display: grid; gap: 40px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.footer__about { display: grid; gap: 16px; align-content: start; }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 2fr 1fr 1.3fr 1.5fr; } }
.footer h4 { color: var(--white); font-size: var(--t-sm); margin-bottom: 14px; letter-spacing: 0; }
.footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.footer a { color: var(--on-navy-2); text-decoration: none; }
.footer a:hover { color: var(--white); }
.footer__base { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--navy-line); display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.footer__base ul { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--navy-line); }
.socials svg { width: 18px; height: 18px; }

/* ---------- floating actions + toast ---------- */
.floaters { position: fixed; right: max(18px, calc(env(safe-area-inset-right, 0px) + 12px)); bottom: max(18px, calc(env(safe-area-inset-bottom, 0px) + 12px)); z-index: 40; display: grid; gap: 10px; justify-items: end; }
.fab { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; box-shadow: 0 10px 24px -8px rgba(16,28,53,.45); transition: transform .2s, opacity .25s; text-decoration: none; }
.fab svg { width: 26px; height: 26px; }
.fab--wa { background: #25D366; color: #fff; }
.fab--wa:hover { color: #fff; transform: scale(1.06); }
.fab--top { width: 44px; height: 44px; background: var(--white); color: var(--navy); border: 1px solid var(--line); opacity: 0; pointer-events: none; transform: translateY(8px); }
.fab--top.show { opacity: 1; pointer-events: auto; transform: none; }
.fab--top svg { width: 20px; height: 20px; }
.toast { position: fixed; left: 50%; bottom: max(24px, calc(env(safe-area-inset-bottom, 0px) + 16px)); transform: translate(-50%, 20px); z-index: 70; background: var(--navy); color: var(--white); padding: 12px 18px; border-radius: 12px; font-size: var(--t-sm); font-weight: 600; box-shadow: var(--shadow); opacity: 0; transition: opacity .25s, transform .25s; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast--err { background: var(--danger); }

/* reveal: visible at rest, nudged in when JS is ready */
.js .reveal { transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.pre { opacity: 0; transform: translateY(18px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal.pre { opacity: 1; transform: none; }
}
