:root {
  color-scheme: dark;
  --paper: #121413;
  --surface: #1d211e;
  --ink: #f3f4ee;
  --muted: #b6bdb5;
  --line: #3b443c;
  --accent: #d9f067;
  --accent-ink: #151a0d;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: min(100% - 48px, 1180px); margin-inline: auto; }
.section { padding-block: clamp(84px, 10vw, 144px); }
.skip-link { position: absolute; z-index: 20; left: 16px; top: -60px; padding: 12px 16px; background: var(--accent); color: var(--accent-ink); }
.skip-link:focus { top: 12px; }

.site-header { position: absolute; z-index: 1; inset: 0 0 auto; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 80px; }
.brand { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; font-size: .9rem; font-weight: 700; letter-spacing: -.02em; }
.brand-mark { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1.5px solid var(--ink); font-size: .92rem; letter-spacing: -.08em; }
.brand-mark span { color: var(--accent); }
.brand-mark span, .blink-dot { animation: brand-dot-blink 1.5s steps(1, end) infinite; }
@keyframes brand-dot-blink { 0% { opacity: 1; } 50% { opacity: .15; } 100% { opacity: 1; } }
nav { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 38px); }
nav a, .header-contact { font-size: .84rem; font-weight: 600; }
nav a:hover, .header-contact:hover, .text-link:hover, .project-links a:hover, .about-link:hover, .site-footer a:hover { text-decoration: underline; text-underline-offset: 5px; }
.header-contact { white-space: nowrap; }
.header-contact span { margin-left: 8px; }

.eyebrow { margin: 0 0 28px; font-size: .71rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow-line { display: inline-block; width: 26px; height: 1px; background: currentColor; vertical-align: middle; margin-right: 11px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-weight: 600; letter-spacing: -.065em; }
h1 em, h2 em { color: var(--accent); font-style: normal; font-weight: 700; }
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); align-items: center; gap: clamp(36px, 5vw, 80px); min-height: 100dvh; padding-block: 96px 40px; }
h1 { margin-bottom: 24px; font-size: clamp(3.5rem, 6vw, 5.8rem); line-height: 1; }
.hero-intro { max-width: 540px; margin-bottom: 28px; color: var(--muted); font-size: clamp(1.04rem, 1.4vw, 1.2rem); line-height: 1.65; }
.hero-actions, .contact-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 54px; padding: 14px 21px; font-size: .88rem; font-weight: 700; transition: background .2s ease, transform .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: #e8fa92; }
.button-outline { border: 1px solid var(--ink); }
.button-outline:hover { background: var(--surface); }
.text-link { font-size: .88rem; font-weight: 700; }
.text-link span { margin-left: 9px; }
.hero-graphic { display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 1.05; padding: clamp(24px, 3vw, 42px); border: 1px solid var(--line); background: radial-gradient(ellipse at 72% 25%, #484e49, transparent 34%), radial-gradient(ellipse at 25% 78%, #343a35, transparent 48%), var(--surface); }
.graphic-top, .graphic-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.graphic-word { font-size: clamp(3.2rem, 6vw, 6.7rem); line-height: .9; font-weight: 700; letter-spacing: -.09em; }
.graphic-word i { color: var(--accent); font-style: normal; }
.graphic-arrow { font-size: 2rem; line-height: 1; }

.hero, .services, .project-feature, .project:not(.project-jair), .client-sites, .about, .closing-panel { scroll-snap-align: start; }
.services, .client-sites, .about { display: grid; align-items: center; min-height: 100dvh; }
.services { padding-block: clamp(38px, 5dvh, 72px); background: var(--surface); }
.services-layout { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(48px, 9vw, 130px); }
h2 { font-size: clamp(3rem, 5vw, 5rem); line-height: 1.02; }
.section-heading h2 { max-width: 480px; }
.service-item { display: grid; grid-template-columns: 46px 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.service-item:last-child { border-bottom: 1px solid var(--line); }
.service-number { padding-top: 6px; color: var(--muted); font-size: .77rem; }
.service-item h3 { margin-bottom: 10px; font-size: clamp(1.4rem, 2vw, 1.9rem); letter-spacing: -.045em; }
.service-item p { max-width: 470px; margin-bottom: 0; color: var(--muted); line-height: 1.6; }

.projects-heading { display: flex; justify-content: space-between; align-items: center; gap: 60px; min-height: clamp(260px, 35dvh, 360px); padding-block: 40px; }
.project-feature { scroll-snap-stop: always; }
.projects-heading h2 { margin-bottom: 0; }
.projects-heading > p { max-width: 345px; margin-bottom: 5px; color: var(--muted); line-height: 1.6; }
.project:not(.project-jair) { scroll-snap-stop: always; }
.project-list { display: grid; }
.project { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr); min-height: 100dvh; background: var(--surface); }
.project-jair { min-height: calc(100dvh - clamp(260px, 35dvh, 360px)); }
.project-art { display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 30px; }
.project-art strong { align-self: center; font-size: clamp(6rem, 15vw, 12rem); font-weight: 500; letter-spacing: -.14em; line-height: 1; }
.project-art img { align-self: center; width: min(50%, 192px); height: auto; }
.thread-logo { align-self: center; width: min(60%, 240px); aspect-ratio: 1; background: var(--accent); -webkit-mask: url('/assets/one-thread-logo.svg') center / contain no-repeat; mask: url('/assets/one-thread-logo.svg') center / contain no-repeat; }
.art-small { font-size: .66rem; font-weight: 700; letter-spacing: .16em; }
.art-rule { height: 1px; background: currentColor; opacity: .5; }
.project-art { background: #292e2a; color: var(--accent); }
.jair-art { position: relative; display: block; padding: 0; background: #0c265a; color: #fff; }
.jair-art-nav { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 66px; padding: 16px 22px; background: #102235; }
.jair-art-nav img { width: min(48%, 190px); height: auto; }
.jair-art-nav span { font-size: .56rem; font-weight: 700; white-space: nowrap; }
.jair-art-hero { display: grid; grid-template-columns: .85fr 1fr; align-items: center; gap: 18px; height: calc(100% - 66px); padding: 22px; }
.jair-art-photo { display: flex; align-items: end; justify-content: center; align-self: stretch; overflow: hidden; border-radius: 14px 56px 14px 14px; background: #dfe9f8; }
.jair-art-photo img { width: 100%; max-height: 100%; object-fit: contain; object-position: bottom; }
.jair-art-message span { display: block; margin-bottom: 10px; color: #f26c76; font-size: .55rem; font-weight: 800; letter-spacing: .1em; }
.jair-art-message strong { display: block; font-size: clamp(1.1rem, 2.15vw, 2rem); line-height: 1.08; letter-spacing: -.055em; }
.jair-art-message i { display: inline-block; margin-top: 20px; padding: 9px 13px; border-radius: 100px; background: #d7192b; font-size: .68rem; font-style: normal; font-weight: 700; }
.jair-frost { position: absolute; inset: 0; display: none; place-items: center; width: 100%; padding: 20px; overflow: hidden; border: 0; background: rgb(232 241 255 / 54%); color: #09235f; font: inherit; cursor: pointer; backdrop-filter: blur(8px) saturate(.72); -webkit-backdrop-filter: blur(8px) saturate(.72); transition: opacity 1400ms var(--ease-out), visibility 1400ms; }
.has-js .jair-frost { display: grid; }
.jair-frost:focus-visible { outline: 3px solid var(--accent); outline-offset: -6px; }
.jair-frost-piece { position: absolute; width: 100%; aspect-ratio: 1; background: url('/assets/jair-frost.webp') center / contain no-repeat; mix-blend-mode: screen; opacity: .72; pointer-events: none; transition: opacity 1400ms var(--ease-out), transform 1400ms var(--ease-out); }
.jair-frost-a { top: -38%; left: -30%; transform: rotate(-12deg); }
.jair-frost-b { top: -38%; right: -30%; transform: rotate(82deg); }
.jair-frost-c { right: -30%; bottom: -38%; transform: rotate(174deg); }
.jair-frost-d { bottom: -38%; left: -30%; transform: rotate(266deg); }
.jair-frost-label { position: relative; font-size: clamp(1.2rem, 2.2vw, 1.9rem); font-weight: 800; line-height: 1.08; letter-spacing: -.04em; text-align: center; text-shadow: 0 1px #fff, 0 0 10px #c8eaff; transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out); }
.jair-frost.is-clearing { opacity: 0; visibility: hidden; }
.jair-frost.is-clearing .jair-frost-piece { opacity: 0; transform: scale(.84); }
.jair-frost.is-clearing .jair-frost-label { opacity: 0; transform: translateY(-8px); }
.project-copy { display: flex; flex-direction: column; align-items: start; justify-content: center; padding: clamp(28px, 4vw, 52px); }
.project-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; margin-bottom: 16px; }
.project-topline .project-kind { margin-bottom: 0; }
.project-toggle { display: none; flex: none; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; color: var(--accent); cursor: pointer; }
.has-js .project-toggle { display: grid; }
.project-toggle:hover { background: var(--line); }
.project-toggle:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.project-toggle svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--ease-out); }
.project.is-detail .project-toggle svg { transform: rotate(180deg); }
.project-stage { display: grid; grid-template-columns: repeat(2, 100%); width: 100%; overflow: hidden; }
.project-panel { min-width: 0; transition: transform 240ms cubic-bezier(0.77, 0, 0.175, 1), opacity 180ms var(--ease-out); }
.project-panel[aria-hidden="true"] { opacity: 0; }
.project.is-detail .project-panel { transform: translateX(-100%); }
.project-kind { margin-bottom: 16px; color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.project-copy h3 { margin-bottom: 15px; font-size: clamp(2rem, 3vw, 3.1rem); letter-spacing: -.055em; }
.project-copy > p:not(.project-kind):not(.project-tech), .project-panel > p:not(.project-tech):not(.project-detail-label) { max-width: 570px; margin-bottom: 18px; color: var(--muted); line-height: 1.62; }
.project-detail-label { margin-bottom: 12px; color: var(--accent); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.project-detail h3 { margin: 0 0 16px; font-size: clamp(1.8rem, 2.5vw, 2.5rem); font-weight: 600; letter-spacing: -.05em; line-height: 1.1; }
.project-detail .project-detail-note { margin-bottom: 24px; font-size: .84rem; }
.project-tech { margin-bottom: 30px; font-size: .76rem; font-weight: 700; letter-spacing: .02em; }
.project-links { display: flex; flex-wrap: wrap; gap: 22px; }
.project-links a { font-size: .84rem; font-weight: 700; }
.project-links span { margin-left: 6px; }
.project-links .project-demo-link, .project-links .project-live-link { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 15px; border: 1px solid var(--accent); color: var(--accent); }
.project-links .project-demo-link:hover, .project-links .project-live-link:hover { background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.demo-preview { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; background: rgb(0 0 0 / 78%); pointer-events: none; opacity: 0; visibility: hidden; transition: opacity 180ms var(--ease-out), visibility 180ms; }
.demo-preview.is-visible { opacity: 1; visibility: visible; }
.demo-preview-window { display: flex; flex-direction: column; width: min(1100px, calc(100vw - 96px)); height: min(700px, calc(100dvh - 96px)); overflow: hidden; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 24px 70px rgb(0 0 0 / 45%); transform: translateY(10px) scale(.97); transition: transform 200ms var(--ease-out); }
.demo-preview.is-visible .demo-preview-window { transform: translateY(0) scale(1); }
.demo-preview-bar { display: flex; justify-content: space-between; gap: 20px; padding: 14px 20px; color: var(--muted); font-size: .75rem; font-weight: 700; letter-spacing: .04em; }
.demo-preview-title { color: var(--ink); }
.demo-preview iframe { flex: 1; width: 100%; border: 0; background: var(--paper); }

.client-sites { border-top: 1px solid var(--line); }
.client-sites h2 { max-width: 800px; }
.client-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 48px; }
.client-site { padding: 32px; background: var(--surface); }
.client-site h3 { font-size: 1.5rem; }
.client-site p { color: var(--muted); line-height: 1.6; }
.client-site a { color: var(--accent); font-weight: 700; }

.about { background: var(--surface); }
.about-layout { display: grid; grid-template-columns: minmax(220px, .45fr) minmax(0, 1fr); gap: clamp(40px, 8vw, 100px); }
.about .eyebrow { padding-top: 16px; color: var(--muted); }
.about h2 { margin-bottom: 26px; }
.about p:not(.eyebrow) { max-width: 700px; color: var(--muted); font-size: clamp(1.13rem, 1.8vw, 1.5rem); line-height: 1.55; }
.about-link { display: inline-block; margin-top: 20px; border-bottom: 1px solid var(--line); padding-bottom: 8px; font-size: .88rem; font-weight: 700; }
.about-link span { margin-left: 10px; }
.about a:focus-visible { outline-color: var(--accent); }

.closing-panel { display: flex; flex-direction: column; min-height: 100dvh; }
.contact { display: flex; flex: 1; flex-direction: column; justify-content: center; text-align: center; }
.contact h2 { margin-bottom: 24px; }
.contact > p:not(.eyebrow) { max-width: 520px; margin: 0 auto 32px; color: var(--muted); line-height: 1.65; }
.contact-actions { justify-content: center; gap: 12px; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px; padding-block: 29px; color: var(--muted); font-size: .77rem; }

@media (min-width: 1100px) and (min-height: 701px) {
  html { scroll-snap-type: y mandatory; }
}

@media (max-width: 850px) {
  .header-inner { flex-wrap: wrap; padding-block: 14px; gap: 16px; }
  nav { order: 3; width: 100%; justify-content: space-between; }
  .hero { grid-template-columns: 1fr; padding-block: 112px 48px; }
  .hero-graphic { display: none; }
  .services-layout, .about-layout { grid-template-columns: 1fr; gap: 28px; }
  .projects-heading { align-items: start; justify-content: center; flex-direction: column; gap: 24px; }
  .project { grid-template-columns: 1fr; min-height: 0; }
  .client-list { grid-template-columns: 1fr; }
  .project-art { min-height: 260px; }
  .project-art strong { font-size: 8rem; }
  .jair-art-message strong { font-size: clamp(1.2rem, 3vw, 1.7rem); }
}

@media (max-width: 899px) {
  .demo-preview { display: none; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 32px, 1180px); }
  .section { padding-block: 78px; }
  .services { padding-block: 52px; }
  .header-contact { margin-left: auto; }
  nav a { font-size: .76rem; }
  .hero { padding-block: 112px 48px; }
  h1 { font-size: clamp(2.8rem, 12vw, 4rem); }
  .hero-copy { min-width: 0; }
  .graphic-word { font-size: clamp(3.6rem, 16vw, 5.2rem); }
  .hero-actions { align-items: start; flex-direction: column; gap: 22px; }
  .project-art { min-height: 225px; }
  .jair-art { min-height: 350px; }
  .jair-art-nav span { display: none; }
  .jair-art-hero { min-height: 284px; height: auto; }
  .project-art strong { font-size: 6rem; }
  .jair-art-message strong { font-size: clamp(1.2rem, 5vw, 1.7rem); }
  .project-copy { padding: 28px; }
  .contact-actions { align-items: stretch; flex-direction: column; }
  .contact-actions .button { width: 100%; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .brand-mark span, .blink-dot { animation: none; }
  .button { transition: none; }
  .button:hover { transform: none; }
  .demo-preview { transition-duration: 120ms; }
  .demo-preview-window { transform: none; transition: none; }
  .project-panel { transition: opacity 120ms var(--ease-out); }
  .project-toggle svg { transition: none; }
  .jair-frost, .jair-frost-piece, .jair-frost-label { transition-duration: 120ms; }
  .jair-frost.is-clearing .jair-frost-piece, .jair-frost.is-clearing .jair-frost-label { transform: none; }
}
