/*
 * ScaleUP design system v2
 * Semantic tokens follow the open-code theming approach popularized by shadcn/ui.
 * Components are custom WordPress markup, not shadcn React components.
 * Layer scale: header 40, mobile navigation 30, content 1.
 */

@font-face {
  font-family: "Sukhumvit ScaleUP";
  src: url("../fonts/sukhumvit/SukhumvitSet-Text.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sukhumvit ScaleUP";
  src: url("../fonts/sukhumvit/SukhumvitSet-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sukhumvit ScaleUP";
  src: url("../fonts/sukhumvit/SukhumvitSet-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sukhumvit ScaleUP";
  src: url("../fonts/sukhumvit/SukhumvitSet-Bold.ttf") format("truetype");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: #f3f2ef;
  --foreground: #171717;
  --card: #faf9f6;
  --card-foreground: #171717;
  --muted: #e8e6e1;
  --muted-foreground: #5c5b57;
  --primary: #d92d35;
  --primary-foreground: #fff9f7;
  --secondary: #252525;
  --secondary-foreground: #f7f6f2;
  --border: #cfcdc6;
  --ring: #d92d35;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shell: 1380px;
  --header-height: 88px;
  --font-sans: "Sukhumvit ScaleUP", "Sukhumvit Set", Sukhumvit, "Leelawadee UI", Tahoma, sans-serif;
  --ambient-primary: rgb(217 45 53 / .09);
  --ambient-neutral: rgb(23 23 23 / .055);
  --surface-noise-opacity: .026;
  --mouse-x: 50%;
  --mouse-y: 30%;
  --grid-line-color: rgba(23, 23, 23, 0.04);
  --spotlight-color: rgba(217, 45, 53, 0.12);
  --orb-gradient-1: radial-gradient(circle, rgba(217,45,53,0.18) 0%, rgba(217,45,53,0) 70%);
  --orb-gradient-2: radial-gradient(circle, rgba(99,102,241,0.14) 0%, rgba(99,102,241,0) 70%);
  --orb-gradient-3: radial-gradient(circle, rgba(16,185,129,0.12) 0%, rgba(16,185,129,0) 70%);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --background: #0d0f12;
  --foreground: #f3f4f6;
  --card: #14171d;
  --card-foreground: #f3f4f6;
  --muted: #1e232d;
  --muted-foreground: #9ca3af;
  --primary: #ef4444;
  --primary-foreground: #ffffff;
  --secondary: #27272a;
  --secondary-foreground: #f4f4f5;
  --border: #262c36;
  --ring: #f87171;
  --ambient-primary: rgba(239, 68, 68, 0.15);
  --ambient-neutral: rgba(255, 255, 255, 0.05);
  --surface-noise-opacity: .04;
  --grid-line-color: rgba(255, 255, 255, 0.035);
  --spotlight-color: rgba(239, 68, 68, 0.16);
  --orb-gradient-1: radial-gradient(circle, rgba(239,68,68,0.22) 0%, rgba(239,68,68,0) 70%);
  --orb-gradient-2: radial-gradient(circle, rgba(139,92,246,0.18) 0%, rgba(139,92,246,0) 70%);
  --orb-gradient-3: radial-gradient(circle, rgba(14,165,233,0.15) 0%, rgba(14,165,233,0) 70%);
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  position: relative;
  isolation: isolate;
  margin: 0;
  overflow-x: clip;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  transition: background-color 220ms ease, color 220ms ease;
}

/* Awwwards Architectural Grid & Ambient Background */
body::before {
  position: fixed;
  z-index: -3;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    /* Mouse Spotlight Radial Glow */
    radial-gradient(650px circle at var(--mouse-x) var(--mouse-y), var(--spotlight-color), transparent 80%),
    /* Aurora Mesh Blobs */
    radial-gradient(ellipse 65rem 48rem at 10% -10%, var(--ambient-primary), transparent 65%),
    radial-gradient(ellipse 55rem 60rem at 105% 35%, var(--ambient-neutral), transparent 70%),
    radial-gradient(ellipse 60rem 35rem at 50% 105%, color-mix(in srgb, var(--primary) 6%, transparent), transparent 75%),
    /* Vector Cyber Grid Lines & Crosshairs SVG */
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="%23888888" stroke-width="0.5" stroke-opacity="0.08"/><circle cx="60" cy="0" r="1.5" fill="%23888888" fill-opacity="0.15"/><circle cx="0" cy="60" r="1.5" fill="%23888888" fill-opacity="0.15"/></svg>');
}

/* Surface Texture Noise & Grid Accents */
body::after {
  position: fixed;
  z-index: -2;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image: url("../images/surface-noise.png");
  background-size: 112px 112px;
  mix-blend-mode: overlay;
  opacity: var(--surface-noise-opacity);
}

/* Global Graphic Layer Container for 3D Orbs & Decorative Motifs */
.ambient-graphics-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(65px);
  opacity: 0.85;
  animation: orbFloat 18s ease-in-out infinite alternate;
  will-change: transform;
}

.ambient-orb--1 {
  top: 8%;
  left: -5%;
  width: 480px;
  height: 480px;
  background: var(--orb-gradient-1);
  animation-duration: 22s;
}

.ambient-orb--2 {
  top: 45%;
  right: -8%;
  width: 550px;
  height: 550px;
  background: var(--orb-gradient-2);
  animation-duration: 28s;
  animation-delay: -5s;
}

.ambient-orb--3 {
  bottom: 5%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: var(--orb-gradient-3);
  animation-duration: 25s;
  animation-delay: -10s;
}

@keyframes orbFloat {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(45px, -35px, 0) scale(1.08); }
  100% { transform: translate3d(-30px, 40px, 0) scale(0.95); }
}

/* Awwwards Glassmorphic Card & Accent Utilities */
.glass-card {
  background: color-mix(in srgb, var(--card) 82%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
}

:root[data-theme="dark"] .glass-card {
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.14), 0 0 25px color-mix(in srgb, var(--primary) 12%, transparent);
}

/* Decorative Tech Accents: Corners & Lines */
.graphic-corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--primary);
  border-style: solid;
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.graphic-corner--tl { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.graphic-corner--tr { top: -1px; right: -1px; border-width: 2px 2px 0 0; }
.graphic-corner--bl { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; }
.graphic-corner--br { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-sans);
}

html:lang(th) body :is(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6
) {
  line-height: 1.38em !important;
  padding-top: 0.06em;
}

html:lang(th) body :is(
  p,
  li,
  a,
  button,
  label,
  input,
  textarea,
  select,
  option,
  blockquote,
  figcaption,
  summary,
  legend,
  dt,
  dd,
  th,
  td
) {
  line-height: 1.62em !important;
}

body.menu-is-open {
  overflow: hidden;
}

body.menu-is-open .site-header__inner,
body.menu-is-open .site-header.is-scrolled .site-header__inner {
  background: color-mix(in srgb, var(--background) 96%, transparent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 4px;
}

.shell {
  width: min(calc(100% - 64px), var(--shell));
  margin-inline: auto;
}

.screen-reader-text,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--foreground);
  color: var(--background);
}

.header-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 2px;
  pointer-events: none;
}

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  height: var(--header-height);
  padding: 10px 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.site-header__inner {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(calc(100% - 64px), var(--shell));
  height: 68px;
  gap: 28px;
  padding: 0 10px 0 8px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  pointer-events: auto;
  transition: width 420ms cubic-bezier(.16, 1, .3, 1), height 420ms cubic-bezier(.16, 1, .3, 1), background-color 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.site-header__inner > * {
  position: relative;
  z-index: 1;
}

.site-header.is-scrolled .site-header__inner {
  width: min(calc(100% - 32px), 1120px);
  height: 58px;
  border-color: rgb(255 255 255 / .48);
  background: linear-gradient(135deg, rgb(255 255 255 / .42), rgb(255 255 255 / .16)), rgb(244 244 241 / .62);
  backdrop-filter: blur(24px) saturate(180%) contrast(1.04);
  -webkit-backdrop-filter: blur(24px) saturate(180%) contrast(1.04);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .64), inset 0 -1px 0 rgb(255 255 255 / .18), 0 18px 48px rgb(38 34 31 / .14);
}

.site-header.is-scrolled .site-header__inner::before {
  position: absolute;
  z-index: 0;
  inset: -22px 18% auto;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(217 45 53 / .18), rgb(240 178 62 / .18), rgb(88 157 204 / .22), rgb(217 45 53 / .12));
  filter: blur(12px);
  content: "";
  pointer-events: none;
}

.site-header.is-scrolled .site-header__inner::after {
  position: absolute;
  z-index: 0;
  inset: 1px;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

[data-theme="dark"] .site-header.is-scrolled .site-header__inner {
  border-color: rgb(255 255 255 / .16);
  background: linear-gradient(135deg, rgb(255 255 255 / .14), rgb(255 255 255 / .04)), rgb(23 23 23 / .68);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .2), 0 18px 52px rgb(0 0 0 / .34);
}

body.admin-bar .site-header {
  top: 32px;
}

.site-brand,
.site-brand a,
.custom-logo-link {
  display: flex;
  align-items: center;
}

.site-brand img,
.custom-logo {
  width: auto;
  height: 48px;
  object-fit: contain;
}

.primary-navigation {
  justify-self: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 34px);
  padding: 0;
  margin: 0;
  list-style: none;
}

.nav-links a {
  position: relative;
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  background: var(--primary);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms cubic-bezier(.16, 1, .3, 1);
}

.nav-links a:hover,
.nav-links .current-menu-item > a {
  color: var(--foreground);
}

.nav-links a:hover::after,
.nav-links .current-menu-item > a::after {
  transform: scaleX(1);
  transform-origin: left;
}

.site-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.theme-toggle:hover {
  background: var(--muted);
}

.theme-toggle:active,
.button:active {
  transform: translateY(1px) scale(.985);
}

.theme-toggle__icon {
  position: relative;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

[data-theme="dark"] .theme-toggle__icon {
  border-radius: 50% 0 50% 50%;
  transform: rotate(-35deg);
}

.menu-toggle {
  display: none;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button--compact {
  min-height: 42px;
  padding-inline: 18px;
}

.button--primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.button--primary:hover {
  background: color-mix(in srgb, var(--primary) 88%, var(--foreground));
}

.button--secondary {
  border-color: var(--border);
  background: transparent;
  color: var(--foreground);
}

.button--secondary:hover {
  border-color: var(--foreground);
  background: var(--muted);
}

.button--light {
  background: #f7f6f2;
  color: #181818;
}

.button--light:hover {
  background: #deddd8;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid currentColor;
  font-weight: 700;
  text-decoration: none;
  transition: gap 180ms ease, color 180ms ease;
}

.text-link:hover {
  gap: 13px;
  color: var(--primary);
}

.home-hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100dvh - var(--header-height));
  display: grid;
  align-items: center;
  padding: clamp(40px, 6vh, 72px) 0;
}

.home-hero::before {
  position: absolute;
  z-index: -1;
  top: 6%;
  left: clamp(-180px, -8vw, -80px);
  width: clamp(260px, 34vw, 560px);
  aspect-ratio: 1;
  border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
  border-radius: 50%;
  content: "";
  opacity: .72;
}

.home-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, .87fr) minmax(440px, 1.13fr);
  align-items: center;
  gap: clamp(44px, 7vw, 112px);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 24px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  color: var(--foreground);
  font-size: clamp(48px, 6.4vw, 94px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .98;
}

.hero-copy h1 span {
  color: var(--primary);
}

.hero-summary {
  max-width: 510px;
  margin: 30px 0;
  color: var(--muted-foreground);
  font-size: clamp(18px, 1.55vw, 23px);
  line-height: 1.55;
}

.hero-media {
  position: relative;
  min-height: min(70vh, 720px);
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--muted);
  clip-path: inset(0 0 0 0);
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: min(70vh, 720px);
  object-fit: cover;
  object-position: 58% center;
}

.hero-media__line {
  position: absolute;
  top: 0;
  right: clamp(18px, 3vw, 48px);
  width: clamp(6px, .7vw, 11px);
  height: 42%;
  background: var(--primary);
}

.positioning {
  padding: clamp(88px, 12vw, 180px) 0;
  border-top: 1px solid var(--border);
}

.positioning__grid {
  display: grid;
  grid-template-columns: .55fr 1.45fr .72fr;
  align-items: start;
  gap: clamp(28px, 5vw, 80px);
}

.positioning__grid > p,
.positioning__note p {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 15px;
}

.positioning h2 {
  margin: 0;
  font-size: clamp(34px, 4.4vw, 68px);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1.08;
}

.positioning__note {
  display: grid;
  gap: 28px;
}

.service-story {
  padding-top: clamp(72px, 10vw, 148px);
  border-top: 1px solid var(--border);
}

.service-story__intro {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  align-items: end;
  gap: 40px;
  padding-bottom: clamp(52px, 7vw, 100px);
}

.service-story__intro h2,
.portfolio-heading h2,
.disc-preview__copy h2 {
  margin: 0;
  font-size: clamp(46px, 6.2vw, 88px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .98;
}

.service-story__intro > p,
.portfolio-heading > p,
.disc-preview__copy > p {
  max-width: 480px;
  margin: 0;
  color: var(--muted-foreground);
  font-size: 18px;
}

.service-stack {
  position: relative;
}

.service-panel {
  position: sticky;
  top: var(--header-height);
  z-index: 1;
  min-height: calc(100dvh - var(--header-height));
  display: flex;
  align-items: center;
  padding: 34px 0;
  background: var(--background);
}

.service-panel:nth-child(2) { z-index: 2; }
.service-panel:nth-child(3) { z-index: 3; }
.service-panel:nth-child(4) { z-index: 4; }

.service-panel__inner {
  min-height: min(70vh, 720px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .65fr);
  align-items: end;
  gap: 48px;
  padding: clamp(42px, 7vw, 100px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  transform-origin: center top;
}

.service-panel--structure .service-panel__inner {
  background: color-mix(in srgb, var(--muted) 72%, var(--card));
}

.service-panel--synergy .service-panel__inner {
  border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
}

.service-panel--technology .service-panel__inner {
  background: color-mix(in srgb, var(--foreground) 5%, var(--card));
}

.service-panel__word {
  margin: 0 0 -.16em -.04em;
  color: color-mix(in srgb, var(--foreground) 9%, transparent);
  font-size: clamp(84px, 14vw, 215px);
  font-weight: 850;
  letter-spacing: -.08em;
  line-height: .72;
  white-space: nowrap;
}

.service-panel__copy {
  position: relative;
  z-index: 1;
  padding-bottom: 4px;
}

.service-panel__copy h3 {
  margin: 0 0 20px;
  font-size: clamp(32px, 3.5vw, 56px);
  letter-spacing: -.04em;
  line-height: 1.05;
}

.service-panel__copy p {
  margin: 0 0 28px;
  color: var(--muted-foreground);
  font-size: 18px;
}

.disc-preview {
  padding: clamp(100px, 13vw, 190px) 0;
  border-top: 1px solid var(--border);
}

.disc-preview__grid {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  align-items: center;
  gap: clamp(52px, 9vw, 150px);
}

.disc-preview__copy > p {
  margin-top: 28px;
}

.disc-preview__copy .button-row {
  margin-top: 34px;
}

.disc-tool {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
}

.disc-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}

.disc-tabs button {
  min-height: 112px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--muted-foreground);
  font-size: clamp(36px, 4vw, 64px);
  font-weight: 800;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease;
}

.disc-tabs button:last-child {
  border-right: 0;
}

.disc-tabs button[aria-selected="true"] {
  background: var(--primary);
  color: var(--primary-foreground);
}

.disc-panel {
  min-height: 320px;
  padding: clamp(36px, 6vw, 78px);
}

.disc-panel[hidden] {
  display: none;
}

.disc-panel p {
  margin: 0 0 34px;
  color: var(--primary);
  font-weight: 750;
}

.disc-panel h3 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(30px, 4vw, 56px);
  letter-spacing: -.035em;
  line-height: 1.15;
}

.portfolio-pan {
  min-height: 100dvh;
  padding: clamp(80px, 9vw, 126px) 0 70px;
  overflow: hidden;
  border-top: 1px solid var(--border);
  background: var(--muted);
}

.portfolio-heading {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  align-items: end;
  gap: 40px;
  margin-bottom: clamp(48px, 6vw, 78px);
}

.portfolio-track {
  width: max-content;
  display: flex;
  gap: clamp(20px, 2.2vw, 34px);
  padding: 0 32px 18px max(32px, calc((100vw - var(--shell)) / 2));
}

.portfolio-card {
  width: min(58vw, 760px);
  flex: 0 0 auto;
}

.portfolio-card a {
  display: block;
  text-decoration: none;
}

.portfolio-card__image {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--card);
}

.portfolio-card__image img {
  width: 100%;
  aspect-ratio: 1.99 / 1;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(.16, 1, .3, 1);
}

.portfolio-card a:hover img {
  transform: scale(1.025);
}

.portfolio-card__meta {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 20px;
  padding: 20px 4px 0;
}

.portfolio-card__meta h3 {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 36px);
  letter-spacing: -.03em;
}

.portfolio-card__meta p {
  margin: 0;
  color: var(--muted-foreground);
  grid-column: 1;
}

.portfolio-card__meta span {
  font-size: 28px;
  grid-column: 2;
  grid-row: 1 / 3;
}

.portfolio-carousel-toolbar {
  display: none;
}

.career-strip {
  padding: clamp(92px, 12vw, 168px) 0;
  border-top: 1px solid var(--border);
}

.career-strip__grid {
  display: grid;
  grid-template-columns: .45fr 1.25fr auto;
  align-items: center;
  gap: clamp(28px, 6vw, 90px);
}

.career-strip__grid > p {
  margin: 0;
  color: var(--muted-foreground);
}

.career-strip h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 58px);
  letter-spacing: -.04em;
  line-height: 1.1;
}

.final-cta {
  padding: 20px 0;
}

.final-cta__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 30px;
  padding: clamp(50px, 8vw, 110px);
  border-radius: var(--radius-lg);
  background: #c9252e;
  color: #fff9f7;
}

.final-cta h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(42px, 6vw, 86px);
  letter-spacing: -.055em;
  line-height: 1;
}

.final-cta p {
  max-width: 620px;
  margin: 24px 0 0;
  font-size: 18px;
  grid-column: 1;
}

.final-cta .button {
  grid-column: 2;
  grid-row: 1 / 3;
}

.site-footer {
  margin-top: 20px;
  padding: clamp(72px, 9vw, 124px) 0 28px;
  border-top: 1px solid var(--border);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr .65fr .65fr;
  gap: clamp(36px, 8vw, 120px);
}

.site-footer__brand img {
  width: auto;
  height: 50px;
}

.site-footer__brand p {
  max-width: 380px;
  margin: 24px 0 0;
  color: var(--muted-foreground);
}

.site-footer__nav {
  display: grid;
  align-content: start;
  gap: 12px;
}

.site-footer__nav a {
  color: var(--muted-foreground);
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: var(--primary);
}

.footer-heading {
  margin: 0 0 10px;
  font-weight: 800;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 48px;
  margin-top: 72px;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 13px;
}

.site-footer__bottom p {
  margin: 0;
}

.site-footer__bottom a {
  text-decoration: none;
}

@media (max-width: 1180px) {
  .site-header__inner {
    gap: 18px;
  }

  .nav-links {
    gap: 18px;
  }

  .nav-links a {
    font-size: 13px;
  }

  .home-hero__grid {
    grid-template-columns: .9fr 1.1fr;
    gap: 38px;
  }

  .hero-copy h1 {
    font-size: clamp(48px, 6vw, 72px);
  }
}

@media (max-width: 1023px) {
  :root {
    --header-height: 78px;
  }

  .site-header {
    padding: 7px 0;
  }

  .site-header__inner {
    grid-template-columns: auto 1fr auto;
    width: calc(100% - 24px);
    height: 64px;
    padding-inline: 8px;
    overflow: visible;
  }

  .site-header.is-scrolled .site-header__inner {
    width: calc(100% - 20px);
    height: 60px;
  }

  .menu-toggle {
    position: relative;
    display: grid;
    width: 44px;
    height: 44px;
    padding: 12px;
    justify-self: end;
    align-content: center;
    gap: 7px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--background) 74%, transparent);
    cursor: pointer;
  }

  .menu-toggle span[aria-hidden="true"] {
    width: 100%;
    height: 2px;
    background: var(--foreground);
    transition: transform 180ms ease;
  }

  .menu-toggle[aria-expanded="true"] span[aria-hidden="true"]:first-of-type {
    transform: translateY(4.5px) rotate(45deg);
  }

  .menu-toggle[aria-expanded="true"] span[aria-hidden="true"]:last-of-type {
    transform: translateY(-4.5px) rotate(-45deg);
  }

  .primary-navigation {
    position: fixed;
    z-index: 0;
    inset: 0;
    display: block;
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
    max-height: none;
    justify-self: stretch;
    padding:
      calc(var(--header-height) + max(26px, env(safe-area-inset-top)))
      max(28px, env(safe-area-inset-right))
      max(34px, env(safe-area-inset-bottom))
      max(28px, env(safe-area-inset-left));
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background:
      radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--primary) 13%, transparent), transparent 34%),
      color-mix(in srgb, var(--background) 91%, transparent);
    backdrop-filter: blur(30px) saturate(155%);
    -webkit-backdrop-filter: blur(30px) saturate(155%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-14px);
    transition: opacity 260ms ease, transform 420ms cubic-bezier(.16, 1, .3, 1), visibility 0s linear 420ms;
  }

  .primary-navigation.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    transition-delay: 0s;
  }

  .nav-links {
    display: grid;
    width: min(100%, 680px);
    min-height: calc(100dvh - var(--header-height) - 94px);
    align-content: center;
    gap: 0;
    margin-inline: auto;
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 260ms ease, transform 440ms cubic-bezier(.16, 1, .3, 1);
  }

  .primary-navigation.is-open .nav-links li {
    opacity: 1;
    transform: translateY(0);
  }

  .primary-navigation.is-open .nav-links li:nth-child(2) { transition-delay: 35ms; }
  .primary-navigation.is-open .nav-links li:nth-child(3) { transition-delay: 70ms; }
  .primary-navigation.is-open .nav-links li:nth-child(4) { transition-delay: 105ms; }
  .primary-navigation.is-open .nav-links li:nth-child(5) { transition-delay: 140ms; }
  .primary-navigation.is-open .nav-links li:nth-child(n+6) { transition-delay: 175ms; }

  .nav-links li:first-child {
    border-top: 1px solid var(--border);
  }

  .nav-links a {
    display: flex;
    min-height: 68px;
    align-items: center;
    padding: 14px 0;
    color: var(--foreground);
    font-size: clamp(27px, 6vw, 42px);
    letter-spacing: -.025em;
    line-height: 1.15;
  }

  .nav-links a::after {
    display: none;
  }

  .home-hero {
    min-height: auto;
    padding: 64px 0 76px;
  }

  .home-hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-copy {
    max-width: 760px;
  }

  .hero-media,
  .hero-media img {
    min-height: 58vw;
    max-height: 700px;
  }

  .positioning__grid {
    grid-template-columns: .55fr 1.45fr;
  }

  .positioning__note {
    grid-column: 2;
  }

  .service-panel {
    position: relative;
    top: auto;
    min-height: auto;
    padding: 18px 0;
  }

  .service-panel__inner {
    min-height: 580px;
  }

  .disc-preview__grid {
    grid-template-columns: 1fr;
  }

  .portfolio-pan {
    min-height: auto;
  }

  .portfolio-track {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .portfolio-track::-webkit-scrollbar {
    display: none;
  }

  .portfolio-card {
    width: min(78vw, 680px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .portfolio-carousel-toolbar {
    display: grid;
    grid-template-columns: auto minmax(80px, 1fr) auto;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
  }

  .portfolio-carousel-count {
    min-width: 58px;
    margin: 0;
    color: var(--muted-foreground);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
  }

  .portfolio-carousel-count [data-portfolio-current] {
    color: var(--foreground);
  }

  .portfolio-carousel-progress {
    height: 2px;
    overflow: hidden;
    background: color-mix(in srgb, var(--foreground) 16%, transparent);
  }

  .portfolio-carousel-progress span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transform: scaleX(calc(1 / 12));
    transform-origin: left;
    transition: transform 420ms cubic-bezier(.16, 1, .3, 1);
  }

  .portfolio-carousel-controls {
    display: flex;
    gap: 8px;
  }

  .portfolio-carousel-controls button {
    display: grid;
    width: 48px;
    height: 48px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--foreground);
    border-radius: 50%;
    background: transparent;
    color: var(--foreground);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease, opacity 180ms ease, transform 180ms ease;
  }

  .portfolio-carousel-controls button:not(:disabled):hover {
    background: var(--foreground);
    color: var(--background);
  }

  .portfolio-carousel-controls button:not(:disabled):active {
    transform: scale(.94);
  }

  .portfolio-carousel-controls button:disabled {
    opacity: .28;
    cursor: default;
  }

  .career-strip__grid {
    grid-template-columns: .45fr 1.2fr;
  }

  .career-strip .button {
    grid-column: 2;
    justify-self: start;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 74px;
  }

  .shell {
    width: min(calc(100% - 32px), var(--shell));
  }

  .site-header__inner {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  .site-brand img,
  .custom-logo {
    height: 42px;
  }

  .site-actions .button {
    display: none;
  }

  .theme-toggle {
    width: 38px;
    height: 38px;
  }

  .menu-toggle {
    grid-column: 3;
  }

  .site-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .home-hero {
    padding: 48px 0 56px;
  }

  .home-hero__grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .eyebrow {
    margin-bottom: 18px;
    font-size: 11px;
  }

  .hero-copy h1 {
    font-size: clamp(43px, 13vw, 64px);
    line-height: 1.03;
  }

  .hero-summary {
    margin: 22px 0 26px;
    font-size: 17px;
  }

  .button-row {
    width: 100%;
  }

  .button-row .button {
    flex: 1 1 auto;
  }

  .hero-media,
  .hero-media img {
    min-height: 112vw;
    max-height: none;
  }

  .hero-media img {
    object-position: 65% center;
  }

  .positioning {
    padding: 80px 0;
  }

  .positioning__grid,
  .service-story__intro,
  .disc-preview__grid,
  .portfolio-heading,
  .career-strip__grid,
  .final-cta__inner,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .positioning__grid {
    gap: 28px;
  }

  .positioning__note,
  .career-strip .button,
  .final-cta p,
  .final-cta .button {
    grid-column: 1;
  }

  .positioning h2 {
    font-size: 38px;
  }

  .service-story {
    padding-top: 78px;
  }

  .service-story__intro {
    align-items: start;
    gap: 26px;
    padding-bottom: 48px;
  }

  .service-story__intro h2,
  .portfolio-heading h2,
  .disc-preview__copy h2 {
    font-size: clamp(42px, 13vw, 62px);
  }

  .service-panel__inner {
    min-height: 520px;
    grid-template-columns: 1fr;
    align-content: space-between;
    gap: 40px;
    padding: 34px 26px;
  }

  .service-panel__word {
    margin: 0;
    font-size: clamp(66px, 23vw, 104px);
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .service-panel__copy h3 {
    font-size: 34px;
  }

  .service-panel__copy p {
    font-size: 16px;
  }

  .disc-preview {
    padding: 90px 0;
  }

  .disc-preview__grid {
    gap: 54px;
  }

  .disc-tabs button {
    min-height: 76px;
    font-size: 34px;
  }

  .disc-panel {
    min-height: 280px;
    padding: 30px 24px;
  }

  .disc-panel h3 {
    font-size: 31px;
  }

  .portfolio-pan {
    padding: 64px 0 40px;
    overflow: hidden !important;
  }

  .portfolio-heading {
    align-items: start;
    gap: 16px;
    margin-bottom: 32px;
  }

  .portfolio-heading p {
    display: none !important;
  }

  .portfolio-heading h2 {
    letter-spacing: -.035em;
    line-height: 1.3em !important;
    text-wrap: balance;
  }

  .portfolio-track {
    gap: 14px;
    padding: 0 16px 12px;
    scroll-padding-inline: 16px;
    box-sizing: border-box;
    max-width: 100vw;
  }

  .portfolio-card {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
  }

  .portfolio-card__image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    overflow: hidden;
    box-sizing: border-box;
  }

  .portfolio-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: auto;
  }

  .portfolio-card__meta {
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 3px 14px;
    min-height: 92px;
    padding: 17px 2px 0;
  }

  .portfolio-card__meta h3 {
    overflow: hidden;
    font-size: 24px;
    letter-spacing: -.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .portfolio-card__meta p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .portfolio-card__meta span {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 23px;
  }

  .portfolio-carousel-toolbar {
    grid-template-columns: auto 1fr;
    gap: 12px 18px;
    margin-top: 24px;
  }

  .portfolio-carousel-progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .portfolio-carousel-controls {
    justify-self: end;
  }

  .career-strip {
    padding: 82px 0;
  }

  .career-strip__grid {
    align-items: start;
    gap: 25px;
  }

  .career-strip h2 {
    font-size: 34px;
  }

  .final-cta__inner {
    align-items: start;
    gap: 22px;
    padding: 50px 28px;
  }

  .final-cta h2 {
    font-size: 46px;
  }

  .final-cta .button {
    grid-row: auto;
    justify-self: start;
  }

  .site-footer {
    padding-top: 76px;
  }

  .site-footer__grid {
    gap: 46px;
  }

  .site-footer__bottom {
    display: grid;
    margin-top: 56px;
  }
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }

  body.admin-bar .primary-navigation {
    padding-top: calc(var(--header-height) + 46px + max(26px, env(safe-area-inset-top)));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  body::after {
    display: none;
  }

  .site-header.is-scrolled .site-header__inner,
  .primary-navigation {
    background: var(--background);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
