:root {
    color-scheme: light;
    --paper: #f6f5f0;
    --ink: #242622;
    --muted: #52564e;
    --rule: #cecec5;
    --accent: #ad3b22;

    --mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.public-site {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font: 1rem/1.7 "Inter", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}
:where(.public-site) :where(h1, h2, h3, p) { margin: 0; }
.public-site img { display: block; max-width: 100%; }
.public-site a { color: inherit; text-underline-offset: .25em; }
.public-site [hidden] { display: none !important; }
.public-site :focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.public-site main:focus, .expertise-section:focus { outline: none; }
.site-wrap { width: min(88%, 82rem); margin-inline: auto; }
.skip-link { position: fixed; z-index: 20; left: 1rem; top: -5rem; padding: .5rem 1rem; background: white; }
.skip-link:focus { top: .5rem; }

.site-header { position: relative; z-index: 3; background: #20221f; color: #f6f5f0; border-bottom: 1px solid #41423b; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 4.65rem; }
.site-header :focus-visible, .public-site .site-footer :focus-visible { outline-color: #ff987a; }
.brand { display: inline-flex; align-items: center; gap: .78rem; flex-shrink: 0; text-decoration: none; }
.brand img { width: 2.6rem; height: 2.75rem; object-fit: contain; }
.brand-type { display: grid; gap: .26rem; }
.brand-type strong { font-size: 1.37rem; line-height: 1; font-weight: 750; letter-spacing: .12em; }
.brand-type > span { color: #c3c3b9; font: 500 .76rem/1.15 "Inter", Arial, sans-serif; letter-spacing: .045em; }
.site-nav { display: flex; align-items: center; gap: clamp(1.3rem, 3vw, 2.6rem); }
.site-nav a { display: inline-flex; align-items: center; font-size: .94rem; font-weight: 600; text-decoration: none; }
.nav-link { position: relative; padding: .7rem 0; color: #e0e0d7; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: .34rem; height: 2px; background: #f28363; transform: scaleX(0); transform-origin: left; transition: transform .18s ease; }
.nav-link:hover::after, .nav-link:focus-visible::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.site-nav .contact-link { min-height: 2.65rem; padding: .38rem 1.3rem; border: 1px solid #86867a; border-radius: 2px; }
.site-nav .contact-link:hover, .site-nav .contact-link[aria-current="page"] { color: #ffad90; border-color: #eb8b69; }
.menu-toggle { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; padding: .4rem .75rem; border: 1px solid #77796d; border-radius: 2px; background: transparent; color: inherit; font-family: inherit; font-size: .94rem; font-weight: 600; line-height: 1.2; cursor: pointer; }
.menu-glyph { position: relative; width: 1rem; height: .7rem; }
.menu-glyph::before, .menu-glyph::after { content: ""; position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; }
.menu-glyph::before { top: 1px; }
.menu-glyph::after { bottom: 1px; }
.menu-toggle[aria-expanded="true"] .menu-glyph::before { top: calc(50% - 1px); transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-glyph::after { bottom: calc(50% - 1px); transform: rotate(-45deg); }
@media (max-width: 48rem) {
    .site-header .site-nav { border-top-color: #505149; }
    .site-header .site-nav .contact-link { min-height: 2.75rem; justify-content: center; }
}

.studio-hero {
    display: grid;
    grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
    align-items: center;
    gap: clamp(2rem, 4vw, 5.5rem);
    padding-block: clamp(2.5rem, 4.2vw, 5rem);
}
.section-label {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: var(--accent);
    font: 600 .8rem/1.5 var(--mono);
    letter-spacing: .1em;
    text-transform: uppercase;
}
.section-label::before { content: ""; width: 1.7rem; height: 2px; background: currentColor; flex-shrink: 0; }
.studio-hero h1 {
    margin-block: 1.05rem 1.35rem;
    font-size: clamp(2.75rem, 5.3vw, 5.8rem);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -.055em;
}
.hero-intro { max-width: 27em; color: var(--muted); font-size: clamp(1rem, 1.18vw, 1.17rem); line-height: 1.85; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem 1.65rem; margin-top: clamp(1.45rem, 2.4vw, 2.3rem); }
.primary-link, .text-link { display: inline-flex; align-items: center; min-height: 2.9rem; font-weight: 700; }
.public-site .primary-link { padding: .65rem 1.42rem; background: var(--accent); color: #fff; text-decoration: none; border-radius: 2px; }
.primary-link:hover { background: #8f2f1b; }
.public-site .text-link { text-decoration-thickness: 1px; text-underline-offset: .42em; }
.text-link:hover { color: var(--accent); }
.storefront-error { padding-block: clamp(4rem, 10vw, 9rem); }
.storefront-error h1 { margin: .75rem 0; font-size: clamp(2rem, 4.6vw, 4rem); line-height: 1.23; }
.storefront-error > p:not(.section-label) { color: var(--muted); }
.assembly-plate { margin: 0; }
.assembly-plate img { width: 100%; height: auto; background: #e3ddd4; }
.assembly-plate figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; margin-top: .6rem; padding-top: .48rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .82rem; }
.assembly-plate figcaption [lang="en"] { font: .77rem/1.4 var(--mono); }

.expertise-section { scroll-margin-top: 1rem; background: #252824; color: #f6f5f0; padding-block: clamp(3rem, 5.2vw, 5.4rem); }
.expertise-viewer {
    display: grid;
    grid-template-columns: minmax(0, 1.07fr) minmax(0, .93fr);
    grid-template-rows: auto repeat(3, minmax(3.8rem, auto));
    align-content: start;
    column-gap: clamp(2.5rem, 6vw, 6.7rem);
    position: relative;
}
.expertise-heading { grid-area: 1 / 2; align-self: end; padding-bottom: 1.4rem; }
.expertise-heading .section-label { color: #f1a187; }
.expertise-heading h2, .story-copy h2, .clients-section h2 { margin-top: .5rem; font-size: clamp(2rem, 3.2vw, 3.6rem); font-weight: 750; line-height: 1.23; letter-spacing: -.045em; }
.discipline-radio { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.discipline-choice { display: grid; grid-template-columns: auto 1fr 1rem; align-items: center; gap: .85rem; padding: .7rem .12rem; border-top: 1px solid #62655e; color: #d5d5cb; cursor: pointer; }
.choice-circuit { grid-area: 2 / 2; }
.choice-uav { grid-area: 3 / 2; }
.choice-ipc { grid-area: 4 / 2; border-bottom: 1px solid #62655e; }
.discipline-choice strong { font-size: clamp(1.1rem, 1.6vw, 1.55rem); line-height: 1.4; }
.discipline-choice span { font: .81rem/1.5 var(--mono); color: #c4c6bc; }
.discipline-choice::after { content: ""; width: .72rem; height: .72rem; justify-self: end; border: 1px solid #a8aaa0; border-radius: 50%; }
.discipline-choice:hover, .discipline-radio:checked + label { color: #fff; }
.discipline-radio:checked + label::after { background: #f38460; border-color: #f38460; box-shadow: inset 0 0 0 2px #252824; }
.discipline-radio:focus-visible + label { outline: 2px solid #ffad91; outline-offset: 4px; }
.discipline-panel { grid-area: 1 / 1 / 5 / 2; display: none; align-self: stretch; margin: 0; }
.discipline-radio:checked + label + .discipline-panel { display: grid; grid-template-rows: 1fr auto; }
.discipline-panel img { width: 100%; height: 100%; aspect-ratio: 2.08; object-fit: cover; }
.discipline-panel picture { display: block; min-height: 0; }
#circuit-notes img { object-position: 79% center; }
#ipc-notes img { object-fit: contain; background: #d9ddd6; }
.discipline-panel figcaption { margin-top: .68rem; color: #e2e2da; font-size: 1rem; line-height: 1.65; }

.story-section { padding-block: clamp(3.2rem, 6vw, 6.5rem); }
.story-inner { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); grid-template-areas: "story photo"; align-items: center; gap: clamp(2.8rem, 8vw, 9rem); }
.story-photo { grid-area: photo; width: 100%; height: auto; aspect-ratio: 1.78; object-fit: cover; }
.story-copy { grid-area: story; }
.story-copy > p:not(.section-label) { margin: 1.2rem 0 .8rem; color: var(--muted); line-height: 1.95; }
.clients-section { border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(10rem, .7fr) 2fr; align-items: center; gap: 2rem; padding-block: clamp(2.7rem, 5vw, 5.2rem); }
.client-gallery { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(.45rem, 1vw, 1rem); }
.client-gallery img { width: 100%; height: auto; }

.site-footer { background: #20221f; color: #f6f5f0; }
.footer-main, .footer-base { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer-main { padding-block: clamp(2.5rem, 4.4vw, 4.25rem) clamp(1.8rem, 3.2vw, 3.2rem); }
.footer-company { display: grid; justify-items: start; gap: .45rem; }
.footer-name { font-size: clamp(1.27rem, 2vw, 1.75rem); font-weight: 700; letter-spacing: .04em; line-height: 1.5; text-decoration: none; }
.footer-company .footer-email { color: #d3cfc6; font-size: .93rem; line-height: 1.6; text-decoration-color: #797a70; overflow-wrap: anywhere; }
.footer-main nav, .footer-base nav { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem clamp(1rem, 2.4vw, 2.4rem); }
.footer-main nav a, .footer-base a { text-decoration: none; padding-block: .45rem; }
.footer-main nav a { font-weight: 600; }
.site-footer a:hover, .site-footer a[aria-current="page"] { color: #ffa78c; text-decoration: underline; }
.footer-base { border-top: 1px solid #53554c; padding-block: 1.15rem 1.35rem; color: #c2c2b7; }
.footer-base a { font-size: .9rem; }
.footer-base small { font: .8rem/1.5 var(--mono); }

@media (max-width: 55rem) {
    .studio-hero { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 1.7rem; }
    .expertise-viewer { column-gap: 2rem; }
    .discipline-choice { grid-template-columns: 1fr 1rem; gap: .1rem .5rem; }
    .discipline-choice span { grid-column: 1; }
    .discipline-choice::after { grid-area: 1 / 2 / span 2; }
}
@media (max-width: 48rem) {
    .site-wrap { width: 90%; }
    .header-inner { min-height: 4.2rem; flex-wrap: wrap; gap: 0 1rem; padding-block: .6rem; }
    .brand img { width: 2.35rem; height: 2.35rem; }
    .brand-type strong { font-size: 1.19rem; }
    .site-nav { width: 100%; gap: .2rem 1rem; flex-wrap: wrap; border-top: 1px solid #505149; padding-block: .65rem .15rem; margin-top: .65rem; }
    .menu-toggle:not([hidden]) + .site-nav { display: grid; grid-template-columns: 1fr 1fr; }
    .site-nav a { padding: .7rem; text-align: center; justify-content: center; }
    .nav-link::after { left: 30%; right: 30%; }
    .hero-actions { gap: .5rem 1.1rem; }
    .story-inner { gap: 2rem; }
    .clients-section { grid-template-columns: 1fr; gap: 1.4rem; }
}
@media (max-width: 42rem) {
    .studio-hero { grid-template-columns: 1fr; gap: 1.5rem; padding-block: 2.2rem 2rem; }
    .studio-hero h1 { font-size: clamp(2.75rem, 10.4vw, 4.25rem); margin-block: .7rem .9rem; }
    .hero-intro { max-width: 30em; }
    .hero-actions { margin-top: 1rem; }
    .expertise-section { padding-block: 2.55rem; }
    .expertise-viewer { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto auto; column-gap: 0; }
    .expertise-heading { grid-area: 1 / 1 / 2 / 4; padding-bottom: 1.2rem; }
    .discipline-choice { display: flex; align-items: center; justify-content: center; padding: .55rem .12rem; min-height: 3rem; border: 1px solid #70736b; text-align: center; }
    .discipline-choice strong { font-size: 1rem; }
    .discipline-choice span, .discipline-choice::after { display: none; }
    .discipline-radio:checked + label { color: #242622; background: #f4f1e6; }
    .choice-circuit { grid-area: 2 / 1; }
    .choice-uav { grid-area: 2 / 2; border-inline: 0; }
    .choice-ipc { grid-area: 2 / 3; }
    .discipline-panel { grid-area: 3 / 1 / 4 / 4; margin-top: 1rem; }
    .discipline-panel img { height: auto; aspect-ratio: 1.75; }
    .story-inner { grid-template-columns: 1fr; grid-template-areas: "story" "photo"; gap: 1.2rem; }
    .client-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .footer-main, .footer-base { align-items: start; flex-direction: column; gap: .9rem; }
    .footer-main { padding-top: 2rem; }
    .footer-base { flex-direction: column-reverse; }
    .footer-base nav { gap: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .nav-link::after { transition: none; }
}
