/* Base variables */
:root {
	--bg: #ffffff;
	--bg-elev: #f8f9fb;
	--text: #0a0a0a;
	--muted: #646a76;
	--line: #e9ecf2;
	--accent: #ff7a00; /* Orange accent */
	--accent-2: #ffbc80; /* Softer orange (optional) */

	--radius: 14px;
	--shadow: 0 6px 28px rgba(10, 10, 10, .08);

	--container: clamp(16px, 6vw, 64px);
	--container-max: 1200px;
}

/* Reset */
* { box-sizing: border-box; }
html, body { height: 100%; overflow-x: hidden; }
html { scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 400 16px/1.6 Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: "Bebas Neue", Inter, system-ui, sans-serif; letter-spacing: 0.02em; text-transform: uppercase; }
h1, h2, h3, p { margin: 0 0 .75em; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.skip-link {
	position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus { left: var(--container); top: 12px; width: auto; height: auto; background: var(--bg-elev); padding: 8px 12px; border-radius: 8px; }

/* Layout utilities */
.container { padding-inline: var(--container); max-width: var(--container-max); margin-inline: auto; }
.container--xl { max-width: min(88vw, 1920px); }
.container--full { max-width: none; width: 100%; padding-inline: clamp(8px, 2vw, 24px); }
.container--xl { max-width: min(88vw, 1920px); }
.section { padding: clamp(48px, 10vw, 120px) 0; }
.section--tight { padding: clamp(16px, 4vw, 40px) 0; }
.section--no-pad-bottom { padding-bottom: 0; }
.section-head { max-width: 820px; }
.section-head h2 { font-size: clamp(28px, 5vw, 48px); }
.section-head p { color: var(--muted); }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: #111; border: 2px solid #111; color: #fff; transition: transform .2s ease, background .2s ease, color .2s ease; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: #0a0a0a; border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.03); }
.btn.ghost { background: transparent; color: #111; border-color: #111; }

/* Header */
.top-accent { height: 4px; background: var(--accent); }
.site-header {
	position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(140%) blur(10px);
	background: var(--bg);
	background: color-mix(in oklab, var(--bg) 92%, #fff 8%);
	border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-inner { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; height: 72px; }
.logo { font-weight: 800; letter-spacing: 0.06em; font-size: 22px; padding: 8px 0; font-family: "Bebas Neue", Inter, sans-serif; }

.site-nav ul { list-style: none; display: flex; gap: clamp(16px, 3vw, 28px); padding: 0; margin: 0; }
.site-nav a { color: #111; font-weight: 600; position: relative; }
.site-nav a::after { content:""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: transparent; transition: background .2s ease; }
.site-nav a:hover::after { background: var(--accent); }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; position: relative; }
.nav-toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text); transition: transform .25s ease, top .25s ease, opacity .25s ease; }
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 26px; }

/* Mobile nav */
@media (max-width: 860px) {
	.header-inner { grid-template-columns: auto 1fr auto; }
	.nav-toggle { display: inline-block; }
	.header-inner { height: 64px; }
	.site-nav { position: fixed; top: calc(64px + env(safe-area-inset-top, 0px)); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); transform-origin: top; transform: scaleY(0); transition: transform .25s ease; }
	.site-nav ul { flex-direction: column; gap: 0; }
	.site-nav li { border-top: 1px solid var(--line); }
	.site-nav a { display: block; padding: 18px var(--container); font-size: 18px; }
	.site-nav[data-open="true"] { transform: scaleY(1); }
	.nav-toggle[aria-expanded="true"] span:first-child { transform: rotate(45deg); top: 21px; }
	.nav-toggle[aria-expanded="true"] span:last-child { transform: rotate(-45deg); top: 21px; }
}

/* Hero */
.hero { position: relative; min-height: 86vh; display: grid; place-items: center; overflow: hidden; z-index: 2; }
.ln-hero { border-bottom: 1px solid var(--line); }
@supports (height: 100dvh) {
	.hero { min-height: 86dvh; }
}
.hero-inner { text-align: center; padding-bottom: clamp(40px, 8vw, 72px); position: relative; z-index: 2; }
.hero-bg-grid { position: absolute; inset: 0; background:
	repeating-linear-gradient(90deg, #f1f3f7 0 1px, transparent 1px 40px),
	repeating-linear-gradient(0deg, #f1f3f7 0 1px, transparent 1px 40px);
	mask: linear-gradient(180deg, #000 65%, transparent);
}
.mega { font-size: clamp(36px, 12vw, 160px); line-height: .86; font-weight: 800; color: #0a0a0a; text-transform: uppercase; text-wrap: balance; }
.mega.ln .line { display: block; }
.mega.ln .hl { box-shadow: inset 0 -0.4em 0 var(--accent); }
.lead { color: var(--muted); font-size: clamp(16px, 2.2vw, 20px); max-width: 780px; margin-inline: auto; }
.hero .cta { display: flex; gap: 12px; justify-content: center; margin-top: 16px; }

/* Ticker */
.ticker { position: absolute; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--line); background: #0b0b0b; overflow: hidden; }
.ticker--dark { background: #0b0b0b; color: var(--accent); }
.ticker--slow { position: static; }
.ticker__track { display: flex; gap: 28px; align-items: center; white-space: nowrap; padding: 12px 0; animation: tickerMove 40s linear infinite; }
.ticker span { color: var(--accent); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }
.tools .ticker__track { animation-duration: 65s; opacity: .95; }

@keyframes tickerMove {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

/* Scrolly (pinned showcase) */
.scrolly { position: relative; height: 300vh; border-bottom: 1px solid var(--line); z-index: 1; }
.scrolly .pin-wrap { position: sticky; top: 0; height: 100vh; overflow: clip; }
.frame { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: translateY(6vh) scale(.98); transition: opacity .6s ease, transform .6s ease; will-change: transform, opacity; }
.frame__media { position: absolute; inset: 0; }
.frame__media::after { content:""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.25) 30%, rgba(0,0,0,.45)); pointer-events: none; }
.frame__media img, .frame__media video, .frame__video { width: 100%; height: 100%; object-fit: cover; }
.frame__media img { transform: scale(1.08); will-change: transform; filter: saturate(1.02) contrast(1.02); }
.frame__copy { position: relative; z-index: 2; text-align: left; }
.frame__title { font-family: "Bebas Neue", Inter, sans-serif; font-size: clamp(36px, 9vw, 120px); line-height: .9; letter-spacing: .02em; color: #fff; text-transform: uppercase; }
.frame__lead { color: #f2f2f2; max-width: 58ch; font-size: clamp(16px, 2.1vw, 20px); }

/* Reduced motion: make scrolly static */
@media (prefers-reduced-motion: reduce) {
	.scrolly { height: auto; }
	.scrolly .pin-wrap { position: relative; height: auto; }
	.frame { position: relative; opacity: 1; transform: none; }
	.frame__media img { transform: none; }
}

@media (max-width: 420px) {
  .ticker__track { gap: 18px; padding: 10px 0; }
  .ticker span { font-size: 11px; letter-spacing: .1em; }
}

/* Work grid - organic masonry */
.work-grid { column-count: 3; column-gap: clamp(16px, 1.8vw, 28px); }
@media (max-width: 1100px) { .work-grid { column-count: 2; } }
@media (max-width: 680px) { .work-grid { column-count: 1; } }

@media (min-width: 1400px) {
	:root { --container-max: 1320px; }
	.work-grid { column-count: 4; }
}
@media (min-width: 2000px) {
	:root { --container-max: 1520px; }
	.work-grid { column-count: 5; }
}

.card { display: inline-block; width: 100%; margin: 0 0 clamp(16px, 1.8vw, 28px); border-radius: var(--radius); overflow: hidden; background: #fff; border: 2px solid #0a0a0a; position: relative; box-shadow: var(--shadow); isolation: isolate; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; break-inside: avoid; }
.card { -webkit-column-break-inside: avoid; page-break-inside: avoid; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 10px 28px rgba(0,0,0,.12); }
.card figure { margin: 0; position: relative; }

/* Aspect-ratio helpers for organic heights */
.ratio { position: relative; width: 100%; }
.ratio::before { content: ""; display: block; padding-top: var(--ratio, 75%); }
.ratio > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.02) contrast(1.02); }
.ratio-1x1 { --ratio: 100%; }
.ratio-4x5 { --ratio: 125%; }
.ratio-3x4 { --ratio: 133.3333%; }
.ratio-2x3 { --ratio: 150%; }
.ratio-16x9 { --ratio: 56.25%; }
.ratio-21x9 { --ratio: 42.8571%; }
.ratio-4x3 { --ratio: 75%; }
.ratio-3x2 { --ratio: 66.6667%; }
.ratio-5x2 { --ratio: 40%; }
.ratio-9x16 { --ratio: 177.7778%; }

.card__meta { position: relative; padding: 14px 16px 16px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.card__meta h3 { font-family: "Bebas Neue", Inter, sans-serif; font-size: clamp(20px, 3vw, 30px); line-height: 1; letter-spacing: .03em; }
.card__meta p { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }

/* Subtle organic staggering */
.work-grid .card:nth-child(6n+2) { transform: translateY(2px); }
.work-grid .card:nth-child(6n+4) { transform: translateY(-2px); }
@media (pointer: coarse) { .work-grid .card { transform: none !important; } }

/* Apple-like tiles grid (homepage selected work) */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(18px, 1.2vw, 28px); }
@media (max-width: 980px) { .tiles { grid-template-columns: 1fr; } }
.tile-card { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-elev); box-shadow: var(--shadow); }
.tile-card--dark { background: #000; color: #f5f7fa; border-color: rgba(255,255,255,.14); }
.tile-card .badge { position: absolute; top: 10px; left: 10px; z-index: 3; background: var(--accent); color: #0a0a0a; border-radius: 999px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; padding: 6px 10px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.tile-card--dark .badge { background: color-mix(in oklab, var(--accent) 85%, #fff 15%); }
.tile-card__media { position: relative; }
.tile-card__media::after { content:""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.55), transparent 35%, rgba(0,0,0,.35)); opacity: .8; mix-blend-mode: normal; display: none; }
.tile-card--dark .tile-card__media::after { display: block; }
.tile-card__media img, .tile-card__media video { width: 100%; height: 100%; object-fit: cover; }
.tile-card__copy { position: absolute; inset: 0; display: grid; place-items: start center; padding-top: clamp(18px, 3vw, 30px); text-align: center; pointer-events: none; }
.tile-card__copy h3 { font-family: "Bebas Neue", Inter, sans-serif; font-size: clamp(24px, 4.2vw, 44px); letter-spacing: .02em; margin: 0 0 6px; text-transform: uppercase; }
.tile-card__copy p { color: color-mix(in oklab, currentColor 70%, #8a8f98); margin: 0 0 12px; font-weight: 600; font-size: clamp(14px, 1.6vw, 18px); }
.tile-card .cta { display: inline-flex; gap: 10px; pointer-events: auto; }
.tile-card .btn { padding: 12px 16px; font-size: 15px; }
.tile-card--dark .btn.ghost { color: #fff; border-color: #fff; }

/* Extra-large screens (e.g., 30" 4K): scale tile copy a bit more */
@media (min-width: 1600px) {
	.tile-card__copy h3 { font-size: 52px; }
	.tile-card__copy p { font-size: 20px; }
	.tile-card .btn { font-size: 16px; padding: 14px 18px; }
}

/* About */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 3vw, 40px); align-items: center; }
.about-media img { width: 100%; border-radius: var(--radius); border: 2px solid #0a0a0a; box-shadow: var(--shadow); background: #fff; }
.about-copy h2 { font-size: clamp(28px, 4.6vw, 46px); }
.bullets { display: grid; gap: 6px; margin: 0 0 16px; padding-left: 20px; color: var(--muted); }
.about-copy .cta { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 980px) {
	.about-grid { grid-template-columns: 1fr; }
}

/* Contact */
.contact { text-align: center; }
.contact h2 { font-size: clamp(28px, 5vw, 52px); }
.contact .cta { display: flex; gap: 16px; justify-content: center; align-items: center; flex-wrap: wrap; }
.contact .social { display: inline-flex; gap: 16px; color: var(--muted); }
.contact .social a:hover { color: var(--text); }

/* Footer */
.site-footer { border-top: 4px solid var(--accent); padding: 20px 0; color: #111; background: #f7f9fc; }
.footer-inner { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
@media (max-width: 680px) { .footer-inner { flex-direction: column; } }

/* Reveal on scroll */
[data-reveal] {
	opacity: 0;
	transform: translateY(16px) scale(.98);
	filter: none;
	transition-property: opacity, transform, filter;
	transition-duration: .7s, .8s, .8s;
	transition-timing-function: cubic-bezier(.22,1,.36,1), cubic-bezier(.22,1,.36,1), ease;
	transition-delay: var(--reveal-delay, 0ms);
	will-change: transform, opacity, filter;
}
.is-visible {
	opacity: 1 !important;
	transform: translateY(0) scale(1) !important;
	filter: blur(0) !important;
}

/* Reveal variants */
[data-reveal*="left"] { transform: translateX(-24px) rotateZ(-0.3deg) scale(.98); }
[data-reveal*="right"] { transform: translateX(24px) rotateZ(0.3deg) scale(.98); }
[data-reveal*="up"] { transform: translateY(16px) scale(.98); }
[data-reveal*="down"] { transform: translateY(-16px) scale(.98); }
[data-reveal*="scale"] { transform: translateY(8px) scale(.94); filter: blur(6px); }
[data-reveal*="fade"] { transform: none; }

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.ticker__track, .card, .btn { animation: none !important; transition: none !important; }
}

/* Case sections (Apple-like narrative) */
.case { background: var(--bg); border-top: 1px solid var(--line); }
.theme-dark { background: #0b0b0b; color: #f5f7fa; }
.theme-dark .lead { color: #cad0d6; }
.theme-dark .section-head p { color: #cad0d6; }
.case-hero { text-align: center; padding-block: clamp(40px, 8vw, 100px); }
.case-title { font-size: clamp(28px, 5.2vw, 56px); letter-spacing: .01em; }
.case-row { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 3vw, 40px); align-items: center; padding-block: clamp(30px, 6vw, 70px); border-top: 1px solid var(--line); }
.case-row--reverse { grid-template-columns: 1fr 1.1fr; }
.case-copy h4 { font-size: clamp(20px, 3.6vw, 34px); margin: 0 0 .4em; text-transform: uppercase; font-family: "Bebas Neue", Inter, sans-serif; }
.case-copy p { color: var(--text); }
.case-media .device { border-radius: var(--radius); overflow: hidden; border: 2px solid #0a0a0a; box-shadow: var(--shadow); background: #111; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; background: color-mix(in oklab, var(--accent) 18%, #000 82%); color: #fff; font-weight: 700; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 980px) {
	.case-row, .about-grid { grid-template-columns: 1fr; }
}

/* Apple-like dark UX case */
.health-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 3vw, 40px); align-items: center; padding-bottom: clamp(24px, 6vw, 60px); }
.health-hero .headline { font-size: clamp(28px, 5.4vw, 56px); letter-spacing: .01em; }
.health-hero .eyebrow { color: var(--accent); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px; font-size: 13px; }
.health-hero .device { border-radius: 22px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); box-shadow: 0 10px 40px rgba(0,0,0,.6); background: #111; }

.callouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 24px); padding-bottom: clamp(20px, 4vw, 40px); }
.callout { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; padding: 18px 16px; }
.callout h4 { font-family: "Bebas Neue", Inter, sans-serif; font-size: clamp(18px, 3vw, 28px); margin: 0 0 6px; }
.callout p { color: #cfd3d8; margin: 0; }

.scroll-gallery { position: relative; padding-bottom: clamp(28px, 6vw, 52px); }
.scroll-track { display: grid; grid-auto-flow: column; grid-auto-columns: min(80%, 520px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
.scroll-track .tile { scroll-snap-align: start; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.scroll-track .tile img, .scroll-track .tile video { width: 100%; height: auto; display: block; }
.scroll-track .tile figcaption { padding: 10px 12px; color: #cfd3d8; font-size: 14px; }

@media (max-width: 980px) { .health-hero { grid-template-columns: 1fr; } .callouts { grid-template-columns: 1fr; } }

