/*
 * spacing scale: 4 / 8 / 12 / 16 / 24 / 32 / 40 / 48 / 64 / 80 / 112
 * type scale:    hero 88 / h2 36 (bands 26) / card h3 22 / step h3 16
 *                lead 15 / body 14 / small 12.5 / eyebrow 15 (bands 13)
 */

:root {
  --bg: #fcf9f3;
  --ink: #141414;
  --text: #333;
  --muted: #555;
  --line: #e9e2d6;
  --orange: #f04b22;
  --orange-hot: #fc4b1b;
  --script: #ee5426;
  --footer: #0c0d0f;
  --wrap: 1232px;
  --gutter: 40px;
  --section-gap: 80px;
  --en: Poppins, "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  overscroll-behavior-y: none;
  background: var(--footer);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
  font-weight: 500;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* short pages (form, thanks) keep the footer at the bottom */
body { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, p, figure, ol, ul { margin: 0; }

h1, h2, h3 { word-break: auto-phrase; text-wrap: balance; }

p { text-wrap: pretty; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* one shared grid for every section */
.wrap,
.wrap-mid,
.wrap-wide {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.eyebrow {
  color: var(--orange);
  font-family: var(--en);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.num {
  color: var(--orange);
  font-family: var(--en);
  font-weight: 500;
  line-height: 1;
}

.section-lead {
  color: var(--text);
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: 0.04em;
}

/* ---------- header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 30;
}

.header-inner {
  height: 74px;
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  display: flex;
  align-items: center;
}

.logo {
  font-family: Poppins, sans-serif;
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.02em;
  line-height: 1;
}

.header-inner > .logo { margin-top: -2px; }

.desktop-nav {
  margin-left: auto;
  margin-right: 196px;
  display: flex;
  align-items: center;
  gap: 40px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* keeps the labels legible where they cross the hero artwork */
.desktop-nav a {
  text-shadow: 0 0 2px var(--bg), 0 0 10px rgba(252, 249, 243, 0.9), 0 0 18px rgba(252, 249, 243, 0.7);
}

.desktop-nav a:hover { color: var(--orange); }

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 164px;
  height: 44px;
  border-radius: 999px;
  background: #121212;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: background 0.2s;
}

.header-inner > .header-cta { margin-top: -2px; }

.header-cta:hover { background: var(--orange); }

.arrow { width: 15px; height: 15px; }

.menu-btn {
  display: none;
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  transition: transform 0.15s;
}

.menu-btn:active { transform: scale(0.94); }

/* two bars that cross into an × when the panel is open */
.menu-btn span {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: #fff;
  transition: top 0.18s cubic-bezier(0.2, 0.7, 0.2, 1) 0.12s, transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.menu-btn span:first-child { top: 17px; }
.menu-btn span:last-child { top: 25px; }

.menu-btn[aria-expanded="true"] span {
  top: 21px;
  transition: top 0.18s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.22s cubic-bezier(0.2, 0.7, 0.2, 1) 0.12s;
}

.menu-btn[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

/* logo and the × stay above the full-screen panel */
.header-inner { position: relative; z-index: 1; }

.menu-panel {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 88px var(--gutter) calc(32px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0s 0.25s;
}

.menu-panel.is-open { opacity: 1; visibility: visible; transition: opacity 0.25s; }

html.is-menu-open,
html.is-menu-open body { overflow: hidden; }

.menu-list { margin: 0; padding: 0; list-style: none; }

.menu-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  border-bottom: 1px solid rgba(20, 20, 20, 0.12);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.menu-list li:first-child a { border-top: 1px solid rgba(20, 20, 20, 0.12); }

.menu-en {
  color: var(--orange);
  font-family: var(--en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.menu-panel .header-cta {
  justify-content: space-between;
  width: 100%;
  height: 56px;
  margin-top: 32px;
  padding: 0 24px 0 28px;
  font-size: 15px;
}

.menu-foot { margin-top: auto; padding-top: 40px; }

.menu-script {
  color: var(--script);
  font-family: "Square Peg", cursive;
  font-size: 44px;
  line-height: 1;
  transform: rotate(-8deg);
  transform-origin: left center;
}

.menu-meta {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
}

/* items rise in one after another */
.menu-list li,
.menu-panel .header-cta {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}

.is-open .menu-list li,
.is-open .header-cta { opacity: 1; transform: none; }

.is-open .menu-list li:nth-child(2) { transition-delay: 0.04s; }
.is-open .menu-list li:nth-child(3) { transition-delay: 0.08s; }
.is-open .menu-list li:nth-child(4) { transition-delay: 0.12s; }
.is-open .menu-list li:nth-child(5) { transition-delay: 0.16s; }
.is-open .header-cta { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .menu-panel, .menu-btn span, .menu-list li, .menu-panel .header-cta { transition: none !important; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  height: clamp(505px, 32vw + 44px, 580px);
}

.hero-art {
  position: absolute;
  top: 0;
  right: 0;
  /* width follows the artwork's 1.9:1 ratio so nothing is cropped at wide screens */
  width: clamp(950px, 50% + 230px, 1100px);
  height: 100%;
  /* soft left and bottom edges so the art never reads as a box */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18%), linear-gradient(180deg, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 18%), linear-gradient(180deg, #000 86%, transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  mix-blend-mode: darken;
}

.hero-script {
  position: absolute;
  left: 74px;
  top: 300px;
  color: var(--script);
  font-family: "Square Peg", cursive;
  font-size: 96px;
  line-height: 0.68;
  transform: rotate(-17deg);
  transform-origin: left top;
  -webkit-text-stroke: 0.6px var(--script);
  /* keeps the script legible where it crosses the photo */
  text-shadow: 0 0 2px var(--bg), 0 0 10px rgba(252, 249, 243, 0.9), 0 0 22px rgba(252, 249, 243, 0.7);
}

.hero-script span { display: block; }
.hero-script span + span { margin-left: 6px; }

.hero-copy {
  position: relative;
  z-index: 2;
  padding-top: clamp(88px, 16vw - 142px, 126px);
}

.hero-kicker {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.75;
  letter-spacing: 0.05em;
}

.hero-title {
  margin-top: 16px;
  margin-left: -3px;
  font-size: 88px;
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin-top: 24px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.05em;
}

/* ---------- services ---------- */

.services { position: relative; z-index: 2; padding-top: 56px; }

.services-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.services-head h2 { margin-top: 16px; }

.services-lead {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: 0.04em;
}

.service-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  overflow: hidden;
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 0 0 1px rgba(80, 60, 30, 0.06), 0 2px 4px rgba(60, 40, 10, 0.03), 0 12px 32px rgba(60, 40, 10, 0.06);
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-body { padding: 24px 28px 32px; }

.service-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.service-meta .num { font-size: 18px; }

.service-card h3 {
  margin-top: 12px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
}

.service-text {
  margin-top: 12px;
  color: #444;
  font-size: 14px;
  line-height: 1.8;
  letter-spacing: 0.03em;
}

/* ---------- what we do ---------- */

.wwd {
  position: relative;
  min-height: calc(var(--section-gap) + 340px);
  padding-top: var(--section-gap);
}

.wwd-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 400px 1fr;
}

.wwd h2 { margin-top: 16px; }
.wwd .section-lead { margin-top: 24px; }

.steps {
  list-style: none;
  width: 400px;
  padding: 0 0 0 40px;
  border-left: 1px solid var(--line);
}

.steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
}

.steps li + li { padding-top: 16px; }

.steps li:not(:last-child) div {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.steps .num { font-size: 18px; padding-top: 2px; }

.steps h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.04em;
}

.steps p {
  margin-top: 6px;
  color: #444;
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: 0.03em;
}

.wwd-art {
  position: absolute;
  top: var(--section-gap);
  right: 0;
  width: clamp(440px, calc(50% - 240px), 560px);
  height: 340px;
}

.wwd-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: darken;
}

.wwd-script {
  position: absolute;
  right: 56px;
  bottom: -32px;
  color: var(--script);
  font-family: "Square Peg", cursive;
  font-size: 52px;
  line-height: 0.74;
  transform: rotate(-14deg);
  -webkit-text-stroke: 0.5px var(--script);
  text-shadow: 0 0 2px var(--bg), 0 0 10px var(--bg), 0 0 20px rgba(252, 249, 243, 0.9);
}

.wwd-script span { display: block; }
.wwd-script span:nth-child(2) { margin-left: 38px; }
.wwd-script span:nth-child(3) { margin-left: 70px; }

/* ---------- results ---------- */

/* the page's one vermilion band: a strong accent between two cream sections */
.results {
  --plot: 220px;
  position: relative;
  overflow: hidden;
  margin-top: var(--section-gap);
  padding: 80px 0;
  color: #fff;
  background: linear-gradient(115deg, #d83a14 0%, #ec4a1e 55%, #f2621f 100%);
}

.results::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(16px, calc(max(var(--gutter), 50% - 616px) - 32px), 80px);
  aspect-ratio: 10 / 9;
  background: linear-gradient(135deg, #ffc531 0%, #ffb020 60%, transparent 61%);
}

.results::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 280px;
  height: 160px;
  background: linear-gradient(110deg, transparent 30%, #ffb020 52%, #ffc531 100%);
  clip-path: polygon(44% 100%, 100% 12%, 100% 100%);
}

.results-inner { position: relative; z-index: 1; }

.results-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
}

.results .eyebrow { color: #ffd27a; }
.results h2 { margin-top: 16px; color: #fff; }

.results-lead {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.95);
  font-size: 15px;
  line-height: 1.85;
  letter-spacing: 0.04em;
}

.results-case {
  margin: 0;
  display: grid;
  gap: 8px;
  padding-left: 24px;
  border-left: 2px solid rgba(255, 255, 255, 0.4);
}

.results-case div { display: flex; align-items: baseline; gap: 16px; }

.results-case dt {
  flex: none;
  width: 72px;
  color: #ffd27a;
  font-family: var(--en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.results-case dd { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.04em; word-break: auto-phrase; }

.results-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.result-card {
  display: flex;
  flex-direction: column;
  padding: 40px;
  border-radius: 16px;
  background: #fffdfa;
  color: var(--ink);
  box-shadow: 0 24px 48px rgba(120, 30, 0, 0.18);
}

.result-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.result-tag {
  padding: 2px 10px;
  border-radius: 4px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.result-body {
  margin: 24px 0;
  display: grid;
  grid-template-columns: 1fr 232px;
  column-gap: 32px;
  align-items: end;
}

.result-hero {
  display: flex;
  align-items: baseline;
  color: var(--orange);
  font-family: var(--en);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.result-num { font-size: 112px; }
.result-unit { margin-left: 4px; font-size: 40px; letter-spacing: 0; }

.result-delta { margin-top: 20px; color: var(--text); font-size: 15px; font-weight: 700; }
.result-delta b { margin: 0 6px; color: var(--ink); font-family: var(--en); font-size: 28px; }
.result-delta small { font-size: 16px; }

.result-chart {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 56px;
}

/* baseline */
.result-chart::before {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  top: var(--plot);
  height: 2px;
  background: var(--ink);
}

.result-plot { height: var(--plot); padding-top: 48px; display: flex; align-items: flex-end; }

.result-bar {
  position: relative;
  width: 100%;
  min-height: 8px;
  border-radius: 8px 8px 0 0;
  background: #e3d9ca;
}

.is-after .result-bar { background: linear-gradient(180deg, #ff7a1a 0%, var(--orange) 100%); }

.result-val {
  position: absolute;
  left: 50%;
  bottom: 100%;
  margin-bottom: 8px;
  transform: translateX(-50%);
  white-space: nowrap;
  color: #8a7f70;
  font-family: var(--en);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.result-val small { margin-left: 2px; font-size: 13px; }
.is-after .result-val { color: var(--orange); font-size: 32px; }
.is-after .result-val small { font-size: 16px; }

.result-when { margin-top: 12px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 700; }
.is-after .result-when { color: var(--ink); }

.result-arrow {
  position: absolute;
  left: 50%;
  top: calc(var(--plot) / 2 + 24px);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
}

.result-arrow .arrow { width: 16px; height: 16px; }

.result-foot {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.result-foot b { margin-right: 8px; color: var(--ink); }

/* ---------- technology ---------- */

.technology { padding-top: var(--section-gap); }

/* first column matches what-we-do so the two dividers line up */
.tech-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
}

.technology h2 { margin-top: 16px; }
.technology .section-lead { margin-top: 24px; }

.logo-grid {
  list-style: none;
  padding: 0 0 0 40px;
  border-left: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 88px;
  row-gap: 8px;
}

.logo-grid li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #444;
  font-family: var(--en);
  font-size: 12px;
  font-weight: 400;
}

.logo-grid img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* optical size correction: wordmarks read small, solid shapes read heavy */
.logo-grid li[data-tool="aws"] img { width: 52px; }
.logo-grid li[data-tool="go"] img { width: 64px; }
.logo-grid li[data-tool="nextjs"] img,
.logo-grid li[data-tool="typescript"] img { width: 36px; height: 36px; margin-block: 2px; }

/* ---------- our style ---------- */

.style-band {
  position: relative;
  height: 256px;
  margin-top: var(--section-gap);
  overflow: hidden;
  color: #fff;
  background: #0b0b0c;
}

.style-bg {
  position: absolute;
  top: 0;
  left: calc(50% - 960px);
  width: 1360px;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 80%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 34%, #000 80%, transparent 100%);
}

/* keeps the copy readable; anchored to the grid, not the viewport */
.style-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(11, 11, 12, 0.92) 0, rgba(11, 11, 12, 0.92) calc(50% - 360px), rgba(11, 11, 12, 0) calc(50% - 96px));
}

/* corner accent: always at least 32px clear of the copy */
.style-band::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: clamp(16px, calc(max(40px, 50% - 616px) - 32px), 80px);
  aspect-ratio: 10 / 9;
  background: linear-gradient(135deg, #ff5a1f 0%, #f04b22 60%, rgba(240, 75, 34, 0) 61%);
}

.style-brush {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  width: 240px;
  height: 136px;
  background: linear-gradient(110deg, rgba(255, 106, 34, 0) 30%, #ff6a22 46%, #f04b22 70%, #ffb020 100%);
  clip-path: polygon(44% 100%, 100% 12%, 100% 100%);
}

.style-inner {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.style-copy .eyebrow { font-size: 13px; letter-spacing: 0.08em; color: #ff6a2c; }

.style-copy h2 {
  margin-top: 8px;
  font-size: 26px;
  line-height: 1.4;
}

.style-copy p:last-child {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.75;
  letter-spacing: 0.04em;
}

.style-phases {
  margin-right: 112px;
  display: flex;
  flex-direction: column;
  font-family: var(--en);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 2;
}

/* ---------- contact ---------- */

/* closing CTA band: taller now that it directly follows the dark style band */
.contact {
  position: relative;
  height: 152px;
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: clamp(16px, calc(max(40px, 50% - 616px) - 32px), 72px);
  background: linear-gradient(100deg, #ff5a1f, var(--orange-hot));
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%);
}

.contact-art {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(440px, 34vw, 700px);
  height: 100%;
  object-fit: cover;
  object-position: 60% 55%;
  mix-blend-mode: darken;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 28%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 28%);
}

.contact-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-columns: 128px max-content max-content;
  column-gap: 40px;
  align-items: center;
}

.contact .eyebrow {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.contact h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.contact-note {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
  letter-spacing: 0.03em;
}

/* the whole band is the link target */
.contact-link { display: inline-flex; align-items: center; gap: 16px; }
.contact-link::after { content: ""; position: absolute; inset: 0; z-index: 2; }

.contact-arrow {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  transition: background 0.2s, transform 0.2s;
}

.contact:hover .contact-arrow { background: var(--orange); transform: translateX(4px); }

/* mobile-only stand-in for the arrow; the band itself is still the link */
.contact-btn { display: none; }

/* ---------- contact form page ---------- */

.form-page { padding: 140px 0 var(--section-gap); }

.form-wrap {
  display: grid;
  grid-template-columns: 1fr minmax(0, 680px);
  gap: 64px;
  align-items: start;
}

.form-intro { position: sticky; top: 40px; }
.form-intro h1 { margin-top: 16px; font-size: 36px; font-weight: 800; line-height: 1.4; }
.form-intro .section-lead { margin-top: 24px; }

.contact-form {
  display: grid;
  gap: 24px;
  padding: 40px;
  border-radius: 12px;
  background: #fffdfa;
  box-shadow: 0 0 0 1px rgba(80, 60, 30, 0.06), 0 2px 4px rgba(60, 40, 10, 0.03), 0 12px 32px rgba(60, 40, 10, 0.06);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.form-field { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }

.form-field label,
.form-field legend {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
}

.form-field legend { margin-bottom: 8px; }

.form-badge {
  padding: 1px 8px;
  border-radius: 4px;
  background: #ece6dc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.form-badge.is-required { background: var(--orange); color: #fff; }

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d9d0c2;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* 16px keeps iOS from zooming on focus */
  line-height: 1.6;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form textarea { resize: vertical; min-height: 180px; }

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(240, 75, 34, 0.15);
}

.has-error input,
.has-error textarea { border-color: #d6331a; background: #fff8f6; }

.form-error { color: #c42d14; font-size: 13px; }

.form-alert {
  padding: 12px 16px;
  border-radius: 8px;
  background: #fdece7;
  color: #b2290f;
  font-size: 14px;
  font-weight: 700;
}

.form-choices { display: flex; flex-wrap: wrap; gap: 8px; }

.form-choice { position: relative; cursor: pointer; }
.form-choice input { position: absolute; opacity: 0; pointer-events: none; }

.form-choice span {
  display: block;
  padding: 8px 16px;
  border: 1px solid #d9d0c2;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  transition: all 0.2s;
}

.form-choice input:checked + span { border-color: var(--orange); background: var(--orange); color: #fff; }
.form-choice input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }

.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-submit {
  justify-self: start;
  min-width: 240px;
  height: 56px;
  padding: 0 32px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s;
}

.form-submit:hover { background: var(--orange); }

.form-submit-busy { display: none; }
.form-submit.is-busy { background: #555; cursor: progress; }
.form-submit.is-busy .form-submit-label { display: none; }
.form-submit.is-busy .form-submit-busy { display: inline-flex; align-items: center; gap: 10px; }

.form-submit.is-busy .form-submit-busy::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.form-done { min-height: 60vh; }
.form-done h1 { margin-top: 16px; font-size: 36px; font-weight: 800; }
.form-done .section-lead { margin-top: 24px; }
.form-back { margin-top: 40px; }

/* ---------- company / privacy ---------- */

.doc-page { padding: 140px 0 var(--section-gap); }

.doc-wrap {
  display: grid;
  grid-template-columns: 1fr minmax(0, 760px);
  gap: 64px;
  align-items: start;
}

.doc-intro h1 { margin-top: 16px; font-size: 36px; font-weight: 800; line-height: 1.4; }

.company-table { margin: 0; border-top: 1px solid var(--ink); }

.company-table div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.company-table dt { font-size: 15px; font-weight: 700; }
.company-table dd { margin: 0; color: var(--text); font-size: 15px; line-height: 1.9; }

.doc-body { color: var(--text); font-size: 15px; line-height: 1.95; }
.doc-body > p:first-child { margin-bottom: 16px; }
.doc-body section { padding-top: 32px; }
.doc-body h2 { margin-bottom: 12px; color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.5; }
.doc-body p + p { margin-top: 8px; }
.doc-body ul { margin: 8px 0 0; padding-left: 1.4em; }
.doc-body li + li { margin-top: 4px; }
.doc-body a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.doc-contact { padding: 16px 20px; border-radius: 8px; background: #fffdfa; box-shadow: 0 0 0 1px var(--line); }
.doc-date { margin-top: 40px; color: var(--muted); font-size: 13px; text-align: right; }

.form-consent { color: var(--muted); font-size: 13px; line-height: 1.7; }
.form-consent a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }

.copyright { display: flex; align-items: center; gap: 24px; }
.copyright a { color: #cfcfcf; font-family: "Noto Sans JP", sans-serif; }
.copyright a:hover { color: #fff; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--footer);
  color: #fff;
}

.footer-inner {
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: baseline;
  gap: 16px;
  color: #cfcfcf;
  font-size: 11px;
}

.site-footer .logo { color: #fff; font-size: 20px; }

.footer-nav {
  display: flex;
  gap: 32px;
  color: #e6e6e6;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.footer-nav a:hover { color: #fff; }

.copyright {
  justify-self: end;
  color: #9a9a9a;
  font-family: var(--en);
  font-size: 11px;
}

section[id], article[id] { scroll-margin-top: 20px; }

/* ---------- narrower desktops ---------- */

@media (max-width: 1360px) {
  .result-card { padding: 32px; }
  .result-body { grid-template-columns: 1fr 216px; column-gap: 24px; }
  .result-chart { column-gap: 48px; }
  .result-num { font-size: 96px; }
  .desktop-nav { margin-right: 40px; gap: 28px; }
  .hero-title { font-size: 76px; }
  .hero-script { left: 120px; }
  .service-body { padding: 24px 24px 28px; }
  .service-card h3 { font-size: 20px; }
  .steps { width: 360px; }
  .wwd-art { width: 400px; height: 300px; }
  .style-bg { left: calc(50% - 1040px); }
  .style-phases { margin-right: 48px; }
  .contact-inner { grid-template-columns: 112px max-content max-content; column-gap: 32px; }
  .contact h2 { font-size: 24px; }
  .contact-art { width: clamp(240px, calc(100% - 900px), 400px); }
}

@media (max-width: 1300px) {
  .desktop-nav { display: none; }
  .header-inner > .header-cta { margin-left: auto; }
  .menu-btn { display: block; margin-left: 12px; }
  /* the header already shows the CTA beside the button */
  .menu-panel .header-cta { display: none; }
  .menu-panel { padding-top: 104px; }
}

@media (max-width: 1240px) {
  .service-text br { display: none; }
}

/* tablet: copy | photo on top, the three steps in a row underneath */
@media (max-width: 1240px) and (min-width: 761px) {
  .wwd {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    min-height: 0;
    padding: var(--section-gap) var(--gutter) 0;
  }
  .wwd-grid { display: contents; }
  .wwd-intro { grid-column: 1; grid-row: 1; align-self: center; }
  .wwd-art { position: relative; top: 0; right: auto; grid-column: 2; grid-row: 1; width: 100%; height: auto; aspect-ratio: 3 / 2; margin: 0; }
  .steps {
    grid-column: 1 / -1;
    grid-row: 2;
    width: auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 32px;
    padding: 32px 0 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .steps li, .steps li + li { grid-template-columns: 1fr; row-gap: 8px; padding: 0; }
  .steps li:not(:last-child) div { padding-bottom: 0; border-bottom: 0; }
  .steps p br { display: none; }
}

@media (max-width: 1120px) {
  :root { --section-gap: 64px; }
  .doc-wrap { grid-template-columns: 1fr; gap: 32px; }
  .form-wrap { grid-template-columns: 1fr; gap: 40px; }
  .form-intro { position: static; }
  .results { padding: 64px 0; }
  .results-head { flex-direction: column; align-items: flex-start; gap: 24px; }
  .result-body { grid-template-columns: 1fr; row-gap: 32px; }
  .result-chart { max-width: 280px; }
  .result-num { font-size: 88px; }
  .hero { height: 540px; }
  .hero-art {
    width: 68%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28%), linear-gradient(180deg, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 28%), linear-gradient(180deg, #000 90%, transparent);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
  .hero-img { object-position: 30% top; }
  .hero-script { left: 22%; top: 330px; font-size: 76px; }
  .hero-title { font-size: 60px; }
  .hero-lead { font-size: 15px; }
  .services-head { flex-direction: column; align-items: flex-start; gap: 0; }
  .services-lead { margin-top: 16px; max-width: 600px; }
  .service-grid { gap: 16px; }
  .service-body { padding: 20px 20px 24px; }
  .service-card h3 { font-size: 18px; }
  .service-text { font-size: 13px; }
  .tech-grid { grid-template-columns: 1fr; }
  .logo-grid { border-left: 0; padding: 32px 0 0; grid-auto-rows: 80px; }
  .style-bg { left: auto; right: 140px; width: 64%; object-position: 70% 45%; }
  .style-band::before { background: linear-gradient(90deg, rgba(11, 11, 12, 0.92) 0, rgba(11, 11, 12, 0.92) 30%, rgba(11, 11, 12, 0) 60%); }
  .style-phases { margin-right: 0; }
  .contact { height: auto; }
  .contact-art { width: 36%; }
  .contact-inner { height: auto; grid-template-columns: 1fr; row-gap: 4px; padding: 24px 38% 24px 0; }
  .footer-inner { display: flex; justify-content: space-between; }
  .footer-nav { display: none; }
}

@media (max-width: 900px) and (min-width: 761px) {
  .service-grid { grid-template-columns: 1fr; }
  .service-card { display: grid; grid-template-columns: 300px 1fr; }
  .service-card img { height: 100%; min-height: 180px; }
  .service-body { align-self: center; padding: 24px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { grid-template-columns: 56px 1fr; padding: 16px 0; }
  .steps li + li { border-top: 1px solid var(--line); }
  .steps p br { display: inline; }
}

/* ---------- mobile (mockup: 390px) ---------- */

@media (max-width: 760px) {
  :root { --gutter: 16px; --section-gap: 48px; }

  /* stays reachable while scrolling; transparent over the hero, frosted once scrolled */
  .site-header { position: fixed; transition: background 0.2s, box-shadow 0.2s; }
  .site-header.is-scrolled {
    background: rgba(252, 249, 243, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(20, 20, 20, 0.06);
  }
  /* backdrop-filter would trap the fixed panel inside the header */
  html.is-menu-open .site-header { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .header-inner { height: 56px; }
  .menu-btn { margin-right: -2px; }
  .menu-panel { padding-top: 88px; }
  .menu-panel .header-cta { display: inline-flex; }
  .logo { font-size: 25px; }
  .header-inner > .header-cta { display: none; }
  .menu-btn { margin-left: auto; }

  h2 { font-size: 20px; line-height: 1.45; }
  .eyebrow { font-size: 12px; letter-spacing: 0.06em; }
  .section-lead { font-size: 13px; line-height: 1.75; letter-spacing: 0.02em; }

  .hero { height: 340px; }
  .hero-art {
    width: calc(100% - 100px);
    top: 0;
    height: 340px;
    -webkit-mask-image: none;
    mask-image: none;
  }
  /* mask the photo only (not the art box) so the script outside it stays visible */
  .hero-img {
    object-position: 60% 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%), linear-gradient(180deg, #000 86%, transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 22%), linear-gradient(180deg, #000 86%, transparent);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
  .hero-script { left: calc(var(--gutter) - 100px); top: 256px; font-size: 50px; transform: rotate(-22deg); -webkit-text-stroke: 0.3px var(--script); }
  .hero-script span + span { margin-left: 4px; }
  .hero-copy { padding-top: 64px; }
  .hero-kicker { font-size: 12px; line-height: 1.6; letter-spacing: 0.02em; }
  .hero-title { margin-top: 10px; margin-left: -1px; font-size: 35px; line-height: 1.33; letter-spacing: -0.01em; }
  .hero-lead { display: none; }

  .services { padding-top: 32px; }
  .services-head h2 { margin-top: 8px; }
  .services-lead { display: none; }
  .service-grid { margin-top: 20px; grid-template-columns: 1fr; gap: 12px; }
  .service-card {
    display: grid;
    grid-template-columns: 136px minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
    padding: 0 12px 0 0;
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(80, 60, 30, 0.06), 0 6px 16px rgba(60, 40, 10, 0.05);
  }
  .service-card img { height: 100%; min-height: 128px; border-radius: 6px 0 0 6px; }
  .service-body { align-self: center; padding: 12px 0; }
  .service-meta { gap: 6px; font-size: 10px; }
  .service-meta .num { font-size: 13px; }
  .service-card h3 { margin-top: 4px; font-size: 13px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
  .service-text { margin-top: 6px; font-size: 11px; line-height: 1.65; letter-spacing: 0; }

  /* intro → full-width photo (uncropped 3:2, brush corners intact) → steps */
  .wwd {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 0;
    padding: var(--section-gap) var(--gutter) 0;
  }
  .wwd-grid { display: contents; }
  .wwd h2 { margin-top: 8px; }
  .wwd .section-lead { margin-top: 12px; }
  .wwd-art { position: relative; grid-column: 1; grid-row: 2; top: 0; right: 0; width: 100%; height: auto; aspect-ratio: 3 / 2; margin: 24px 0 0; }
  .wwd-art img { object-position: center; }
  .wwd-script { right: 0; bottom: -44px; font-size: 40px; }
  .wwd-script span:nth-child(2) { margin-left: 22px; }
  .wwd-script span:nth-child(3) { margin-left: 44px; }
  .steps { grid-column: 1; grid-row: 3; margin-top: 56px; width: auto; padding: 0; border: 0; }
  .steps li, .steps li + li { grid-template-columns: 36px 1fr; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .steps li:first-child { border-top: 1px solid var(--line); }
  .steps li:not(:last-child) div { padding-bottom: 0; border-bottom: 0; }
  .steps .num { padding-top: 1px; font-size: 14px; }
  .steps h3 { font-size: 15px; }
  .steps p { margin-top: 4px; font-size: 13px; line-height: 1.75; }
  .steps p br { display: none; }


  .results { --plot: 168px; padding: 48px 0; }
  .results::before { width: 32px; height: 28px; aspect-ratio: auto; }
  .results::after { width: 140px; height: 80px; }
  .results h2 { font-size: 22px; }
  .results-lead { font-size: 13px; line-height: 1.75; }
  .results-case { padding-left: 16px; }
  .results-case dt { width: 60px; font-size: 11px; }
  .results-case dd { font-size: 13px; }
  .results-grid { margin-top: 24px; grid-template-columns: 1fr; gap: 16px; }
  .result-card { padding: 24px 20px; border-radius: 12px; }
  .result-label { gap: 8px; font-size: 15px; }
  .result-tag { font-size: 11px; }
  .result-body { margin: 16px 0; grid-template-columns: 1fr 136px; column-gap: 16px; }
  .result-chart { max-width: none; column-gap: 32px; }
  .result-plot { padding-top: 40px; }
  .result-num { font-size: 60px; }
  .result-unit { font-size: 24px; }
  .result-delta { margin-top: 12px; font-size: 12px; }
  .result-delta b { display: block; margin: 2px 0; font-size: 20px; }
  .result-delta small { font-size: 12px; }
  .result-val { font-size: 15px; }
  .result-val small { font-size: 11px; }
  .is-after .result-val { font-size: 20px; }
  .is-after .result-val small { font-size: 12px; }
  .result-when { margin-top: 8px; font-size: 11.5px; }
  .result-arrow { width: 28px; height: 28px; }
  .result-arrow .arrow { width: 12px; height: 12px; }
  .result-foot { font-size: 11.5px; }

  .technology { padding-top: var(--section-gap); }
  .technology h2 { margin-top: 8px; }
  .br-pc { display: none; }
  .technology .section-lead { display: none; }
  .logo-grid { margin: 20px -8px 0; padding: 0; grid-auto-rows: 64px; row-gap: 4px; }
  .logo-grid li { gap: 6px; font-size: 9px; letter-spacing: -0.01em; white-space: nowrap; }
  .logo-grid img { width: 28px; height: 28px; }
  .logo-grid li[data-tool="aws"] img { width: 36px; }
  .logo-grid li[data-tool="go"] img { width: 44px; }
  .logo-grid li[data-tool="nextjs"] img,
  .logo-grid li[data-tool="typescript"] img { width: 26px; height: 26px; margin-block: 1px; }

  .style-band { height: auto; }
  .style-bg { left: auto; right: 0; width: 62%; object-position: 88% 40%; -webkit-mask-image: none; mask-image: none; }
  .style-band::before {
    background: linear-gradient(90deg, #0b0b0c 0%, #0b0b0c 36%, rgba(11, 11, 12, 0.6) 60%, rgba(11, 11, 12, 0.2) 100%);
  }
  .style-band::after { width: 32px; height: 28px; aspect-ratio: auto; }
  .style-brush { width: 96px; height: 56px; }
  .style-inner { display: block; height: auto; padding: 24px 0; }
  .style-copy { padding-left: 16px; }
  .style-copy .eyebrow { font-size: 10px; }
  .style-copy h2 { margin-top: 4px; font-size: 16px; }
  .style-copy p:last-child { margin-top: 8px; font-size: 11px; line-height: 1.65; letter-spacing: 0.02em; }
  .style-phases { display: none; }


  /* photo on top (uncropped 3:2), copy and a full-width button underneath */
  .contact::before { top: auto; height: calc(100% - 100vw * 2 / 3); width: 16px; }
  .contact-art { position: relative; width: 100%; height: auto; aspect-ratio: 3 / 2; object-position: center; -webkit-mask-image: none; mask-image: none; }
  .contact-inner { display: block; padding: 24px 16px 36px 32px; }
  .contact .eyebrow { font-size: 12px; }
  .contact h2 { margin-top: 6px; font-size: 22px; line-height: 1.45; }
  .contact-note { margin-top: 10px; font-size: 13px; line-height: 1.8; }
  .contact-note br { display: none; }
  .contact-arrow { display: none; }
  .contact-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    margin-top: 20px;
    padding: 0 24px 0 28px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }
  .form-page { padding: 96px 0 var(--section-gap); }
  .doc-page { padding: 96px 0 var(--section-gap); }
  .doc-intro h1 { font-size: 24px; }
  .company-table div { grid-template-columns: 96px 1fr; gap: 12px; padding: 16px 0; }
  .company-table dt, .company-table dd { font-size: 13.5px; }
  .doc-body { font-size: 14px; line-height: 1.9; }
  .doc-body h2 { font-size: 16px; }
  .copyright { gap: 12px; }
  .form-intro h1, .form-done h1 { font-size: 24px; }
  .contact-form { padding: 24px 20px; gap: 20px; }
  .form-row { grid-template-columns: 1fr; gap: 20px; }
  .form-submit { justify-self: stretch; }
  .footer-inner { height: auto; flex-wrap: wrap; row-gap: 8px; padding: 16px 0; }
  .footer-brand span, .copyright span, .copyright a { white-space: nowrap; }
  .copyright { width: 100%; justify-content: space-between; }
  .footer-brand { gap: 12px; font-size: 10px; }
  .site-footer .logo { font-size: 18px; }
  .copyright { font-size: 10px; }
}
