@font-face {
  font-family: 'Space Grotesk';
  src: url('./assets/space-grotesk.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('./assets/instrument-serif.woff2') format('woff2');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url('./assets/inter.woff2') format('woff2');
  font-weight: 400 650;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f7f6f2;
  --ink: #19171e;
  --muted: #54515a;
  --line: #d8d5d9;
  --violet: #5527d9;
  --violet-dark: #4015b7;
  --lavender: #eae3fd;
  --bright: #c9b4ff;
  --night: #19161f;
  --body: Inter, Arial, sans-serif;
  --display: 'Space Grotesk', 'Arial', sans-serif;
  --italic: 'Instrument Serif', Georgia, serif;
  --gutter: clamp(1.25rem, 5.55vw, 5.5rem);
}

*, *::after, *::before { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--body); }
h1, h2, h3, p, figure, ol { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
::selection { color: white; background: var(--violet); }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
[id] { scroll-margin-top: 1.25rem; }
.wrap { width: min(calc(100% - 2 * var(--gutter)), 82rem); margin-inline: auto; }

.skip-link { position: fixed; top: 1rem; left: 1rem; z-index: 10; padding: .6rem 1rem; color: white; background: var(--violet); transform: translateY(-170%); }
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.header-inner { min-height: 5.4rem; }
.wordmark { display: inline-flex; align-items: center; gap: .58rem; text-decoration: none; font: 700 1.76rem/1 var(--display); letter-spacing: -.08em; }
.brand-dot { color: var(--violet); }
.nav { display: flex; align-items: center; gap: clamp(1.3rem, 3.5vw, 3.2rem); }
.nav a { text-decoration: none; font-size: .875rem; font-weight: 600; transition: color 180ms, background-color 180ms, border-color 180ms; }
.nav a:hover { color: var(--violet); }
.nav .nav-contact { border: 1px solid var(--ink); padding: .65rem 1rem; border-radius: .3rem; }
.nav .nav-contact:hover { background: var(--ink); color: var(--paper); }
.menu-button { display: none; }

.hero { display: grid; grid-template-columns: 1.17fr 1fr; gap: clamp(1.6rem, 3.1vw, 3.4rem); align-items: center; padding-block: clamp(2.5rem, 5.05vw, 5.25rem); }
.hero-copy { padding-bottom: 2.2rem; }
.eyebrow { display: flex; align-items: center; gap: .65rem; font-size: .78rem; font-weight: 650; line-height: 1.45; letter-spacing: .115em; text-transform: uppercase; }
.eyebrow > span { flex: 0 0 .7rem; height: .7rem; display: inline-block; border-top: 2px solid currentColor; border-right: 2px solid currentColor; color: var(--violet); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; }
h1 { font-size: clamp(3.35rem, 7.2vw, 7.1rem); line-height: .96; letter-spacing: -.079em; margin: 1.65rem 0 1.6rem; }
h1 em, h2 em { display: block; font: italic 400 1.16em/.88 var(--italic); letter-spacing: -.035em; color: var(--violet); }
.hero-description { width: min(100%, 29rem); color: var(--muted); font-size: clamp(1.04rem, 1.48vw, 1.24rem); line-height: 1.57; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.45rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; padding: .83rem 1.13rem; min-height: 3.2rem; border: 1px solid transparent; border-radius: .3rem; text-decoration: none; font: 650 .875rem/1.4 var(--body); transition: color 180ms, background-color 180ms, border-color 180ms; }
.button-primary { background: var(--violet); color: #fff; }
.button-primary:hover { background: var(--violet-dark); }
.button-primary:focus-visible { outline-color: var(--violet); }
.text-link { width: fit-content; font-size: .875rem; font-weight: 650; text-decoration-line: underline; text-underline-offset: .3em; text-decoration-color: currentColor; text-decoration-thickness: 1px; transition: color 180ms, text-decoration-thickness 180ms; }
.text-link:hover { color: var(--violet); text-decoration-thickness: 2px; }
.hero-figure { min-width: 0; }
.hero-art { position: relative; overflow: hidden; background: #160d22; aspect-ratio: 1.07; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 800ms cubic-bezier(.2,.65,.25,1); }
.art-corner { position: absolute; top: 1.1rem; left: 1.1rem; width: 1rem; height: 1rem; border-top: 1px solid #e5d4ff; border-left: 1px solid #e5d4ff; }
.art-corner-end { inset: auto 1.1rem 1.1rem auto; transform: rotate(180deg); }
.hero-figure figcaption { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding-block: .63rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.hero-figure figcaption > span:last-child { display: inline-flex; align-items: center; gap: .55rem; }
.caption-divider { display: inline-block; width: 1px; height: .6rem; background: #aba5b4; }

.section-grid { display: grid; grid-template-columns: .84fr 1.16fr; gap: clamp(3rem, 9vw, 9rem); align-items: start; }
.expertise-section, .uses-section, .approach-section, .questions-section, .contact-section { padding-block: clamp(4.25rem, 8vw, 8rem); }
.expertise-section { background: var(--night); color: var(--paper); }
.expertise-section .eyebrow > span, .expertise-section h2 em { color: var(--bright); }
h2 { font-size: clamp(3.15rem, 5.2vw, 5.35rem); line-height: .99; letter-spacing: -.073em; margin: 1.15rem 0 1.3rem; }
.section-intro > p:last-child { max-width: 26rem; }
.expertise-section .section-intro > p:last-child, .expertise-list p { color: #cfc9d7; }
.expertise-list details { border-top: 1px solid #504959; }
.expertise-list details:last-child { border-bottom: 1px solid #504959; }
.expertise-list summary { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: 1.15rem 0; font: 500 clamp(1.27rem, 2.25vw, 2.05rem)/1.22 var(--display); letter-spacing: -.045em; cursor: pointer; list-style: none; transition: color 180ms; }
.expertise-list summary::-webkit-details-marker { display: none; }
.expertise-list summary:hover, .expertise-list [open] summary { color: var(--bright); }
.expertise-list details p { max-width: 39rem; padding: 0 1rem 1.4rem 0; }
.plus { flex: 0 0 1.75rem; height: 1.75rem; border: 1px solid #746883; border-radius: 50%; position: relative; }
.plus::before, .plus::after { content: ''; position: absolute; top: 50%; left: 50%; width: .65rem; height: 1px; background: currentColor; transform: translate(-50%, -50%); transition: transform 180ms; }
.plus::after { transform: translate(-50%, -50%) rotate(90deg); }
[open] .plus::after { transform: translate(-50%, -50%); }

.uses-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2.25rem; }
.uses-heading h2, .uses-heading h2 em { display: inline-block; }
.uses-heading h2 { margin-bottom: 0; }
.uses-heading > p { color: var(--muted); max-width: 16rem; padding-bottom: .25rem; }
.case-tabs { display: flex; flex-wrap: wrap; gap: .55rem; margin-bottom: 1.05rem; }
.case-tabs button { border: 1px solid #b8b0c2; background: transparent; color: var(--ink); min-height: 2.8rem; padding: .52rem 1rem; border-radius: 3rem; font-size: .875rem; font-weight: 600; transition: background-color 180ms, color 180ms, border-color 180ms; }
.case-tabs button:hover { border-color: var(--violet); color: var(--violet); }
.case-tabs button[aria-selected='true'] { border-color: var(--violet); background: var(--violet); color: white; }
.case-tabs button:focus-visible { outline-color: var(--violet); }
.case-panel { display: grid; grid-template-columns: 1.15fr 1fr; background: var(--lavender); border: 1px solid #ded3fa; }
.case-panel + .case-panel { margin-top: 1rem; }
.case-tabs:not([hidden]) + .case-panels .case-panel { margin-top: 0; }
.case-copy { display: flex; flex-direction: column; align-items: start; padding: clamp(1.45rem, 4vw, 3.9rem); }
.case-label { color: var(--violet-dark); font-size: .83rem; font-weight: 650; letter-spacing: .075em; text-transform: uppercase; }
.case-copy h3 { font-size: clamp(1.95rem, 3.45vw, 3.45rem); line-height: 1.03; letter-spacing: -.065em; margin: .6rem 0 .9rem; max-width: 14ch; }
.case-copy > p:not(.case-label) { max-width: 33rem; }
.outcome { padding-top: .8rem; margin: 1.25rem 0; border-top: 1px solid #c8b8eb; }
.outcome strong { display: block; font-size: .87rem; margin-bottom: .16rem; }
.case-link { color: var(--violet-dark); }
.case-diagram { background: #e2d7fa; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 23rem; padding: 1.4rem; border-left: 1px solid #d5c6f5; background-image: radial-gradient(#bfa9ec 1px, transparent 1px); background-size: 15px 15px; }
.case-inputs { display: flex; justify-content: center; gap: 1.15rem; width: 100%; }
.case-inputs span, .case-result { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 3rem; padding: .55rem .7rem; border: 1px solid #a28ada; border-radius: .3rem; background: #f6f0ff; font-size: .875rem; font-weight: 600; line-height: 1.25; }
.case-inputs span { width: min(46%, 9.75rem); }
.diagram-junction { position: relative; width: min(calc(46% + 1.15rem), 10.9rem); height: 3.5rem; display: grid; place-items: center; }
.diagram-junction::before { content: ''; position: absolute; inset: 0 0 50%; border: 1px solid #8668c4; border-top: 0; border-radius: 0 0 .4rem .4rem; }
.diagram-junction::after { content: ''; height: 50%; width: 1px; background: #8668c4; align-self: end; }
.case-result { gap: .55rem; border-color: var(--violet); background: var(--violet); color: white; padding-inline: 1.1rem; }
.result-glyph { width: .65rem; height: .65rem; border: 1px solid #fff; transform: rotate(45deg); }

.approach-section { border-top: 1px solid var(--line); background: #eeece7; }
.approach-list { list-style: none; padding: 0; }
.approach-list li { display: grid; grid-template-columns: .78fr 1.22fr; align-items: baseline; gap: 1rem; padding: 1.25rem 0; border-top: 1px solid #cbc5cc; }
.approach-list li:last-child { border-bottom: 1px solid #cbc5cc; }
.approach-list h3 { font-size: clamp(1.15rem, 2vw, 1.6rem); line-height: 1.15; letter-spacing: -.055em; }
.approach-list p, .approach-section .section-intro > p:last-child { color: var(--muted); }

.questions-section { border-top: 1px solid var(--line); }
.questions-list > div { border-top: 1px solid var(--line); padding-block: 1.3rem; }
.questions-list > div:last-child { border-bottom: 1px solid var(--line); }
.questions-list h3 { font-size: clamp(1.13rem, 2vw, 1.45rem); line-height: 1.25; letter-spacing: -.035em; }
.questions-list p { color: var(--muted); margin-block: .55rem .6rem; }
.questions-list a { color: var(--violet-dark); }

.contact-section { background: var(--violet-dark); color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 9vw, 9rem); }
.contact-copy h2 em, .contact-copy .eyebrow > span { color: #e0d4ff; }
.contact-copy > p:not(.eyebrow) { max-width: 25rem; color: #f0e8ff; }
.contact-email { display: inline-block; margin-top: 1.05rem; font-size: 1rem; overflow-wrap: anywhere; }
.contact-email:hover { color: #e0d4ff; }
.brief-form { display: flex; flex-direction: column; }
.brief-form label { margin: 0 0 .4rem; font-size: .875rem; font-weight: 650; }
.brief-form select, .brief-form textarea { display: block; width: 100%; border: 1px solid #a98af3; border-radius: .3rem; background: #5022c2; color: #fff; padding: .72rem .8rem; line-height: 1.4; }
.brief-form select { appearance: none; padding-right: 2.3rem; }
.brief-form select option { background: #fff; color: var(--ink); }
.brief-form textarea { resize: vertical; }
.brief-form textarea::placeholder { color: #e0d1ff; }
.select-wrap { position: relative; margin-bottom: 1.03rem; }
.select-wrap::after { content: ''; position: absolute; right: .95rem; top: 1.06rem; width: .53rem; height: .53rem; border-bottom: 2px solid white; border-right: 2px solid white; transform: rotate(45deg); pointer-events: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1rem; margin-top: 1.15rem; }
.form-note, .form-status { font-size: .875rem; color: #f0e8ff; }
.form-note { margin-top: .65rem; }
.form-status:not(:empty) { margin-top: .75rem; }
.button-light { background: var(--paper); color: var(--violet-dark); }
.button-light:hover { background: #e3d6ff; }
.button-light:focus-visible { outline-color: #fff; }
.button-outline-light { border-color: #bca5f7; background: transparent; color: #fff; }
.button-outline-light:hover { border-color: #fff; background: #5022c2; }

.footer-inner { min-height: 5.8rem; padding-block: 1.2rem; }
.footer-inner p { margin-right: auto; color: var(--muted); font-size: .875rem; }
.footer-inner .wordmark { font-size: 1.5rem; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .hero-art:hover img { transform: scale(1.034); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-copy { animation: appear .72s cubic-bezier(.22,.62,.3,1) both; }
  .reveal-ready { animation: appear .65s cubic-bezier(.22,.62,.3,1) both; }
  @keyframes appear {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 1040px) {
  .section-grid { gap: clamp(2rem, 5.1vw, 4.25rem); }
  .hero-copy { padding-bottom: 1rem; }
}

@media (max-width: 760px) {
  .header-inner { min-height: 4.5rem; position: relative; flex-wrap: wrap; gap: 0; }
  .wordmark { font-size: 1.55rem; }
  .wordmark img { width: 2rem; height: 2rem; }
  .menu-button { display: inline-flex; align-items: center; gap: .6rem; border: 1px solid var(--line); border-radius: .3rem; padding: .45rem .7rem; background: transparent; color: var(--ink); min-height: 2.55rem; font-size: .875rem; font-weight: 600; }
  .menu-button span { width: .75rem; height: .48rem; border-block: 1px solid currentColor; }
  .nav { width: 100%; padding: .2rem 0 1.15rem; flex-direction: column; align-items: stretch; gap: .2rem; }
  .nav a { padding: .65rem 0; }
  .nav .nav-contact { width: fit-content; margin-top: .25rem; }
  .hero { grid-template-columns: 1fr; gap: 2.05rem; padding-top: 3.25rem; }
  .hero-copy { padding: 0; }
  h1 { font-size: clamp(3rem, 11.3vw, 5.4rem); margin: 1.3rem 0 1.25rem; }
  .hero-description { max-width: 28rem; }
  .hero-actions { margin-top: 1.35rem; }
  .hero-art { aspect-ratio: 1.24; }
  .section-grid, .contact-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .uses-heading { display: block; margin-bottom: 1.5rem; }
  .uses-heading h2 { margin-bottom: .95rem; }
  .uses-heading > p { max-width: 23rem; }
  .case-panel { grid-template-columns: 1fr; }
  .case-diagram { min-height: 12.7rem; border-left: 0; border-top: 1px solid #d5c6f5; }
  .footer-inner { flex-wrap: wrap; column-gap: 1rem; row-gap: .75rem; }
  .footer-inner p { order: 3; flex-basis: 100%; }
}

@media (max-width: 440px) {
  .hero-actions { flex-direction: column; align-items: flex-start; gap: .9rem; }
}

@media (max-width: 380px) {
  h1 { font-size: clamp(2.7rem, 12.2vw, 3rem); }
  .approach-list li { grid-template-columns: 1fr; gap: .35rem; }
  .case-tabs button { padding-inline: .75rem; }
}

@media (max-width: 760px) and (scripting: enabled) {
  .menu-button[aria-expanded='false'] + .nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
