/* Millers Tech Solutions — option A, "Signal". Tokens first; everything below reads them. */

@font-face { font-family: "General Sans"; src: url("../fonts/general-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("../fonts/general-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("../fonts/general-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("../fonts/general-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  /* colour: one ground, one ink, one accent (the green of a status light that stays on). Light is the default. */
  --bg: #f1f5ec;
  --surface: #e6ecdf;
  --surface-2: #d9e1d1;
  --ink: #0b120d;
  --muted: #46524a;
  --faint: #657267;
  --accent: #b9f53c;
  --accent-ink: #0a0f0c;
  --accent-text: #2a6410;
  --net-ink: 11, 18, 13;
  --net-accent: 60, 140, 20;
  --frame: #050705;
  --laptop: #b4bfb1;
  --laptop-notch: #98a596;
  --danger: #ff9d8c;
  --shadow: 0 32px 64px -28px rgba(20, 40, 20, 0.45);

  /* type: one family, five steps */
  --font: "General Sans", "Helvetica Neue", Arial, sans-serif;
  --font-ja-system: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-statement: clamp(1.25rem, 1rem + 1.25vw, 2.125rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-big: clamp(2.5rem, 6vw, 6rem);
  --step-display: clamp(2.125rem, 9.2vw, 9.25rem);

  /* space: 8px base */
  --m: clamp(1.25rem, 3vw, 2.5rem);
  --gap: clamp(1rem, 2vw, 2rem);
  --section: clamp(6rem, 13vw, 12rem);
  --nav-h: 4.5rem;
  --r-frame: 12px;

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
  --t-open: 1200ms;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0f0c;
  --surface: #121a15;
  --surface-2: #1b251e;
  --ink: #eef3ec;
  --muted: #a7b3a9;
  --faint: #76867b;
  --accent-text: #b9f53c;
  --net-ink: 238, 243, 236;
  --net-accent: 185, 245, 60;
  --laptop: #2c372f;
  --laptop-notch: #1b241e;
  --shadow: 0 32px 64px -24px rgba(0, 0, 0, 0.7);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav-h); scrollbar-color: var(--faint) var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-body)/1.5 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
h1, h2, h3, p, ol, ul, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ol, ul { list-style: none; }
fieldset { border: 0; min-width: 0; }
img, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 2px; }
.contact :focus-visible { outline-color: currentColor; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.skip { position: absolute; left: var(--m); top: -4rem; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 0.75rem 1rem; font-weight: 600; text-decoration: none; }
.skip:focus { top: 0.5rem; }

.wrap { padding-inline: var(--m); width: 100%; max-width: 110rem; margin-inline: auto; }

/* Type roles */
.display { font-weight: 700; font-size: var(--step-display); line-height: 0.94; letter-spacing: -0.035em; }
.head { font-weight: 700; font-size: var(--step-head); line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }
.lead { font-size: var(--step-lead); line-height: 1.35; max-width: 34ch; text-wrap: pretty; }
.statement { font-size: var(--step-statement); line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; max-width: 30ch; text-wrap: pretty; }

/* Buttons: one shape, fully round */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.6rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: var(--step-body); text-decoration: none; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: scale(0.96); }
.btn:disabled, .btn:disabled:hover { background: var(--surface-2); color: var(--muted); cursor: progress; transform: none; }
.btn--small { min-height: 2.75rem; padding: 0 1.15rem; font-size: var(--step-small); }
.btn--ghost { background: var(--surface-2); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--ink { background: var(--accent-ink); color: var(--accent); }
.btn--ink:hover { background: #24301f; color: var(--accent); }

/* Nav: a plain bar. Clear over the hero; once the page moves it turns solid, a tone off the ground and off the
   tinted sections it passes over. Its own controls then take the ground colour so they still read as chips. */
.nav { --chip: var(--surface-2); position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding-inline: var(--m); }
.nav.is-stuck, .nav.is-open { --chip: var(--bg); }
.nav::before { content: ""; position: absolute; inset: 0; background: var(--surface-2); opacity: 0; transition: opacity var(--t-ui) ease; z-index: -1; }
.nav.is-stuck::before, .nav.is-open::before { opacity: 1; }
.nav.is-open::after { content: ""; position: fixed; inset: 0; z-index: -2; background: rgba(6, 10, 7, 0.5); }
@media (prefers-reduced-motion: reduce) { .nav::before { transition: none; } }
.brand { display: inline-flex; flex: none; align-items: center; gap: 0.5rem; min-height: 2.75rem; font-weight: 700; font-size: var(--step-body); letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.brand__mark { fill: currentColor; flex: none; }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.72); } }
.nav__links { display: none; gap: clamp(1rem, 2.4vw, 2.25rem); }
.nav__links a, .foot__nav a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: var(--step-small); font-weight: 500; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.35em; text-decoration-thickness: 0.09em; transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease; }
.nav__links a:hover, .nav__links a[aria-current="true"], .foot__nav a:hover { text-decoration-color: var(--accent-text); }
.nav__end { display: flex; align-items: center; gap: 0.25rem; }
.nav__cta { display: none; }
.theme { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 999px; transition: background-color var(--t-hover) ease, transform var(--t-ui) var(--ease-out); }
.theme:hover { background: var(--chip); }
.theme:active { transform: rotate(180deg) scale(0.92); }

/* Language: two words; the current one is underlined the way the current section is */
.lang { display: flex; align-items: center; font-size: var(--step-small); font-weight: 500; color: var(--faint); }
.lang button { min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.4rem; color: var(--muted); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.35em; text-decoration-thickness: 0.09em; transition: text-decoration-color var(--t-hover) ease, color var(--t-hover) ease; }
.lang button:hover, .lang button[aria-pressed="true"] { color: var(--ink); }
.lang button[aria-pressed="true"] { text-decoration-color: var(--accent-text); }
/* On the English page the word 日本語 comes from a three-character file, so the full Japanese subset is not downloaded */
@font-face { font-family: "Noto Sans JP Label"; src: url("../fonts/noto-sans-jp-label.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
html:not(:lang(ja)) .lang [lang="ja"] { font-family: "Noto Sans JP Label", var(--font-ja-system); }
.lang--bar { display: none; margin-right: 0.25rem; }

/* Phone menu: one button, and the links drop from the bar as one surface. Needs script; without it the footer carries the links. */
.menu-btn { display: none; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.9rem; border-radius: 999px; background: var(--chip); font-size: var(--step-small); font-weight: 600; white-space: nowrap; transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.js .menu-btn { display: inline-flex; }
.menu-btn[aria-expanded="true"] { background: var(--ink); color: var(--bg); }
@media (hover: hover) { .menu-btn:hover { background: var(--ink); color: var(--bg); } }
.menu-btn:active { transform: scale(0.96); }
.menu { position: absolute; inset: 100% 0 auto 0; max-height: calc(100svh - var(--nav-h)); overflow-y: auto; overscroll-behavior: contain; padding: 0.25rem var(--m) 1.25rem; background: var(--surface-2); border-radius: 0 0 16px 16px; }
.menu[hidden] { display: none; }
.menu__links { display: grid; }
.menu__links a { display: flex; align-items: center; min-height: 3.5rem; font-weight: 700; font-size: var(--step-head); line-height: 1.1; letter-spacing: -0.03em; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.18em; text-decoration-thickness: 0.07em; }
.menu__links a[aria-current="true"] { text-decoration-color: var(--accent-text); }
.menu .lang { margin: 0.75rem 0 0 -0.4rem; }
.motion .menu:not([hidden]) { animation: menu-in var(--t-ui) var(--ease-out); }
@keyframes menu-in { from { opacity: 0; transform: translate3d(0, -0.5rem, 0); } }
@media (min-width: 30rem) {
  .nav__end { gap: 0.5rem; }
  .nav__cta { display: inline-flex; }
}
@media (min-width: 56rem) {
  .nav { gap: var(--gap); }
  .nav__links, .lang--bar { display: flex; }
  .js .menu-btn, .menu, .nav.is-open::after { display: none; }
}

/* Hero */
.hero { position: relative; min-height: 100svh; padding-top: calc(var(--nav-h) + clamp(1.5rem, 5vh, 4rem)); padding-bottom: clamp(3rem, 8vh, 6rem); overflow: clip; }
.hero__net { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__in { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(2rem, 5vh, 3.5rem); }
.hero__title { grid-column: 1 / -1; font-size: clamp(2.5rem, 11.7vw, 13.75rem); line-height: 0.92; }
.hero__title .line { display: block; overflow: clip; padding-bottom: 0.1em; margin-bottom: -0.1em; white-space: nowrap; }
.hero__title .w { display: inline-block; }
.hero__copy { grid-column: 1 / -1; display: grid; gap: 1.75rem; align-content: start; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__devices { grid-column: 1 / -1; position: relative; padding-bottom: 8%; padding-right: 6%; }
.hero__devices .frame--phone { position: absolute; right: 0; bottom: 0; width: 27%; }
@media (min-width: 56rem) {
  .hero__copy { grid-column: 1 / span 5; padding-top: 1rem; }
  .hero__devices { grid-column: 7 / -1; padding-bottom: 7%; padding-right: 0; padding-left: 9%; }
  .hero__devices .frame--phone { right: auto; left: 0; width: 22%; }
}

/* Device frames for real product screenshots */
.frame { position: relative; background: var(--frame); box-shadow: var(--shadow); /* taste-skill-ignore: a device frame floats over the page; owner brief asks for depth */ }
.frame img { width: 100%; }
.frame--browser { border-radius: var(--r-frame); overflow: clip; }
.frame__bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.9rem; background: #1a211c; color: #b8c2b9; font-size: var(--step-small); line-height: 1.2; font-weight: 500; }
.frame__bar i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #3a463d; }
.frame__bar span { margin-left: 0.6rem; }
.frame--phone { padding: 2.4%; border-radius: 13% / 6.2%; }
.frame--phone img { border-radius: 11% / 5.2%; }
.framed img { width: 100%; border-radius: 12% / 5.8%; box-shadow: var(--shadow); /* taste-skill-ignore: a device frame floats over the page; owner brief asks for depth */ }

/* Statement: type only */
.band { padding-block: var(--section) 0; }
.band__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 1.5rem; align-items: end; }
.band__in .head { grid-column: 1 / -1; font-size: var(--step-big); line-height: 0.95; }
.band__in .statement { grid-column: 1 / -1; }
@media (min-width: 56rem) {
  .band__in .head { grid-column: 1 / span 6; }
  .band__in .statement { grid-column: 7 / -1; padding-bottom: 0.4rem; max-width: 34ch; }
}

/* Services: each line is shown by one of our own product screens */
.svc { padding-block: var(--section); }
.svc__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.svc__list { grid-column: 1 / -1; }
.svc__items { margin-top: clamp(2.5rem, 6vw, 5rem); display: grid; gap: clamp(3rem, 6vw, 4.5rem); }
.svc__name { font-weight: 700; font-size: var(--step-big); line-height: 0.95; letter-spacing: -0.035em; transition: color var(--t-ui) ease; }
.svc__item p { margin-top: 1rem; max-width: 44ch; }
.svc__inline { margin-top: 2rem; }
.svc__inline--wide { max-width: 34rem; }
.svc__inline--tall { width: min(46%, 11rem); }
.svc__stage { display: none; }
@media (min-width: 56rem) {
  .svc__list { grid-column: 1 / span 7; }
  .svc__inline { display: none; }
  .svc__item .svc__name { color: var(--faint); }
  .svc__item.is-on .svc__name { color: var(--ink); }
  .svc__stage { display: block; grid-column: 8 / -1; }
  .svc__frame { position: sticky; top: calc(var(--nav-h) + 12vh); height: min(55svh, 34rem); display: grid; place-items: center; }
  .svc__shot { grid-area: 1 / 1; width: 100%; opacity: 0; transform: translate3d(0, 1.5rem, 0) scale(0.97); transition: opacity 450ms ease, transform 800ms var(--ease-expo); }
  .svc__shot--tall { width: min(42%, 22svh); }
  .svc__shot.is-on { opacity: 1; transform: none; }
}

/* Status label */
.status { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; font-size: var(--step-body); color: var(--accent-text); }
.status__dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: currentColor; flex: none; }
.status__dot--open { background: none; border: 2px solid currentColor; }
.motion .status__dot--pulse { animation: beat 1.8s var(--ease-in-out) infinite; }

/* Projects: one at a time in a device frame. Without script it is a plain list of all of them. */
.work { padding-block: var(--section); background: var(--surface); overflow-x: clip; }
.car { position: relative; margin-top: clamp(2.5rem, 6vw, 4.5rem); --sw: 100%; --col-gap: 0px; }
.car__list { display: grid; gap: clamp(5rem, 12vw, 8rem); }
.proj { display: grid; gap: 2rem; align-items: center; }
.proj__stage { position: relative; aspect-ratio: 16 / 10.4; display: grid; place-items: center; padding-inline: 7%; }
.laptop { width: 100%; }
.laptop__screen { background: var(--frame); padding: 1.8% 1.8% 2.4%; border-radius: 14px 14px 0 0; box-shadow: var(--shadow); /* taste-skill-ignore: a device frame floats over the page; owner brief asks for depth */ }
.laptop__screen img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 0; border-radius: 4px; }
.laptop__base { position: relative; height: clamp(8px, 1.2vw, 16px); margin-inline: -7%; background: var(--laptop); border-radius: 2px 2px 14px 14px; }
.laptop__base::before { content: ""; position: absolute; left: 43%; right: 43%; top: 0; height: 40%; background: var(--laptop-notch); border-radius: 0 0 6px 6px; }
.proj__stage .frame--phone { position: absolute; right: 2.5%; bottom: 0; width: 15.5%; }
.proj--phone .proj__stage { display: flex; justify-content: center; gap: 5%; }
.proj--phone .framed { height: 100%; }
.proj--phone .framed img { height: 100%; width: auto; }
.proj__text { display: grid; gap: 1rem; align-content: start; justify-items: start; }
.proj__name { font-weight: 700; font-size: var(--step-head); line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }
.proj__type { color: var(--muted); font-weight: 500; }
.proj__text p { max-width: 44ch; }
.proj__text .status { background: var(--surface-2); padding: 0.45rem 1rem 0.45rem 0.8rem; border-radius: 999px; font-size: var(--step-small); }
.proj__more { margin-top: 0.5rem; background: var(--ink); color: var(--bg); }
.proj__more:hover { background: var(--accent); color: var(--accent-ink); }
.car__nav, .car__dots { display: none; }
@media (min-width: 56rem) {
  .car { --col-gap: calc(var(--gap) * 2.5); --sw: calc((100% - var(--col-gap)) * 0.62); }
  .proj { grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); column-gap: var(--col-gap); }
}

/* With script: the projects share one cell and take turns */
.js .car__list { gap: 0; }
.js .proj { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 450ms ease, visibility 0s linear 450ms; }
.js .proj.is-on { opacity: 1; visibility: visible; transition-delay: 0s; }
.js .car__nav { display: flex; align-items: center; justify-content: space-between; position: absolute; left: 0; top: 0; width: var(--sw); aspect-ratio: 16 / 10.4; pointer-events: none; }
.car__arrow { pointer-events: auto; width: 3.25rem; height: 3.25rem; display: grid; place-items: center; border-radius: 999px; background: var(--ink); color: var(--bg); transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease; }
.car__arrow:hover { background: var(--accent); color: var(--accent-ink); }
.car__arrow:active { transform: scale(0.92); }
.js .car__dots { display: flex; margin-top: 1.25rem; margin-left: calc(var(--sw) + var(--col-gap) - 1rem); }
.car__dots button { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; }
.car__dots button::before { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 999px; background: var(--faint); transition: width var(--t-ui) var(--ease-out), background-color var(--t-hover) ease; }
.car__dots button:hover::before { background: var(--ink); }
.car__dots button[aria-current="true"]::before { width: 1.75rem; background: var(--accent-text); }
@media (max-width: 55.99rem) {
  .js .car__dots { margin-left: -1rem; justify-content: flex-start; }
  .car__arrow { width: 2.75rem; height: 2.75rem; }
}
.motion .proj .proj__stage { transform: translate3d(calc(var(--dir, 1) * 5%), 0, 0) scale(0.985); transition: transform 800ms var(--ease-expo); }
.motion .proj.is-on .proj__stage { transform: none; }
.motion .proj .proj__text > * { opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-expo); }
.motion .proj.is-on .proj__text > * { opacity: 1; transform: none; }
.motion .proj.is-on .proj__text > :nth-child(2) { transition-delay: 60ms; }
.motion .proj.is-on .proj__text > :nth-child(3) { transition-delay: 120ms; }
.motion .proj.is-on .proj__text > :nth-child(4) { transition-delay: 180ms; }
.motion .proj.is-on .proj__text > :nth-child(5) { transition-delay: 240ms; }

/* Project detail: a small dialog, closed with Esc, the button or a click outside */
.sheet { inset: 0 0 0 auto; margin: 0; width: min(34rem, 100vw); height: 100%; max-height: 100%; max-width: 100vw; padding: clamp(1.5rem, 4vw, 2.5rem); padding-top: clamp(1.5rem, 6vh, 4rem); border: 0; border-radius: 16px 0 0 16px; background: var(--bg); color: var(--ink); overflow-y: auto; box-shadow: var(--shadow); /* taste-skill-ignore: a side sheet floats */ }
.sheet::backdrop { background: rgba(6, 10, 7, 0.72); }
.motion .sheet[open] { animation: sheet-in 420ms var(--ease-expo); }
@keyframes sheet-in { from { transform: translate3d(100%, 0, 0); } }
@media (max-width: 40rem) { .sheet { border-radius: 0; } }
.sheet__head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.sheet__title { font-weight: 700; font-size: var(--step-head); line-height: 1; letter-spacing: -0.03em; }
.sheet__close { flex: none; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 999px; background: var(--surface-2); transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.sheet__close:hover { background: var(--ink); color: var(--bg); }
.sheet__close:active { transform: scale(0.92); }
.sheet__body { margin-top: 2rem; display: grid; gap: 1.5rem; }
.sheet__body dt { font-weight: 600; font-size: var(--step-small); color: var(--muted); }
.sheet__body dd { margin-top: 0.35rem; max-width: 52ch; }

/* Hosting, security, support: type only */
.stack { padding-block: var(--section); }
.stack__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 3rem; align-items: start; }
.stack__lede, .stack__text { grid-column: 1 / -1; }
.stack__lede .lead { margin-top: 1.5rem; }
.facts { display: grid; gap: 2.5rem var(--gap); }
.facts dt { font-weight: 600; font-size: var(--step-lead); line-height: 1.2; letter-spacing: -0.01em; }
.facts dd { margin-top: 0.5rem; color: var(--muted); max-width: 34ch; }
@media (min-width: 40rem) { .facts { grid-template-columns: 1fr 1fr; } }
@media (min-width: 56rem) {
  .stack__lede { grid-column: 1 / span 5; }
  .stack__text { grid-column: 7 / -1; padding-top: 0.6rem; }
}

/* How we work. At rest: four statements in a column. With motion: one held stage of type. */
.how { position: relative; background: var(--surface); padding-bottom: var(--section); }
.how__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem var(--gap); padding-block: var(--section) 1rem; }
.how__nav { display: none; }
.step { padding-block: clamp(1.5rem, 4vw, 3rem); }
.step__in { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 1rem; align-items: end; }
.step__word { grid-column: 1 / -1; font-size: clamp(3.25rem, 21vw, 23rem); line-height: 0.82; overflow: clip; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.step__in .statement { grid-column: 1 / -1; }
.how__bar { display: none; }
@media (min-width: 56rem) {
  .step__in .statement { grid-column: 1 / span 7; order: -1; max-width: 36ch; }
}
.motion .how { height: 320svh; padding-bottom: 0; }
.motion .how__stage { position: sticky; top: 0; height: 100svh; overflow: clip; }
.motion .how__head { position: absolute; inset: var(--nav-h) 0 auto 0; z-index: 3; padding-block: clamp(1rem, 5vh, 3rem) 0; }
.motion .how__nav { display: flex; gap: 0.25rem; }
.how__nav button { min-height: 2.75rem; padding: 0 0.9rem; border-radius: 999px; font-weight: 600; font-size: var(--step-small); color: var(--muted); transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.how__nav button:hover { color: var(--ink); }
.how__nav button:active { transform: scale(0.95); }
.how__nav button[aria-current="step"] { background: var(--accent); color: var(--accent-ink); }
.motion .step { position: absolute; inset: 0; display: grid; align-items: end; padding-block: 0 clamp(3rem, 11vh, 7rem); visibility: hidden; transition: visibility 0s linear 400ms; }
.motion .step.is-on { visibility: visible; z-index: 2; transition-delay: 0s; }
.motion .step__word { opacity: 0; transform: translate3d(0, 40%, 0); transition: transform 900ms var(--ease-expo), opacity 400ms ease; }
.motion .step .statement { opacity: 0; transform: translate3d(0, 1.5rem, 0); transition: transform 900ms var(--ease-expo) 120ms, opacity 500ms ease 120ms; }
.motion .step.is-on .step__word, .motion .step.is-on .statement { opacity: 1; transform: none; }
.motion .how__bar { display: block; position: absolute; inset: auto 0 0 0; z-index: 3; height: 4px; background: var(--surface-2); }
.how__bar span { display: block; height: 100%; background: var(--accent-text); transform-origin: 0 50%; transform: scaleX(var(--hp, 0)); }

/* Contact: the accent as a whole field, with a dark form panel on it */
.contact { background: var(--accent); color: var(--accent-ink); padding-block: var(--section) clamp(3rem, 8vw, 6rem); --accent-text: #0a0f0c; }
.contact__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: 3rem; align-items: start; }
.contact__lede { grid-column: 1 / -1; }
.contact__lede .lead { margin-top: 1.5rem; }
.direct { margin-top: clamp(2rem, 5vw, 3.5rem); }
.direct__title { font-weight: 600; font-size: var(--step-lead); line-height: 1.2; }
.direct__row { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.panel { grid-column: 1 / -1; --bg: #0a0f0c; --ink: #eef3ec; --muted: #a7b3a9; --surface-2: #1b251e; --field: #18211b; --accent-text: #b9f53c; background: var(--bg); color: var(--ink); border-radius: 16px; padding: clamp(1.25rem, 3vw, 2.5rem); }
.form { display: grid; gap: 1.25rem; }
.form__row { display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.45rem; align-content: start; }
.field label, .quick legend { font-weight: 500; font-size: var(--step-small); padding: 0; }
.field__opt { color: var(--muted); font-weight: 400; }
.field input, .field textarea { width: 100%; min-height: 3rem; padding: 0.75rem 0.9rem; border: 2px solid transparent; border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; caret-color: var(--accent); transition: border-color var(--t-hover) ease, background-color var(--t-hover) ease; }
.field textarea { resize: vertical; min-height: 8rem; line-height: 1.45; }
.field input:hover, .field textarea:hover { background: #1d2821; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--accent); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field__err { color: var(--danger); font-size: var(--step-small); }
.quick { display: grid; gap: 0.6rem; }
.quick legend { margin-bottom: 0.6rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1rem; border-radius: 999px; background: var(--field); font-weight: 500; font-size: var(--step-small); transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out); }
.chip:hover span { background: #26332a; }
.chip input:active + span { transform: scale(0.95); }
.chip input:checked + span { background: var(--accent); color: var(--accent-ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.form__end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.form__privacy { color: var(--muted); font-size: var(--step-small); }
/* Honeypot for the contact form: off screen, out of the tab order and hidden from assistive technology */
.hp { position: absolute; left: -9999px; }
.fail { display: grid; gap: 0.35rem; padding: 1rem 1.15rem; border-radius: 10px; background: var(--surface-2); }
.fail__title { font-weight: 600; color: var(--danger); }
.fail a { color: var(--accent-text); font-weight: 600; text-underline-offset: 0.2em; }
.sent { display: grid; gap: 1.25rem; justify-items: start; padding-block: clamp(1rem, 4vw, 3rem); }
.sent[hidden], .form[hidden], .fail[hidden] { display: none; }
.sent:focus { outline: none; }
.sent__title { font-weight: 700; font-size: var(--step-head); line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }
.sent p { max-width: 40ch; }
.motion .sent, .motion .fail { animation: state-in 400ms var(--ease-out); }
@keyframes state-in { from { opacity: 0; transform: translate3d(0, 8px, 0); } }
.mail { grid-column: 1 / -1; margin-top: clamp(1rem, 4vw, 3rem); font-weight: 700; font-size: clamp(1.5rem, 7.1vw, 4.5rem); line-height: 0.95; letter-spacing: -0.035em; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; transition: text-decoration-color var(--t-ui) ease; }
.mail span { display: block; }
.mail:hover { text-decoration-color: currentColor; }
@media (min-width: 40rem) { .form__row { grid-template-columns: 1fr 1fr; } }
@media (min-width: 56rem) {
  .contact__lede { grid-column: 1 / span 5; }
  .panel { grid-column: 7 / -1; }
  .mail { font-size: 5.7vw; white-space: nowrap; }
  .mail span { display: inline; }
}
@media (min-width: 110rem) { .mail { font-size: 6.2rem; } }

/* Intro: added by script on the first visit of a session, never under reduced motion. Over in about 1.1s. */
.loader { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; color: var(--ink); animation: curtain 420ms var(--ease-in-out) 760ms forwards; }
.loader.is-fly { animation: none; pointer-events: none; }
.loader__bg { position: absolute; inset: 0; background: var(--bg); }
.loader__in { position: relative; }
.loader__name { transform-origin: 0 0; white-space: nowrap; }
.loader__in { display: grid; justify-items: center; gap: 1.25rem; }
.loader__net { width: min(62vw, 30rem); height: auto; overflow: visible; }
.loader__net path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 520; stroke-dashoffset: 520; animation: draw 620ms var(--ease-out) forwards; }
.loader__net path + path { animation-delay: 140ms; }
.loader__net circle { fill: var(--accent-text); opacity: 0; animation: pop 260ms var(--ease-out) forwards; animation-delay: calc(80ms + var(--n, 0) * 55ms); }
.loader__net circle:nth-of-type(2) { --n: 1; } .loader__net circle:nth-of-type(3) { --n: 2; } .loader__net circle:nth-of-type(4) { --n: 3; }
.loader__net circle:nth-of-type(5) { --n: 4; } .loader__net circle:nth-of-type(6) { --n: 5; } .loader__net circle:nth-of-type(7) { --n: 3; } .loader__net circle:nth-of-type(8) { --n: 5; }
.loader__name { font-weight: 700; font-size: var(--step-head); line-height: 1; letter-spacing: -0.03em; overflow: clip; padding-bottom: 0.1em; }
.loader__name span { display: inline-block; transform: translate3d(0, 112%, 0); animation: rise 520ms var(--ease-expo) 160ms forwards; }
@keyframes curtain { to { transform: translate3d(0, -100%, 0); visibility: hidden; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
.loader__net circle { transform-box: fill-box; transform-origin: center; }
.intro.motion .hero__title .w { animation-delay: calc(560ms + var(--i) * 50ms); }
.intro.motion .hero [data-load] { animation-delay: calc(var(--d, 0ms) + 300ms); }

/* Footer */
.foot { background: var(--surface); padding-block: clamp(3rem, 8vw, 6rem) 2rem; }
.foot__name { font-weight: 700; font-size: 14.6vw; line-height: 0.9; letter-spacing: -0.04em; white-space: nowrap; color: var(--ink); }
@media (min-width: 110rem) { .foot__name { font-size: 15.6rem; } }
.foot__grid { margin-top: clamp(2.5rem, 6vw, 4.5rem); display: grid; gap: 2.5rem var(--gap); }
.foot__line { font-weight: 600; font-size: var(--step-lead); }
.foot__tag { font-size: var(--step-lead); color: var(--accent-text); font-weight: 500; margin-bottom: 1rem; }
.foot__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--gap); align-content: start; }
.foot__credits { margin-top: clamp(2.5rem, 6vw, 4rem); font-size: var(--step-small); color: var(--muted); max-width: 90ch; line-height: 1.6; }
.foot a { text-underline-offset: 0.25em; }
@media (min-width: 56rem) {
  .foot__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .foot__grid > div { grid-column: 1 / span 6; }
  .foot__nav { grid-column: 9 / -1; }
}

/* Entrances. Hidden states exist only when motion is on; the rest state is the finished page. */
.motion .hero__title .w { transform: translate3d(0, 112%, 0); animation: rise 900ms var(--ease-expo) forwards; animation-delay: calc(100ms + var(--i) * 70ms); }
.motion .hero [data-load] { opacity: 0; transform: translate3d(0, 16px, 0); animation: arrive 700ms var(--ease-out) forwards; animation-delay: var(--d, 0ms); }
@keyframes rise { to { transform: none; } }
@keyframes arrive { to { opacity: 1; transform: none; } }
.motion [data-r] { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-expo); transition-delay: calc(var(--i, 0) * 80ms); }
.motion [data-r].is-in { opacity: 1; transform: none; }
.motion [data-open] > img { clip-path: inset(0 0 100% 0); transition: clip-path var(--t-open) var(--ease-in-out); }
.motion [data-open].is-in > img { clip-path: inset(0 0 0 0); }
.motion .hero__devices .frame { transform: translate3d(0, calc(var(--sy, 0) * -1px), 0); will-change: transform; }

/* Japanese. General Sans has no kana or kanji: it stays first for Latin (the company and product names, figures),
   and Noto Sans JP follows. The file is a subset holding only the characters used in js/i18n.js
   (SIL OFL 1.1, fonts/noto-sans-jp-OFL.txt); anything outside it falls to the system face.
   Rebuild when the Japanese copy changes: Google Fonts css2, family=Noto+Sans+JP:wght@400;500;700&text=<characters>. */
@font-face { font-family: "Noto Sans JP"; src: url("../fonts/noto-sans-jp-subset.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root:lang(ja) {
  --font: "General Sans", "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  --step-head: clamp(1.75rem, 1.2rem + 2.6vw, 3.25rem);
  --step-big: clamp(2.125rem, 5vw, 4.75rem);
}
:root:lang(ja) body { line-height: 1.8; line-break: strict; word-break: auto-phrase; text-autospace: normal; }
:root:lang(ja) :is(.display, .head, .svc__name, .proj__name, .sheet__title, .sent__title, .menu__links a) { letter-spacing: -0.01em; font-feature-settings: "palt"; }
:root:lang(ja) :is(.head, .proj__name, .sheet__title, .sent__title, .menu__links a) { line-height: 1.2; }
/* The hero is sized from its longer line (決して、失敗しない。, about 8.52em set) so it always spans the measure and
   never clips. The comma closes the first phrase of that line; a little air after it keeps it off the next character. */
:root:lang(ja) .hero__title { font-size: clamp(1.625rem, calc((100vw - 2 * var(--m)) / 8.75), 10rem); line-height: 1.12; }
:root:lang(ja) .hero__title .w + .w { margin-left: 0.1em; }
:root:lang(ja) .band__in .head, :root:lang(ja) .svc__name { line-height: 1.15; }
:root:lang(ja) .step__word { font-size: clamp(3.25rem, 26vw, 20rem); line-height: 1.05; }
:root:lang(ja) .lead { line-height: 1.7; max-width: 24em; }
:root:lang(ja) .statement { line-height: 1.65; letter-spacing: 0; max-width: 22em; }
:root:lang(ja) :is(.svc__item p, .proj__text p) { max-width: 28em; }
:root:lang(ja) .facts dd { max-width: 22em; }
:root:lang(ja) .sheet__body dd { max-width: 32em; }
:root:lang(ja) .sent p { max-width: 26em; }
:root:lang(ja) :is(.facts dt, .direct__title, .foot__line, .foot__tag) { line-height: 1.4; }
:root:lang(ja) :is(.btn, .status, .chip span, .menu-btn, .how__nav button, .field label, .quick legend) { line-height: 1.3; }
/* メニュー is wider than Menu: a little less padding keeps the bar inside the margins at 320px */
:root:lang(ja) .menu-btn { padding-inline: 0.75rem; }
:root:lang(ja) :is(.field input, .field textarea) { font-family: "General Sans", var(--font-ja-system); }
@media (min-width: 56rem) {
  :root:lang(ja) .band__in .statement, :root:lang(ja) .step__in .statement { max-width: 24em; }
}
