/* ---------- Tokens ---------- */

:root {
  --bg: #fafaf8;
  --ink: #141414;
  --sub: #6b6b6b;
  --rule: #e4e4e0;
  --accent: #bc002d; /* 日の丸の紅. Small areas only. */
  --placeholder: #efefeb;

  --font: "Inter", "Noto Sans JP", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  --header-h: 72px;
  --radius: 4px;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
}

:lang(en) body,
html:lang(en) {
  line-height: 1.65;
}

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

a {
  color: inherit;
}

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

ul,
ol {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

br.pc {
  display: none;
}

@media (min-width: 900px) {
  br.pc {
    display: inline;
  }
}

/* ---------- Shared parts ---------- */

.section {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 136px) var(--gutter);
}

.rule {
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--rule);
  transform-origin: left center;
}

.eyebrow {
  margin-bottom: clamp(24px, 3vw, 40px);
  color: var(--sub);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.heading {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

:lang(en) .heading {
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.heading.small {
  font-size: clamp(24px, 2.4vw, 30px);
  margin-bottom: 28px;
}

.line {
  display: block;
}

/* Break Japanese headings between phrases, not inside words. */
:lang(ja) :is(h1, h2, h3) {
  word-break: auto-phrase;
}

.hero h1 .line {
  white-space: nowrap;
}

.body-text {
  max-width: 40em;
  font-size: clamp(16px, 1.3vw, 18px);
}

.section-note {
  color: var(--sub);
  font-size: 15px;
}

.split {
  display: grid;
  gap: 40px;
}

@media (min-width: 1000px) {
  .split {
    grid-template-columns: 5fr 7fr;
    gap: clamp(48px, 6vw, 96px);
  }
}

.split-body {
  display: grid;
  gap: clamp(36px, 4vw, 56px);
  align-content: start;
}

.section-head {
  display: grid;
  gap: 16px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

@media (min-width: 900px) {
  .section-head {
    grid-template-columns: auto 1fr;
    align-items: end;
    gap: 48px;
  }

  .section-head .section-note {
    padding-left: 32px;
    border-left: 1px solid var(--rule);
  }
}

/* Buttons and links */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.button:hover {
  background: #000;
}

.button.small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) left bottom / 100% 1.5px no-repeat;
  transition: background-size 0.3s ease;
}

.text-link:hover {
  background-size: 40% 1.5px;
}

.text-link.arrow::after {
  content: "→";
  transition: transform 0.25s ease;
}

.text-link.arrow:hover::after {
  transform: translateX(4px);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
  padding: 0 var(--gutter);
  background: rgb(250 250 248 / 0.94);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--rule);
}

.wordmark {
  font-family: "Inter", sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.site-nav {
  display: none;
  gap: clamp(20px, 3vw, 44px);
  margin: 0 auto;
  font-size: 14px;
}

.site-nav a,
.footer-nav a {
  text-decoration: none;
  color: var(--ink);
}

.site-nav a:hover,
.footer-nav a:hover {
  color: var(--accent);
}

@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

@media (min-width: 900px) {
  .header-actions {
    margin-left: 0;
  }
}

.languages {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--sub);
  font-size: 13px;
}

.languages button {
  padding: 6px 4px;
  border: 0;
  background: none;
  color: var(--sub);
  font: inherit;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.languages button[aria-pressed="true"] {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 480px) {
  .header-actions .button {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(56px, 7vw, 96px);
}

.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1000px) {
  .hero-grid {
    grid-template-columns: 7fr 5fr;
  }
}

.hero h1 {
  font-size: clamp(36px, 6vw, 88px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

:lang(en) .hero h1 {
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.lead {
  margin-top: clamp(24px, 3vw, 36px);
  color: #3a3a3a;
  font-size: clamp(16px, 1.4vw, 19px);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  margin-top: clamp(32px, 4vw, 48px);
}

.hero-art {
  position: relative;
  width: min(72%, 420px);
  margin: 0 auto;
}

.hero-art svg {
  width: 100%;
  height: auto;
}

.hero-loop {
  stroke: var(--ink);
  stroke-width: 1;
  opacity: 0.7;
}

.hero-dot {
  fill: var(--accent);
}

.hero-art-label {
  position: absolute;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero-art-label.is-top {
  top: 11.7%;
  left: 50%;
  transform: translate(-50%, -150%);
}

.hero-art-label.is-left {
  top: 86.7%;
  left: 17.5%;
  transform: translate(-50%, 40%);
}

.hero-art-label.is-right {
  top: 86.7%;
  left: 82.5%;
  transform: translate(-50%, 40%);
}

.pillars {
  display: grid;
  margin-top: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--rule);
}

.pillars li {
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}

.pillars h2 {
  font-size: clamp(19px, 1.6vw, 22px);
  font-weight: 700;
}

.pillars p {
  margin-top: 6px;
  color: var(--sub);
  font-size: 15px;
}

@media (min-width: 800px) {
  .pillars {
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--rule);
  }

  .pillars li {
    padding: 32px 32px 32px 0;
    border-bottom: 0;
  }

  .pillars li + li {
    padding-left: 32px;
    border-left: 1px solid var(--rule);
  }
}

/* ---------- 01 Approach ---------- */

.principles {
  display: grid;
  gap: 28px;
  counter-reset: none;
}

@media (min-width: 700px) {
  .principles {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }

  .principles li {
    padding-right: 24px;
  }

  .principles li + li {
    padding-left: 24px;
    border-left: 1px solid var(--rule);
  }
}

.num {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-family: "Inter", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.principles h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.principles p {
  margin-top: 8px;
  color: var(--sub);
  font-size: 14px;
}

.name-note {
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--accent);
  color: var(--sub);
  font-size: 14px;
}

/* ---------- 02 Services ---------- */

.services {
  display: grid;
  gap: clamp(48px, 5vw, 64px);
}

@media (min-width: 1000px) {
  .services {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .services .service:first-child {
    padding-right: clamp(32px, 4vw, 56px);
  }

  .services .service + .service {
    padding-left: clamp(32px, 4vw, 56px);
    border-left: 1px solid var(--rule);
  }
}

.service {
  display: grid;
  gap: 28px;
  align-content: start;
}

/* Image beside the text only while the two services are stacked. */
@media (min-width: 640px) and (max-width: 999px) {
  .service {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.placeholder {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px dashed #cfcfca;
  background: var(--placeholder);
  color: #a3a39d;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.placeholder::after {
  content: "IMAGE";
  position: absolute;
  top: 12px;
  left: 14px;
  font-size: 10px;
  letter-spacing: 0.2em;
}

.service-body {
  display: grid;
  gap: 12px;
  align-content: start;
}

.service-name {
  font-family: "Inter", sans-serif;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.status {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.status::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px 2px 0;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

.service-for {
  font-size: 14px;
  font-weight: 700;
}

.service-body p:not(.status):not(.service-for) {
  color: #3a3a3a;
  font-size: 15px;
}

.service-body .text-link {
  justify-self: start;
  margin-top: 8px;
}

/* ---------- 03 Build with us ---------- */

.offers {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.offers li {
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 640px) {
  .offers {
    grid-template-columns: 1fr 1fr;
  }

  .offers li:nth-child(odd) {
    padding-right: 24px;
  }

  .offers li:nth-child(even) {
    padding-left: 24px;
    border-left: 1px solid var(--rule);
  }
}

.offers h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.offers p {
  margin-top: 8px;
  color: var(--sub);
  font-size: 14px;
}

.process-label {
  margin-bottom: 16px;
  color: var(--sub);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.process ol {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 0;
  counter-reset: step;
}

.process li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  white-space: nowrap;
  counter-increment: step;
}

@media (max-width: 899px) {
  .process li {
    flex-basis: 100%;
  }
}

.process li::before {
  content: counter(step, decimal-leading-zero);
  color: var(--accent);
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

@media (min-width: 900px) {
  .process li:not(:last-child)::after {
    content: "";
    width: clamp(16px, 2.5vw, 40px);
    height: 1px;
    margin: 0 clamp(8px, 1vw, 16px);
    background: var(--ink);
    opacity: 0.4;
  }
}

.split-body > .button {
  justify-self: start;
}

/* ---------- 04 Founder / 05 About ---------- */

.duo {
  display: grid;
  gap: clamp(72px, 8vw, 96px);
}

@media (min-width: 1000px) {
  .duo {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .duo .about {
    padding-left: clamp(40px, 5vw, 72px);
    border-left: 1px solid var(--rule);
  }

  .duo .founder {
    padding-right: clamp(40px, 5vw, 72px);
  }
}

.founder-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 560px) {
  .founder-grid {
    grid-template-columns: minmax(160px, 220px) 1fr;
    gap: 32px;
  }
}

.founder-photo {
  overflow: hidden;
  max-width: 280px;
  aspect-ratio: 1;
  background: var(--placeholder);
}

.founder-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.founder-name {
  font-size: clamp(22px, 2vw, 26px);
  font-weight: 700;
  line-height: 1.4;
}

.founder-role {
  display: block;
  color: var(--sub);
  font-size: 15px;
  font-weight: 400;
}

.founder-bio {
  margin-top: 16px;
  color: #3a3a3a;
  font-size: 15px;
}

.facts {
  border-top: 1px solid var(--ink);
  font-size: 14px;
}

.facts > div {
  display: grid;
  grid-template-columns: minmax(120px, 34%) 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.facts dt {
  color: var(--sub);
}

.facts dd a {
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

@media (max-width: 480px) {
  .facts > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ---------- 06 Contact ---------- */

.contact-form {
  display: grid;
  gap: 22px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

.field-label em {
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.04em;
}

.req {
  color: var(--accent);
}

.opt {
  color: var(--sub);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfcfca;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.2s ease;
}

.field select {
  appearance: none;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23141414' stroke-width='1.2'/%3E%3C/svg%3E")
    right 16px center no-repeat;
}

.field textarea {
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ink);
  outline: none;
}

.field [aria-invalid="true"] {
  border-color: var(--accent);
}

.consent {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.consent input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}

.consent a {
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.contact-form .button {
  justify-self: start;
  min-width: 200px;
}

.form-error {
  color: var(--accent);
  font-size: 14px;
}

.micro {
  color: var(--sub);
  font-size: 13px;
}

/* ---------- Footer ---------- */

.split > div > .section-note {
  margin-top: 20px;
}

.site-footer {
  display: grid;
  gap: 20px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
}

.footer-nav,
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
}

.footer-services,
.footer-meta {
  color: var(--sub);
}

.footer-meta a {
  color: var(--ink);
  text-decoration: none;
}

.footer-meta .text-link {
  font-size: 13px;
}

@media (min-width: 1000px) {
  .site-footer {
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 40px;
  }
}

/* ---------- Privacy page ---------- */

.legal {
  max-width: 760px;
}

.legal h1 {
  margin-bottom: 32px;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  line-height: 1.3;
}

.legal h2 {
  margin: 36px 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.legal p {
  color: #3a3a3a;
  font-size: 15px;
}

.legal .micro {
  margin-top: 48px;
}

/* ---------- Motion (only when JS runs) ---------- */

.js [data-anim="reveal"] {
  opacity: 0;
}

.js [data-anim="lines"] .line {
  overflow: hidden;
  padding-bottom: 0.06em;
}

.js [data-anim="lines"] .line-inner {
  display: block;
  transform: translateY(105%);
}

.js [data-anim="rule"] {
  transform: scaleX(0);
}

@media (prefers-reduced-motion: reduce) {
  .js [data-anim="lines"] .line-inner,
  .js [data-anim="rule"] {
    transform: none;
  }
}
