/* =========================================================
   Mohamed Hijazi — portfolio
   Fonts bundled locally (Inter, Instrument Serif, JetBrains Mono, all SIL OFL)
   ========================================================= */

@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root,
:root[data-theme="light"] .contact__card {
  --bg: #0b0c0e;
  --bg-2: #111316;
  --bg-3: #171a1e;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.14);
  --text: #ecebe7;
  --muted: #9a9b9f;
  --dim: #66686d;
  --about-text: #cfcdc8;
  --blue: #7aa7ff;
  --green: #6fd6a0;
  --amber: #f1c062;
  --red: #ff8a7a;
  --wash: rgba(255,255,255,.06);
  --wash-2: rgba(255,255,255,.12);
  --nav-bg: rgba(11,12,14,.78);
  --nav-solid: rgba(11,12,14,.97);
  --glass: rgba(11,12,14,.72);
  --phbar-bg: rgba(23,26,30,.92);
  --shadow: rgba(0,0,0,.4);
  --logo-filter: brightness(0) invert(1);
  --portrait-base: linear-gradient(160deg, #1d2025, #121417 70%);
  /* product mockups */
  --mock-bg: #121418;
  --mock-bar: #15181c;
  --mock-card: #181b20;
  --mock-chip: #22262c;
  --mock-dot: #2a2e34;
  --mock-col: linear-gradient(180deg, #3a3f47, #2a2e34);
}
:root {
  /* Accent: warm gold (default dark theme) */
  --accent: #e9b464;
  --accent-rgb: 233 180 100;
  --accent-text: #e9b464;
  --accent-hover: #f3c47c;
  --accent-deep: #b98a45;
  --accent-ink: #1a1307;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 5vw, 48px);
  --radius: 18px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

/* Light theme: <html data-theme="light">. Keeps the original site's teal (#17bed2).
   The contact card stays dark for contrast. */
:root[data-theme="light"] {
  --bg: #fbfbfc;
  --bg-2: #f1f4f6;
  --bg-3: #ffffff;
  --line: rgba(17,24,39,.09);
  --line-2: rgba(17,24,39,.16);
  --text: #111827;
  --muted: #515769;
  --dim: #868b99;
  --about-text: #2f3442;
  --wash: rgba(17,24,39,.04);
  --wash-2: rgba(17,24,39,.08);
  --nav-bg: rgba(251,251,252,.8);
  --nav-solid: rgba(251,251,252,.98);
  --glass: rgba(255,255,255,.78);
  --phbar-bg: rgba(255,255,255,.94);
  --shadow: rgba(17,24,39,.14);
  --logo-filter: brightness(0);
  --portrait-base: linear-gradient(160deg, #eef3f5, #e3eaee 70%);
  --green: #12a36b;

  --accent: #17bed2;
  --accent-rgb: 23 190 210;
  --accent-text: #0a8a9a;
  --accent-hover: #3fcfe0;
  --accent-deep: #0e8fa0;
  --accent-ink: #032a30;
}
:root[data-theme="light"] .contact__card { --accent-text: #2fd0e3; color: var(--text); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
p { margin: 0; }
em { font-style: normal; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Serif accent used inside headings */
.hero__title em, .section__title em, .contact__title em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -.01em;
  color: var(--accent-text);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .85em 1.35em;
  border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; font-size: 15px; line-height: 1;
  border: 1px solid var(--accent);
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); background: var(--accent-hover); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--wash); border-color: var(--dim); }
.btn--sm { padding: .65em 1.1em; font-size: 14px; }
.btn--lg { padding: 1.05em 1.6em; font-size: 16px; }
.btn span { transition: transform .25s var(--ease); }
.btn:hover span { transform: translateX(3px); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -.01em; }
.brand__logo { display: block; width: 124px; height: auto; }
.brand__mark {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 11px;
  border: 1px solid var(--line-2);
  font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 19px;
  color: var(--accent-text);
}
.nav__links { display: flex; align-items: center; gap: 30px; font-size: 15px; }
.nav__links a:not(.btn) { color: var(--muted); transition: color .2s; position: relative; }
.nav__links a:not(.btn):hover, .nav__links a.is-active { color: var(--text); }
.nav__links a:not(.btn).is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--accent); }
.nav__toggle { display: none; }

@media (max-width: 820px) {
  .nav__toggle {
    display: grid; gap: 6px; place-content: center;
    width: 44px; height: 44px; border-radius: 12px;
    background: transparent; border: 1px solid var(--line-2); cursor: pointer;
  }
  .nav__toggle span { display: block; width: 18px; height: 1.5px; background: var(--text); transition: transform .3s var(--ease); }
  .nav.is-open .nav__toggle span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .nav__links {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--nav-solid);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity .25s, transform .25s var(--ease);
  }
  .nav.is-open { background: var(--nav-solid); }
  .nav.is-open .nav__links { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
  .nav__links a:not(.btn) { padding: 14px 0; font-size: 18px; border-bottom: 1px solid var(--line); color: var(--text); }
  .nav__links a.is-active::after { display: none; }
  .nav__links .btn { margin-top: 18px; justify-content: center; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 140px 0 72px; overflow: hidden; }
.hero__grid-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 10%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 10%, transparent 75%);
}
.hero > .wrap { position: relative; z-index: 1; }
.hero__grid-bg::before, .hero__grid-bg::after { content: ""; position: absolute; inset: 0; }
.hero__grid-bg::before {
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .55;
}
.hero__grid-bg::after {
  background-image:
    linear-gradient(var(--line-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle 190px at var(--grid-x, 50%) var(--grid-y, 35%), #000 10%, transparent 100%);
  mask-image: radial-gradient(circle 190px at var(--grid-x, 50%) var(--grid-y, 35%), #000 10%, transparent 100%);
  opacity: var(--grid-active, 0);
  transition: opacity .18s ease;
}
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .hero__grid-bg::after { display: none; }
}
.hero__inner { position: relative; display: grid; grid-template-columns: 1.6fr .8fr; gap: 48px; align-items: start; }
.eyebrow {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .02em; color: var(--muted);
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--wash);
}
.eyebrow .sep { color: var(--dim); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / .18); }
.hero__title {
  margin-top: 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 600;
}
.hero__title em { font-size: 1.06em; letter-spacing: -.02em; }
.hero__lede { margin-top: 28px; max-width: 560px; font-size: clamp(17px, 1.6vw, 19px); color: var(--muted); }
.hero__proof { margin-top: 16px; font-size: 15px; font-weight: 500; color: var(--text); }
.hero__cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

.portrait {
  position: relative;
  aspect-ratio: 342 / 470;
  border-radius: 28px;
  background:
    radial-gradient(120% 80% at 80% 15%, rgb(var(--accent-rgb) / .28), transparent 60%),
    var(--portrait-base);
  border: 1px solid var(--line);
  overflow: hidden;
  max-width: 420px; margin-left: auto;
}
.portrait__glow {
  position: absolute; inset: auto -20% -30% -20%; height: 60%;
  background: radial-gradient(closest-side, rgb(var(--accent-rgb) / .18), transparent);
}
.portrait img {
  position: absolute; right: 0; bottom: 0;
  height: 100%; width: auto; max-width: none;
  filter: grayscale(1) contrast(1.05);
}
.portrait__tag {
  position: absolute; left: 16px; bottom: 16px; right: 16px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 14px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line-2);
  font-size: 13.5px; line-height: 1.35;
}
.live { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(111,214,160,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(111,214,160,.55); } 70% { box-shadow: 0 0 0 10px rgba(111,214,160,0); } 100% { box-shadow: 0 0 0 0 rgba(111,214,160,0); } }

.stats {
  margin: 72px 0 0; display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.stat { padding: 28px 24px 4px 0; }
.stat + .stat { padding-left: 24px; border-left: 1px solid var(--line); }
.stat dt { font-size: 13.5px; color: var(--muted); order: 2; }
.stat dd { margin: 0 0 6px; font-size: clamp(36px, 4.2vw, 52px); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stat dd span { color: var(--accent-text); }
.stat__text { font-family: var(--serif); font-style: italic; font-weight: 400 !important; letter-spacing: -.01em !important; }

@media (max-width: 900px) {
  .hero { padding-top: 112px; }
  .hero__inner { grid-template-columns: 1fr; gap: 32px; }
  .hero__portrait { order: 0; }
  .portrait { max-width: 260px; margin: 0 auto; aspect-ratio: 1 / 1.1; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { grid-column: 1 / -1; padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stat { padding-bottom: 24px; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section__head { max-width: 780px; margin-bottom: clamp(36px, 5vw, 64px); }
.kicker {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
}
.section__title { font-size: clamp(34px, 4.6vw, 60px); letter-spacing: -.035em; line-height: 1.04; }
.section__intro { margin-top: 22px; font-size: 18px; color: var(--muted); max-width: 640px; }
.section__proof { margin-top: 16px; font-size: 16px; font-weight: 500; color: var(--text); }
.keep-together { white-space: nowrap; }
#work .section__title { text-wrap: balance; }

/* ---------- Case studies ---------- */
.case {
  display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(40px, 5vw, 64px) 0;
  border-top: 1px solid var(--line);
}
.case--flip .case__copy { order: 2; }
.case__meta { font-family: var(--mono); font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 12px; }
.case__num { color: var(--accent-text); }
.case__title { margin-top: 16px; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -.03em; }
.case__product { margin-top: 10px; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--muted); }
.case__copy > p:not(.case__meta):not(.case__product) { margin-top: 20px; color: var(--muted); }

@media (max-width: 900px) {
  .case { grid-template-columns: 1fr; }
  .case--flip .case__copy { order: 0; }
}
/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); }
.svc { padding: 32px 28px 8px 0; }
.svc + .svc { padding-left: 28px; border-left: 1px solid var(--line); }
.svc__n { font-family: var(--mono); font-size: 12.5px; color: var(--accent-text); }
.svc h3 { margin-top: 26px; min-height: 2.5em; font-size: 21px; line-height: 1.25; letter-spacing: -.02em; }
.svc p { margin-top: 14px; color: var(--muted); font-size: 15.5px; }
@media (max-width: 1000px) {
  .services { grid-template-columns: 1fr 1fr; }
  .svc:nth-child(3) { padding-left: 0; border-left: 0; }
  .svc:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 24px; }
}
@media (max-width: 600px) {
  .services { grid-template-columns: 1fr; }
  .svc, .svc + .svc { padding: 28px 0 4px; border-left: 0; }
  .svc + .svc { border-top: 1px solid var(--line); margin-top: 24px; }
  .svc h3 { min-height: 0; }
}
/* ---------- Approach ---------- */
.approach { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(40px, 7vw, 100px); align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 64px 1fr; padding: 26px 0; border-top: 1px solid var(--line); }
.steps li::before { content: "0" counter(s); grid-row: span 2; font-family: var(--mono); font-size: 13px; color: var(--accent-text); padding-top: 6px; }
.steps h3 { font-size: 22px; }
.steps p { margin-top: 8px; color: var(--muted); }
@media (max-width: 900px) {
  .approach { grid-template-columns: 1fr; }
}

/* ---------- About ---------- */
.about__intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: clamp(32px, 6vw, 80px); align-items: start; }
.about__portrait { margin: 38px 0 0; overflow: hidden; border-radius: 20px; }
.about__portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 40%; }
.about__body { max-width: 780px; display: grid; gap: 20px; font-size: clamp(18px, 1.8vw, 21px); line-height: 1.6; color: var(--about-text); }
.about__body .about__education { margin-top: 8px; font-size: 14px; color: var(--muted); }
@media (max-width: 820px) {
  .about__intro { grid-template-columns: minmax(0, 1fr); }
  .about__portrait { width: min(100%, 360px); margin-top: 0; justify-self: center; }
}

.origins { margin-top: clamp(56px, 8vw, 96px); }
.origins__label { font-family: var(--mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin-bottom: 22px; }
.origins__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.origin { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-3); border: 1px solid var(--line); transition: box-shadow .2s ease; }
.origin__figure { margin: 0; height: 100%; }
.origin__media { overflow: hidden; }
.origin img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .8s var(--ease); }
.origin--link:hover .origin__media > img, .origin--link:focus-visible .origin__media > img { transform: scale(1.04); }
.origin__media--ritzz { position: relative; aspect-ratio: 3 / 2; background: #000; }
.origin__media--ritzz > img { height: 100%; aspect-ratio: auto; object-position: left center; }
.origin__brand-panel { position: absolute; inset: 0; background: #000; clip-path: polygon(0 0, 100% 0, 100% 100%); pointer-events: none; }
.origin .origin__brand-panel img { position: absolute; top: 7%; right: 7%; width: 52.58%; height: auto; aspect-ratio: auto; object-fit: contain; filter: brightness(0) invert(1); transition: none; }
.origin--link { display: block; transition: border-color .2s ease, box-shadow .2s ease; }
.origin:hover { box-shadow: 0 0 0 1px var(--line); }
.origin--link:hover, .origin--link:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.origin figcaption { padding: 18px 20px 20px; display: grid; gap: 4px; }
.origin strong { font-weight: 600; }
.origin span { color: var(--muted); font-size: 14.5px; }
.origin__title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; min-height: 52px; }
.origin .origin__status { flex: 0 0 auto; font-size: 11px; }
.origin .origin__role { margin-top: 2px; color: var(--text); font-weight: 500; }
.origin__media--transport img { object-position: 62% center; }
.origin__credit { margin-top: 8px; color: var(--muted); font-size: 12px; }
.origin__credit a { text-decoration: underline; text-underline-offset: 3px; }
.origin__credit a:hover { color: var(--accent-text); }
@media (max-width: 1000px) {
  .origins__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .origins__grid > .origin:last-child { grid-column: 1 / -1; width: calc((100% - 16px) / 2); justify-self: center; }
}
@media (max-width: 620px) {
  .origins__grid { grid-template-columns: minmax(0, 1fr); }
  .origins__grid > .origin:last-child { grid-column: auto; width: auto; justify-self: stretch; }
  .origin__title { min-height: 0; flex-wrap: wrap; row-gap: 4px; }
}

/* ---------- Contact ---------- */
.contact { padding: clamp(72px, 9vw, 120px) 0; }
.contact__card {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(230px, .8fr); gap: clamp(32px, 4vw, 64px); align-items: end;
  padding: clamp(32px, 6vw, 80px);
  border-radius: 28px;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(80% 120% at 100% 0%, rgb(var(--accent-rgb) / .2), transparent 55%),
    radial-gradient(60% 80% at 0% 100%, rgba(122,167,255,.08), transparent 60%),
    var(--bg-2);
}
.contact__title { font-size: clamp(38px, 6vw, 80px); letter-spacing: -.045em; line-height: 1; max-width: 900px; }
.contact__lede { margin-top: 24px; max-width: 560px; color: var(--muted); font-size: 18px; }
.contact__cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.contact__details { display: grid; gap: 28px; min-width: 0; margin: 0 0 4px; }
.contact__details dt { margin-bottom: 6px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.contact__details dd { margin: 0; font-size: 17px; line-height: 1.5; }
.contact__details a { overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 5px; }
.contact__details a:hover { color: var(--accent-text); }
@media (max-width: 1000px) {
  .contact__card { grid-template-columns: minmax(0, 1fr); }
  .contact__details { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 28px; border-top: 1px solid var(--line-2); }
}
@media (max-width: 600px) {
  .contact__card { padding: 32px 24px; gap: 32px; }
  .contact__title { font-size: clamp(34px, 8.8vw, 48px); }
  .contact__lede { font-size: 17px; }
  .contact__details { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
.contact__links { list-style: none; margin: 40px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 28px; }
.contact__links a { color: var(--muted); font-size: 15px; transition: color .2s; }
.contact__links a:hover { color: var(--text); }
.contact__links a::after { content: " ↗"; color: var(--accent-text); }

/* ---------- Footer ---------- */
.footer { width: calc(100% - var(--gutter) * 2); max-width: 960px; margin: 0 auto; padding: 28px 0 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.footer__identity { display: grid; gap: 8px; }
.footer__wordmark { display: block; width: 140px; height: auto; }
.footer__location { font-size: 13px; }
.footer__meta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.footer__top { color: var(--text); font-size: 14px; }
.footer__top:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 620px) {
  .footer { padding: 24px 0 28px; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .footer__meta { width: 100%; justify-content: space-between; gap: 12px; font-size: 12px; }
  .footer__top { font-size: 13px; }
}

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .live { animation: none; }
  .origin img, .btn { transition: none; }
}

@media print {
  .nav { display: none; }
  body { background: #fff; color: #000; }
}
/* ---------- Workflow illustrations ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
section[id] { scroll-margin-top: 92px; }
.case__visual { margin: 0; }
.workflow {
  padding: clamp(24px, 3vw, 40px);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.12);
  background: #11171c;
  color: #eceff1;
}
.workflow__eyebrow, .process__eyebrow {
  font-family: var(--mono); font-size: 11px; line-height: 1.6;
  letter-spacing: .08em; text-transform: uppercase;
}
.workflow__eyebrow { color: #6dd7e2; }
.workflow__heading { margin-top: 12px; font-size: clamp(21px, 2.5vw, 29px); font-weight: 500; letter-spacing: -.025em; line-height: 1.2; }
.workflow__grid { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.workflow__grid li { padding: 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.025); }
.workflow__index { display: block; margin-bottom: 20px; font-family: var(--mono); font-size: 11px; color: #6dd7e2; }
.workflow__grid h4 { font-size: 16px; font-weight: 500; line-height: 1.3; }
.workflow__grid p { margin-top: 7px; font-size: 13px; color: #b1bbc4; line-height: 1.5; }
.workflow__summary { margin-top: 24px; color: #c4cbd1; font-size: 14px; line-height: 1.6; }
.workflow figcaption { margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); color: #a4aeb8; font-size: 11px; }
.process {
  position: sticky; top: 110px; margin: 0;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--line-2); border-radius: 20px;
  background: var(--bg-2);
}
.process__eyebrow { color: var(--accent-text); }
.process > h3 { margin-top: 16px; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.035em; }
.process__path { list-style: none; margin: 36px 0 0; padding: 0; }
.process__path li { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 16px; padding-bottom: 32px; }
.process__path li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; border-left: 1px solid var(--line-2); }
.process__path li:last-child { padding-bottom: 0; }
.process__number { display: grid; place-items: center; height: 36px; border: 1px solid var(--line-2); border-radius: 50%; font: 11px var(--mono); color: var(--accent-text); background: var(--bg); }
.process__path h4 { margin-top: 6px; font-size: 18px; line-height: 1.3; }
.process__path p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.process__note { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line-2); font-size: 15px; line-height: 1.7; }
.process figcaption { margin-top: 20px; font-size: 12px; color: var(--muted); }
.contact__title { max-width: 880px; }
@media (max-width: 900px) {
  .hero__portrait { order: 0; }
  .process { position: static; max-width: 560px; }
}
@media (max-width: 420px) {
  .workflow__grid { gap: 10px; }
  .workflow__grid li { padding: 14px 12px; }
  .workflow__grid h4 { font-size: 15px; }
  .workflow__grid p { font-size: 12px; }
  .workflow__index { margin-bottom: 14px; }
  .steps li { grid-template-columns: 42px 1fr; }
}
@media print {
  .js .reveal { opacity: 1; transform: none; }
  .process { position: static; }
}

@media (max-width: 360px) {
  .workflow__grid { grid-template-columns: 1fr; }
  .workflow__index { margin-bottom: 8px; }
}

/* ---------- Connected shipment workflow ---------- */
#freight-forwarding { scroll-margin-top: 92px; }
.shipment-route { width: 100%; max-width: 260px; margin: 20px auto 0; }
.shipment-route svg { display: block; width: 100%; height: auto; }
.shipment-flow { list-style: none; padding: 0; margin: 30px 0 0; }
.shipment-flow li { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: 18px; padding-bottom: 23px; }
.shipment-flow li:last-child { padding-bottom: 0; }
.shipment-flow li:not(:last-child)::after { content: ""; position: absolute; left: 16px; top: 34px; bottom: 0; border-left: 1px solid #36545d; }
.shipment-flow__number { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #47727b; border-radius: 50%; background: #17262d; color: #8ce0e8; font: 10px var(--mono); }
.shipment-flow h4 { margin-top: 1px; font-size: 15px; font-weight: 500; line-height: 1.4; letter-spacing: -.015em; }
.shipment-flow p { margin-top: 4px; color: #b1bbc4; font-size: 13px; line-height: 1.5; }
.shipment-record { margin-top: 28px; padding: 17px 18px; border: 1px solid #334b54; border-radius: 10px; background: #17262d; }
.shipment-record strong { display: block; font-size: 14px; font-weight: 500; color: #e2eff1; }
.shipment-record p { margin-top: 5px; font-size: 13px; line-height: 1.6; color: #b8cbd0; }
@media (max-width: 420px) {
  .shipment-flow li { column-gap: 14px; padding-bottom: 22px; }
  .shipment-flow li:last-child { padding-bottom: 0; }
  .shipment-flow h4 { font-size: 14px; }
  .shipment-flow p { font-size: 13px; }
  .shipment-record { padding: 15px; }
}
@media (max-width: 480px) {
    .shipment-route { max-width: 210px; margin-top: 16px; }
}

/* ---------- Connected school and hotel records ---------- */
#school-management, #hotel-management { scroll-margin-top: 92px; }
.record-workflow .workflow__heading { margin-top: 0; max-width: 390px; line-height: 1.15; }
.record-map { margin-top: 30px; }
.record-nodes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.record-nodes li { min-width: 0; padding: 18px 16px; border: 1px solid #344650; border-radius: 10px; background: #161f26; }
.record-nodes h4 { font-size: 14px; line-height: 1.35; font-weight: 500; letter-spacing: -.015em; color: #e5ecef; }
.record-nodes p { margin-top: 6px; color: #b1bec6; font-size: 13px; line-height: 1.5; }
.record-bridge { display: block; width: 100%; height: 32px; overflow: visible; }
.record-bridge path { fill: none; stroke: #4b727d; stroke-width: 1; vector-effect: non-scaling-stroke; }
.record-core { display: flex; align-items: center; justify-content: center; gap: 12px; width: min(100%, 216px); min-height: 62px; margin: 0 auto; padding: 16px 20px; border: 1px solid #659ca7; border-radius: 12px; background: #1a3038; box-shadow: 0 0 34px -16px rgba(109,215,226,.2); }
.record-core strong { font-size: 16px; font-weight: 500; letter-spacing: -.02em; }
.record-core__dot { flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: #8bdae3; box-shadow: 0 0 0 5px rgba(139,218,227,.09); }
.record-output { position: relative; display: flex; gap: 14px; align-items: center; margin-top: 28px; padding: 17px 16px; border: 1px solid #334b54; border-radius: 10px; background: #17262d; }
.record-output::before { content: ""; position: absolute; left: 50%; bottom: 100%; height: 29px; border-left: 1px solid #4b727d; }
.record-output__icon { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border: 1px solid #45616c; border-radius: 8px; color: #a2d1d9; }
.record-output__icon svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.2; }
.record-output strong { display: block; font-size: 13px; font-weight: 500; color: #e2eff1; }
.record-output p { margin-top: 4px; color: #b8cbd0; font-size: 13px; line-height: 1.5; }
@media (max-width: 420px) {
  .record-nodes { gap: 12px; }
  .record-nodes li { padding: 16px 12px; }
  .record-nodes h4 { font-size: 13px; }
  .record-core { min-height: 56px; max-width: 186px; padding: 14px; }
  .record-output { padding: 15px 12px; gap: 12px; }
}

.record-map > .record-nodes:last-child { position: relative; }
.record-map > .record-nodes:last-child::after { content: ""; position: absolute; left: 50%; top: -1px; bottom: -29px; border-left: 1px solid #4b727d; }
@media (max-width: 360px) {
  .record-nodes li { padding: 14px 10px; }
  .record-nodes h4 { font-size: 12px; }
}

/* START approach revision 20261030-042950-approach-vertical */
#approach .approach-plan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(48px, 7vw, 100px); align-items: start; }
#approach .approach-plan__head { max-width: none; margin-bottom: 0; }
#approach .approach-plan__head .section__title { max-width: 540px; text-wrap: balance; }
#approach .approach-plan__head .section__intro { max-width: 500px; }
#approach .approach-stages { display: grid; grid-template-columns: minmax(0, 1fr); list-style: none; margin: 0; padding: 0; }
#approach .approach-stage { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 24px; padding-bottom: 30px; min-width: 0; }
#approach .approach-stage:last-child { padding-bottom: 0; }
#approach .approach-stage:not(:last-child)::after { content: ""; position: absolute; left: 17.5px; top: 36px; bottom: 0; width: 1px; background: var(--line-2); }
#approach .approach-stage__number { position: relative; z-index: 1; display: grid; place-items: center; grid-row: span 2; width: 36px; height: 36px; border: 1px solid #a2cbd1; border-radius: 50%; background: var(--bg); color: #087987; font: 12px var(--mono); }
#approach .approach-stage h3 { margin: 5px 0 0; font-size: 21px; font-weight: 600; line-height: 1.25; letter-spacing: -.025em; }
#approach .approach-stage p { grid-column: 2; margin-top: 8px; color: var(--muted); font-size: 16px; line-height: 1.65; }
@media (max-width: 900px) {
  #approach .approach-plan { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  #approach .approach-plan__head .section__title { max-width: 700px; }
  #approach .approach-plan__head .section__intro { max-width: 650px; }
  #approach .approach-stage { column-gap: 20px; }
}
/* END approach revision 20261030-042950-approach-vertical */

/* START sales-inventory revision 20261030-045255-sales-flow-fix */
#sales-inventory { scroll-margin-top: 92px; }
#sales-inventory .workflow__heading { margin-top: 0; line-height: 1.15; }
#sales-inventory .commerce-map { position: relative; margin-top: 30px; }
#sales-inventory .commerce-cycle { --cycle-gap: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(112px, auto)); gap: 52px var(--cycle-gap); list-style: none; padding: 0; margin: 0; }
#sales-inventory .commerce-cycle li { position: relative; min-width: 0; padding: 18px 16px; border: 0; border-radius: 10px; background: #161f26; box-shadow: inset 0 0 0 1px #344650; }
#sales-inventory .commerce-cycle li:nth-child(3) { grid-column: 2; grid-row: 2; }
#sales-inventory .commerce-cycle li:nth-child(4) { grid-column: 1; grid-row: 2; }
#sales-inventory .commerce-connector { position: absolute; display: block; overflow: visible; pointer-events: none; }
#sales-inventory .commerce-connector path { fill: none; stroke: #6b9da7; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
#sales-inventory .commerce-connector--right { left: 100%; top: 50%; width: var(--cycle-gap); height: 12px; transform: translateY(-50%); }
#sales-inventory .commerce-connector--down { left: 50%; top: 100%; width: 12px; height: 52px; transform: translateX(-50%); }
#sales-inventory .commerce-connector--left { right: 100%; top: 50%; width: var(--cycle-gap); height: 12px; transform: translateY(-50%); }
#sales-inventory .commerce-cycle__number { display: block; margin-bottom: 13px; color: #8bdae3; font: 10px var(--mono); }
#sales-inventory .commerce-cycle h4 { font-size: 16px; font-weight: 500; line-height: 1.3; letter-spacing: -.015em; }
#sales-inventory .commerce-cycle p { margin-top: 6px; color: #b1bec6; font-size: 13px; line-height: 1.5; }
#sales-inventory .commerce-summary { margin-top: 28px; padding: 18px; border: 1px solid #334b54; border-radius: 10px; background: #17262d; }
#sales-inventory .commerce-summary strong { display: block; font-size: 14px; font-weight: 500; color: #e2eff1; }
#sales-inventory .commerce-summary p { margin-top: 5px; color: #b8cbd0; font-size: 13px; line-height: 1.6; }
@media (max-width: 420px) {
  #sales-inventory .commerce-cycle { --cycle-gap: 28px; }
  #sales-inventory .commerce-cycle li { padding: 16px 12px; }
  #sales-inventory .commerce-summary { padding: 15px; }
}
/* END sales-inventory revision 20261030-045255-sales-flow-fix */

/* Narrow-screen diagram readability */
@media (max-width: 420px) {
  .record-nodes { gap: 12px; }
  .record-nodes li { padding: 16px 10px; }
  .record-nodes h4 { font-size: 14px; }
  #sales-inventory .commerce-cycle li { padding: 16px 10px; }
}
@media (max-width: 360px) {
  .workflow { padding: 24px 18px; }
  .record-nodes { gap: 10px; }
  .record-nodes li { padding: 14px 8px; }
  .record-nodes h4 { font-size: 13px; }
  #sales-inventory .commerce-cycle { --cycle-gap: 24px; }
  #sales-inventory .commerce-cycle li { padding: 14px 8px; }
}
