@font-face { font-family: 'Instrument Sans'; src: url('assets/fonts/instrument-sans-variable.woff2') format('woff2'); font-style: normal; font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Pixelify Sans'; src: url('assets/fonts/pixelify-sans.woff2') format('woff2'); font-style: normal; font-weight: 500 600; font-display: swap; }

:root {
  --ink: #251836;
  --paper: #f7f2ea;
  --paper-soft: #ece8f7;
  --violet: #7766ff;
  --violet-pale: #d9d3ff;
  --coral: #ff7565;
  --text: #f8f4ee;
  --muted: #c1bacd;
  --dark-text: #211b35;
  --dark-muted: #5f596c;
  --rule: rgb(248 244 238 / 19%);
  --max: 1440px;
  --sans: 'Instrument Sans', sans-serif;
  --pixel: 'Pixelify Sans', monospace;
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ink); color: var(--text); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: .22em; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
::selection { color: var(--ink); background: var(--violet-pale); }
img, canvas, svg { display: block; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 600; line-height: .98; letter-spacing: -.04em; }
.site-header { height: 82px; max-width: var(--max); margin: auto; padding: 0 clamp(24px, 3.7vw, 56px); display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 20; }
.wordmark { font: 600 30px/.9 var(--pixel); text-decoration: none; letter-spacing: -.05em; }
.wordmark span { color: var(--coral); }
.desktop-nav { position: absolute; left: 26.4%; display: flex; align-items: center; gap: clamp(28px, 3.8vw, 56px); }
.desktop-nav a, .site-footer nav a { color: var(--muted); text-decoration: none; font-size: 15px; transition: color .2s ease; }
.desktop-nav a:hover, .site-footer nav a:hover { color: var(--text); }
.mobile-nav { display: none; }

.hero { position: relative; min-height: 610px; height: 610px; padding: 0 clamp(24px, 3.7vw, 56px) 120px; overflow: visible; }
.hero::before { content: ''; position: absolute; inset: 0 0 10% 0; background: radial-gradient(ellipse at 79% 35%, #30203f 0%, #251836 28%, transparent 62%); opacity: .45; pointer-events: none; }
.hero-copy { position: relative; z-index: 5; width: min(47%, 650px); max-width: 650px; margin-left: max(0px, calc((100vw - var(--max)) / 2)); padding-top: 44px; }
.hero h1 { font-weight: 700; margin-bottom: 24px; max-width: 12ch; font-size: clamp(56px, 6.3vw, 92px); letter-spacing: -.04em; line-height: .91; }
.hero-description { max-width: 31em; margin: 0 0 28px; color: #e1dce7; font-size: clamp(18px, 1.55vw, 22px); line-height: 1.42; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; }
.button { display: inline-flex; min-height: 54px; align-items: center; justify-content: center; gap: 14px; padding: 0 24px; border-radius: 8px; font-size: 15px; font-weight: 600; text-decoration: none; transition: transform .22s cubic-bezier(.16, 1, .3, 1), background-color .22s ease; }
.button:hover { transform: translateY(-2px); }
.button svg { width: 19px; height: 19px; }
.button-coral { color: #24182c; background: var(--coral); }
.button-coral:hover { background: #ff8c79; }
.text-link { color: var(--text); padding: 10px 0 7px; text-decoration: none; border-bottom: 1px solid #dfd7e6; }
.project-space { position: absolute; z-index: 3; inset: 0; pointer-events: none; perspective: 1800px; }
.project-panel { position: absolute; pointer-events: auto; display: flex; flex-direction: column; background: var(--paper); color: var(--dark-text); border: 1px solid #d8d0c9; border-radius: 12px; box-shadow: 0 28px 66px rgb(6 4 14 / 37%); transition: transform .65s cubic-bezier(.16, 1, .3, 1), box-shadow .65s cubic-bezier(.16, 1, .3, 1); transform-style: preserve-3d; }
.simulator-panel { width: min(46vw, 680px); height: 560px; top: 10px; right: max(3.7vw, calc((100vw - var(--max)) / 2 + 40px)); padding: 0 36px 34px; transform: rotateY(-20deg) rotateZ(-7deg) skewX(-10deg); }
.practice-panel { width: min(41vw, 646px); height: 420px; top: 440px; left: max(12.4vw, calc((100vw - var(--max)) / 2 + 160px)); padding: 0 30px 26px; background: var(--violet-pale); border-color: #aaa1dc; z-index: 2; transform: rotateY(14deg) rotateZ(4deg) skewX(9deg); }
.simulator-panel:hover, .simulator-panel:focus-within { transform: translateY(-5px) rotateY(-18deg) rotateZ(-6deg) skewX(-9deg); box-shadow: 0 38px 78px rgb(6 4 14 / 45%); }
.practice-panel:hover, .practice-panel:focus-within { transform: translateY(-5px) rotateY(12deg) rotateZ(3deg) skewX(8deg); box-shadow: 0 34px 66px rgb(6 4 14 / 38%); }
.panel-top { height: 66px; flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgb(33 27 53 / 13%); }
.panel-brand { color: var(--dark-text); font: 600 18px/.9 var(--pixel); text-decoration: none; }
.panel-menu { display: grid; width: 42px; height: 42px; place-items: center; }
.panel-menu svg { width: 25px; height: 25px; stroke-width: 2; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-top: 26px; }
.panel-heading h2 { font-weight: 700; max-width: 9.5em; margin: 0; font-size: clamp(26px, 2.65vw, 38px); line-height: .98; letter-spacing: -.04em; }
.simulator-panel .panel-heading h2 { max-width: 8.4em; }
.panel-cta { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 9px; min-height: 42px; margin-top: 8px; padding: 0 14px; border-radius: 7px; color: #20162f; font-size: 13px; font-weight: 600; text-decoration: none; }
.panel-cta svg { width: 16px; height: 16px; }
.coral-cta { background: var(--coral); }
.violet-cta { background: #705aff; color: white; }
.diagram-labels { display: flex; justify-content: space-around; margin: 30px 10% 4px; color: #655c74; font: 500 13px/1 var(--pixel); }
.diagram { width: 100%; height: auto; object-fit: contain; }
.simulator-diagram { max-height: 232px; margin-block: auto; padding: 12px 0; }
.practice-diagram { max-height: 182px; margin-block: auto; padding: 8px 0; }

.section-light { color: var(--dark-text); background: var(--paper); }
.section-dark { color: var(--text); background: var(--ink); }
.section-lavender { color: var(--dark-text); background: var(--paper-soft); }
.work-section { position: relative; z-index: 1; isolation: isolate; padding: 300px clamp(24px, 3.7vw, 56px) 112px; background: transparent; }
.work-section::before { content: ''; position: absolute; z-index: -1; inset: -160px 0 0; background: var(--paper); clip-path: polygon(0 150px, 100% 235px, 100% 100%, 0 100%); }
.section-heading { max-width: var(--max); margin: 0 auto 42px; }
.section-heading h2 { max-width: 15ch; margin: 0 0 18px; font-size: clamp(38px, 5vw, 68px); line-height: 1; }
.work-section .section-heading h2 { max-width: none; font-size: clamp(38px, 4.2vw, 64px); font-weight: 700; }
.section-heading > p:last-child { max-width: 44em; margin: 0; color: var(--dark-muted); }
.services-section .section-heading > p:last-child { color: var(--muted); }
.work-list { max-width: var(--max); margin: 0 auto; border-top: 1px solid #cfc8c0; }
.work-row { min-height: 112px; display: grid; grid-template-columns: 90px minmax(0, 1fr) 28px; align-items: center; gap: 20px; border-bottom: 1px solid #cfc8c0; text-decoration: none; transition: color .25s ease; }
.work-row:hover { color: #5946cc; }
.work-index, .coordinate { color: #5946cc; font: 500 13px/1.2 var(--pixel); }
.work-row strong { display: block; margin-bottom: 5px; font-size: clamp(19px, 2.15vw, 28px); letter-spacing: -.025em; }
.work-row small { display: block; max-width: 75ch; color: var(--dark-muted); font-size: 14px; line-height: 1.5; }
.work-row > svg { color: #5946cc; transition: transform .25s ease; }
.work-row:hover > svg { transform: translateX(4px); }

.services-section, .process-section, .faq-section { padding: clamp(80px, 9vw, 130px) clamp(24px, 3.7vw, 56px); }
.split-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .62fr); gap: 70px; align-items: end; }
.split-heading > p { max-width: 34em; margin: 0 0 6px; color: var(--muted); }
.service-index { max-width: var(--max); margin: 55px auto 0; border-top: 1px solid var(--rule); }
.service-row { display: grid; grid-template-columns: minmax(135px, .33fr) minmax(0, 1.2fr) minmax(190px, .8fr); gap: 34px; align-items: start; padding: 31px 0 35px; border-bottom: 1px solid var(--rule); }
.service-row h3 { margin: 0 0 12px; font-size: clamp(24px, 2.5vw, 32px); letter-spacing: -.035em; }
.service-row p { max-width: 46em; margin: 0; color: var(--muted); font-size: 15px; }
.service-tech { color: #c7bfd1; font-size: 13px; line-height: 1.75; }
.service-row .coordinate { padding-top: 8px; color: #b8aaff; }

.process-section { color: var(--dark-text); }
.process-section .split-heading > p { color: var(--dark-muted); }
.process-list { max-width: var(--max); margin: 58px auto 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.process-list li { padding-top: 18px; border-top: 1px solid #aaa2bb; }
.process-list .coordinate { display: block; margin-bottom: 28px; color: #5946cc; }
.process-list h3 { margin: 0 0 12px; font-size: 32px; }
.process-list p { margin: 0; color: #5f596c; font-size: 15px; }

.about-section { min-height: 540px; padding: 110px clamp(24px, 9vw, 150px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 420px); gap: 90px; align-items: center; background: radial-gradient(ellipse at 78% 50%, #332648 0%, var(--ink) 57%); }
.about-copy { max-width: 650px; }
.about-copy p { max-width: 42em; color: var(--muted); }
.about-copy h2, .contact-section h2 { margin: 0 0 24px; font-size: clamp(42px, 5.4vw, 76px); }
.portrait { margin: 0; padding: 24px; background: #251f36; border: 1px solid #5e536f; border-radius: 14px 14px 72px 14px; }
.portrait canvas { width: 100%; aspect-ratio: 1; background: #201a30; image-rendering: pixelated; cursor: pointer; outline-offset: 5px; }
.portrait figcaption { display: grid; gap: 4px; padding: 16px 4px 0; }
.portrait figcaption strong { color: var(--violet-pale); font: 600 20px/1 var(--pixel); }
.portrait figcaption span { color: var(--muted); font-size: 13px; }

.faq-section { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: 60px; }
.faq-section .section-heading { margin: 0; }
.faq-list { border-top: 1px solid #cfc8c0; }
.faq-list details { border-bottom: 1px solid #cfc8c0; padding: 19px 2px; }
.faq-list summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; float: right; color: #5946cc; font-size: 21px; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list p { margin: 12px 38px 0 0; color: var(--dark-muted); font-size: 15px; }

.contact-section { padding: clamp(82px, 10vw, 140px) 24px; text-align: center; background: #dfd9fb; color: var(--dark-text); }
.contact-section h2 { margin-inline: auto; max-width: 12ch; }
.contact-section > p { max-width: 39em; margin: 0 auto 28px; color: #514b60; }
.contact-section .button { margin-bottom: 20px; }
.email-tools { min-height: 42px; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 14px; color: #514b60; font-size: 14px; }
.email-tools a { text-decoration-color: #9690a4; }
.email-tools button { min-height: 44px; padding: 0 14px; border: 1px solid #aaa2bd; border-radius: 6px; background: transparent; color: var(--dark-text); cursor: pointer; }
.email-tools button:hover { background: #d4cdf4; }
#copy-status { flex-basis: 100%; min-height: 1.4em; font-size: 13px; }
.site-footer { min-height: 96px; padding: 24px clamp(24px, 3.7vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 13px; }
.site-footer .wordmark { color: var(--text); }
.site-footer nav { display: flex; gap: 24px; }

.pyxel-play { position: fixed; z-index: 29; right: 0; bottom: 0; left: 0; height: 160px; border-top: 1px solid #51465d; background: rgb(37 24 54 / 96%); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.pyxel-play.on { opacity: 1; pointer-events: auto; }
.pyxel-play p { position: absolute; left: max(24px, calc((100vw - var(--max)) / 2 + 56px)); bottom: 14px; margin: 0; color: var(--muted); font-size: 13px; }
.pyxel-toggle { position: absolute; z-index: 32; right: 22px; bottom: 12px; min-height: 44px; padding: 0 16px; border: 1px solid #635775; border-radius: 7px; background: #2b233c; color: var(--text); font: 500 13px/1 var(--pixel); cursor: pointer; }
.pyxel-toggle:hover { border-color: var(--violet-pale); }
.pyxel-roam { position: fixed; z-index: 30; inset: 0 auto auto 0; width: 100vw; height: 100vh; height: 100dvh; pointer-events: none; opacity: 0; color: var(--text); transition: opacity .3s ease; }
.pyxel-roam.on { opacity: 1; }
.pyxel-ball { position: fixed; z-index: 31; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: grab; touch-action: none; }
.pyxel-ball:active { cursor: grabbing; }
.pyxel-ball[hidden] { display: none; }
body.pyxel-active { padding-bottom: 160px; }

:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; }
@media (max-width: 980px) {
  .hero { min-height: 860px; height: auto; padding-top: 54px; }
  .hero-copy { width: 53%; }
  .simulator-panel { width: 47vw; right: 3vw; }
  .practice-panel { top: 54%; left: 7vw; width: 45vw; }
  .service-row { grid-template-columns: 130px minmax(0, 1fr); }
  .service-tech { grid-column: 2; }
}
@media (max-width: 700px) {
  .site-header { height: 70px; padding-inline: 20px; }
  .wordmark { font-size: 27px; }
  .desktop-nav { display: none; }
  .mobile-nav { display: block; position: relative; }
  .mobile-nav summary { display: grid; width: 44px; height: 44px; place-items: center; cursor: pointer; list-style: none; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav summary svg { width: 25px; height: 25px; }
  .mobile-nav nav { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: min(270px, calc(100vw - 40px)); padding: 8px; display: grid; background: #211a34; border: 1px solid #51465d; border-radius: 10px; box-shadow: 0 18px 38px #09071188; }
  .mobile-nav nav a { min-height: 46px; padding: 0 12px; display: flex; align-items: center; text-decoration: none; border-radius: 6px; }
  .mobile-nav nav a:hover { background: #332847; }
  .hero { min-height: auto; height: auto; padding: 42px 20px 0; overflow: hidden; }
  .hero::before { inset: 0 0 35% 0; }
  .hero-copy { width: auto; margin: 0; padding: 0; }
  .hero h1 { max-width: 11ch; font-size: clamp(50px, 13vw, 76px); }
  .hero-description { max-width: 35em; font-size: 18px; }
  .hero-actions { gap: 18px; }
  .button { min-height: 50px; padding-inline: 17px; font-size: 14px; }
  .project-space { position: relative; height: 790px; margin: 20px -20px 0; perspective: 1100px; }
  .project-panel { border-radius: 9px; }
  .simulator-panel:hover, .simulator-panel:focus-within { transform: rotate(-1deg) translateY(-3px); }
  .practice-panel:hover, .practice-panel:focus-within { transform: rotate(1deg) translateY(-3px); }
  .simulator-panel { top: 8px; left: 32px; width: calc(100% - 64px); height: 435px; padding: 0 20px 22px; transform: rotate(-1deg); }
  .practice-panel { top: 420px; left: 8%; width: 86%; height: 360px; padding: 0 17px 18px; transform: rotate(1deg); }
  .panel-top { height: 50px; }
  .panel-heading { gap: 8px; padding-top: 18px; }
  .panel-heading h2 { max-width: 11em; font-size: clamp(22px, 6vw, 30px); }
  .panel-cta { gap: 5px; min-height: 44px; margin-top: 11px; padding: 0 9px; font-size: 12px; }
  .panel-cta svg { width: 14px; height: 14px; }
  .diagram-labels { margin: auto 8% 4px; font-size: 12px; }
  .simulator-diagram { max-height: 128px; }
  .practice-diagram { max-height: 115px; }
  .work-section { padding: 76px 20px 82px; background: var(--paper); }
  .work-section::before { inset: 0; clip-path: none; }
  .section-heading h2, .work-section .section-heading h2 { font-size: clamp(38px, 10vw, 56px); }
  .work-row { grid-template-columns: 36px minmax(0, 1fr) 20px; gap: 12px; min-height: 100px; }
  .work-row strong { font-size: 18px; line-height: 1.15; }
  .work-row small { font-size: 14px; }
  .work-row { padding-block: 20px; }
  .services-section, .process-section, .faq-section { padding: 76px 20px; }
  .split-heading { grid-template-columns: 1fr; gap: 12px; }
  .service-index { margin-top: 35px; }
  .service-row { grid-template-columns: 1fr; gap: 12px; padding: 24px 0; }
  .service-tech { grid-column: auto; }
  .process-list { grid-template-columns: 1fr 1fr; gap: 32px 18px; margin-top: 38px; }
  .process-list h3 { font-size: 28px; }
  .process-list p { font-size: 14px; }
  .about-section { min-height: auto; padding: 76px 20px; grid-template-columns: 1fr; gap: 34px; }
  .portrait { width: min(100%, 360px); justify-self: center; }
  .faq-section { display: block; }
  .faq-section .section-heading { margin-bottom: 30px; }
  .contact-section { padding: 80px 20px; }
  .contact-section h2 { font-size: clamp(40px, 11vw, 62px); }
  .site-footer { padding: 26px 20px 148px; flex-wrap: wrap; }
  .site-footer > span { order: 3; flex-basis: 100%; }
  .pyxel-play { height: 120px; }
  body.pyxel-active { padding-bottom: 120px; }
  .pyxel-play p { left: 16px; bottom: 64px; max-width: 45%; line-height: 1.3; }
  .pyxel-toggle { right: 12px; bottom: 12px; }
}
@media (max-width: 380px) {
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 8px; }
  .hero .button { width: fit-content; }
  .project-space { height: 790px; }
  .panel-heading { align-items: flex-start; }
  .panel-heading h2 { font-size: 21px; }
  .panel-cta { max-width: 114px; white-space: nowrap; }
  .process-list { grid-template-columns: 1fr; }
  .email-tools { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .simulator-panel, .practice-panel { transform: none; }
}
