/* hifi-styles.css — design tokens & base for the corporate site */

:root {
  /* fresh green palette */
  --accent: #7ab26a;
  --accent-soft: #d5e8cf;
  --accent-paper: #eef5ea;
  --accent-deep: #306b3a;
  --accent-darker: #1e4a26;

  /* neutrals */
  --paper: #fbfaf6;
  --paper-2: #f4f1ea;
  --ink: #2a2520;
  --ink-soft: #5a5450;
  --ink-mute: #8a857f;
  --line: #e3ddd1;

  /* fonts — unified on M PLUS 1p across JP / EN body / EN heading.
     The heading face can be swapped via Tweaks; the rest stays on M PLUS 1p. */
  --f-jp: 'M PLUS 1p', 'Noto Sans JP', system-ui, sans-serif;
  --f-en: 'M PLUS 1p', sans-serif;
  --f-en-style: normal;
  --f-en-weight: 700;
  --f-en-body: 'M PLUS 1p', sans-serif;

  /* layout */
  --max: 1200px;
  --pad-x: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--f-jp);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: .02em;
}

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

button { font: inherit; cursor: pointer; }

input, textarea, select { font: inherit; color: inherit; }

::selection { background: var(--accent-soft); }

/* Tracking helpers */
.en-heading {
  font-family: var(--f-en);
  font-style: var(--f-en-style);
  font-weight: var(--f-en-weight);
  letter-spacing: .01em;
  color: var(--accent-deep);
  line-height: 1;
}

.jp-sub {
  font-family: var(--f-jp);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--ink-mute);
}

.kicker {
  font-family: var(--f-en-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s cubic-bezier(.22,.61,.36,1),
              transform 1s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: .1s; }
.reveal.delay-2 { transition-delay: .2s; }
.reveal.delay-3 { transition-delay: .3s; }
.reveal.delay-4 { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Container */
.container {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* Section spacing */
.section {
  padding-block: clamp(72px, 10vw, 140px);
}

/* Subtle paper texture */
.paper-bg {
  background:
    radial-gradient(rgba(0,0,0,.018) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--paper);
}

.paper-2 { background: var(--paper-2); }

/* Sketchy underline */
.underline-stroke {
  background-image: linear-gradient(transparent 70%, var(--accent-soft) 70%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 4px;
}

/* Soft button */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--accent-deep);
  color: #fff;
  font-family: var(--f-jp);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .08em;
  border: 0;
  text-decoration: none;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
  box-shadow: 0 6px 18px rgba(48,107,58,.18);
}
.btn:hover { transform: translateY(-2px); background: var(--accent-darker); box-shadow: 0 10px 24px rgba(48,107,58,.22); }
.btn .arr { transition: transform .25s ease; }
.btn:hover .arr { transform: translateX(4px); }

.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  background: transparent;
  color: var(--accent-deep);
  border: 1.5px solid var(--accent-deep);
  font-family: var(--f-jp);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .08em;
  text-decoration: none;
  transition: background .25s ease, color .25s ease;
}
.btn-ghost:hover { background: var(--accent-deep); color: #fff; }

/* Section heading composition: small kicker + big EN + JP sub */
.sec-head { display: flex; flex-direction: column; gap: 14px; }
.sec-head .num {
  font-family: var(--f-en-body);
  font-size: 12px;
  letter-spacing: .25em;
  color: var(--accent);
  font-weight: 600;
}
.sec-head .en {
  font-family: var(--f-en);
  font-style: var(--f-en-style);
  font-weight: var(--f-en-weight);
  color: var(--accent-deep);
  font-size: clamp(48px, 7vw, 84px);
  line-height: 1;
  padding-bottom: .18em;
}
.sec-head .jp {
  font-family: var(--f-jp);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .25em;
  color: var(--ink-soft);
}

/* Dashed divider */
.dash {
  height: 1px;
  background-image: linear-gradient(to right, var(--ink-mute) 50%, transparent 50%);
  background-size: 8px 1px;
  background-repeat: repeat-x;
  opacity: .35;
}

/* Header */
header.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251,250,246,.85);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
header.site-header.scrolled {
  border-bottom-color: var(--line);
}
.nav {
  max-width: var(--max);
  margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad-x);
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .12em;
  position: relative;
  transition: color .25s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
}
/* Hide JP subtext on narrower PC widths so nav fits on one row */
@media (max-width: 1080px) {
  .nav-links a .jp-mini { display: none; }
  .nav-links { gap: 22px; }
}
.nav-links a .en-l {
  font-family: var(--f-en);
  font-style: var(--f-en-style);
  font-weight: var(--f-en-weight);
  font-size: 17px;
  color: var(--accent-deep);
  margin-right: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -6px; left: 50%;
  width: 0; height: 4px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 4' preserveAspectRatio='none'%3E%3Cpath d='M1 2 Q 10 0 20 2 T 39 2' stroke='%237ab26a' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  transform: translateX(-50%);
  transition: width .25s ease;
}
.nav-links a:hover::after { width: 110%; }

/* Burger */
.burger { display: none; background: none; border: 0; padding: 8px; }
.burger svg { display: block; }

@media (max-width: 800px) {
  .nav-links { display: none; }
  .burger { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: fixed; top: 64px; right: 0; left: 0;
    background: var(--paper);
    padding: 24px var(--pad-x);
    gap: 18px; align-items: flex-start;
    border-bottom: 1px solid var(--line);
  }
}

/* Logo */
.logo-wrap { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo-wrap .name { font-family: var(--f-jp); font-weight: 600; font-size: 14px; letter-spacing: .14em; }
.logo-wrap .tag { font-family: var(--f-en-body); font-size: 9px; letter-spacing: .3em; color: var(--ink-mute); text-transform: uppercase; margin-top: 2px; }

/* Hero */
.hero {
  position: relative;
  padding-block: clamp(60px, 8vw, 100px) clamp(80px, 10vw, 140px);
  overflow: hidden;
}
.hero-grid {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
}

.hero-copy h1 {
  font-family: var(--f-jp);
  font-weight: 700;
  font-size: clamp(32px, 5.2vw, 60px);
  line-height: 1.35;
  letter-spacing: .03em;
  margin: 14px 0 28px;
  color: var(--ink);
}
.hero-copy h1 .accent { color: var(--accent-deep); }
.hero-copy .lead {
  font-size: 15px;
  line-height: 2;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0 0 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-mark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-en);
  font-style: italic;
  color: var(--accent-deep);
  font-size: 18px;
}
.hero-mark::before {
  content: ''; width: 32px; height: 1.5px; background: var(--accent);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-body p {
  font-size: 15.5px;
  line-height: 2;
  color: var(--ink-soft);
  max-width: 580px;
  margin: 0 0 1.2em;
}
.about-body p strong {
  background-image: linear-gradient(transparent 70%, var(--accent-soft) 70%);
  font-weight: 500;
  color: var(--ink);
  padding: 0 2px;
}

/* Service */
.service-list { display: flex; flex-direction: column; gap: clamp(50px, 7vw, 96px); }
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.service-row.reverse { direction: rtl; }
.service-row.reverse > * { direction: ltr; }
@media (max-width: 900px) {
  .service-row, .service-row.reverse { grid-template-columns: 1fr; direction: ltr; }
}
.service-visual {
  aspect-ratio: 4/3;
  background: var(--accent-paper);
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.service-visual.tone-b { background: #eaf1e5; }
.service-visual.tone-c { background: #e6efe1; }
.service-visual::before {
  content: '';
  position: absolute; inset: 12px;
  border: 1px dashed rgba(48,107,58,.22);
  border-radius: 18px;
  pointer-events: none;
}
.service-text .num-big {
  font-family: var(--f-en);
  font-style: var(--f-en-style);
  font-weight: var(--f-en-weight);
  font-size: 56px;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 14px;
}
.service-text h3 {
  font-family: var(--f-jp);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 32px);
  margin: 0 0 6px;
  letter-spacing: .04em;
}
.service-text .en-sub {
  font-family: var(--f-en);
  font-style: var(--f-en-style);
  font-weight: var(--f-en-weight);
  font-size: 18px;
  color: var(--accent-deep);
  margin-bottom: 18px;
}
.service-text p {
  font-size: 15px;
  line-height: 2;
  color: var(--ink-soft);
  margin: 0;
  max-width: 460px;
}
.service-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 20px;
}
.service-tag {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--accent-soft);
  color: var(--accent-deep);
}

/* Works */
.works-wrap { position: relative; }
.works-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 16px;
  margin-bottom: 48px;
}
.private-stamp {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-en);
  font-style: var(--f-en-style);
  font-weight: var(--f-en-weight);
  font-size: 16px;
  color: var(--ink-mute);
  padding: 8px 18px;
  border: 1.5px dashed var(--ink-mute);
  border-radius: 999px;
  transform: rotate(-2deg);
}
.works-track-mask {
  position: relative;
  overflow: hidden;
  margin-inline: calc(var(--pad-x) * -1);
  padding-inline: var(--pad-x);
  filter: grayscale(.85);
  opacity: .55;
}
.works-track {
  display: flex;
  gap: 24px;
  animation: works-scroll 40s linear infinite;
  will-change: transform;
}
.works-track:hover { animation-play-state: paused; }
@keyframes works-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.work-card {
  flex: 0 0 320px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.work-card .thumb {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, #d8e3d4, #c5d6c0);
  position: relative;
}
.work-card .thumb::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.4) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.4) 50%, rgba(255,255,255,.4) 75%, transparent 75%, transparent);
  background-size: 16px 16px;
  opacity: .25;
}
.work-card .meta { padding: 18px 20px; }
.work-card .case { font-family: var(--f-en); font-style: var(--f-en-style); font-weight: var(--f-en-weight); color: var(--accent-deep); font-size: 14px; margin-bottom: 4px; }
.work-card .title { font-weight: 600; font-size: 14px; margin-bottom: 6px; letter-spacing: .04em; }
.work-card .desc { font-size: 12.5px; color: var(--ink-mute); line-height: 1.6; }

/* Company */
.company-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 5vw, 80px);
}
@media (max-width: 900px) {
  .company-grid { grid-template-columns: 1fr; }
}
.company-table { display: flex; flex-direction: column; }
.company-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
@media (max-width: 600px) {
  .company-row { grid-template-columns: 96px 1fr; gap: 16px; padding: 16px 4px; }
}
.company-row:first-child { border-top: 1px solid var(--line); }
.company-row .k {
  font-family: var(--f-jp);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .2em;
  color: var(--accent-deep);
}
.company-row .v {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.7;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-lead { font-size: 15px; line-height: 2; color: var(--ink-soft); margin: 18px 0 28px; max-width: 360px; }
.contact-meta {
  font-family: var(--f-en-body);
  font-size: 13px;
  letter-spacing: .12em;
  color: var(--ink-mute);
  line-height: 1.8;
}
.contact-meta strong { color: var(--accent-deep); font-weight: 600; }

.form {
  display: flex; flex-direction: column; gap: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 40px);
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .14em;
  color: var(--accent-deep);
  display: flex; align-items: center; gap: 8px;
}
.field label .req {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .1em;
  padding: 2px 8px;
  border-radius: 4px;
}
.field input, .field textarea {
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  padding: 12px 4px;
  font-size: 15px;
  font-family: var(--f-jp);
  color: var(--ink);
  transition: border-color .25s ease;
  outline: none;
}
.field input:focus, .field textarea:focus { border-bottom-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-mute); }
.field textarea { resize: vertical; min-height: 120px; line-height: 1.7; }

.form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.form-actions .btn { padding: 16px 36px; font-size: 14px; }
.form-actions .btn:disabled { opacity: .35; cursor: not-allowed; transform: none; box-shadow: none; }
.form-actions .btn:disabled:hover { background: var(--accent-deep); transform: none; }

/* Consent row */
.consent {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 4px 2px;
  cursor: pointer;
  user-select: none;
}
.consent input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.consent .box {
  flex: 0 0 auto;
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--line);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s ease;
  margin-top: 1px;
}
.consent .box svg { opacity: 0; transition: opacity .2s ease; }
.consent input:checked + .box {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}
.consent input:checked + .box svg { opacity: 1; }
.consent input:focus-visible + .box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.consent .text {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.7;
}
.consent .text a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.consent .text a:hover { color: var(--accent-darker); }

.thanks {
  text-align: center;
  padding: 48px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  min-height: 380px; justify-content: center;
}
.thanks .check-wrap { width: 84px; height: 84px; }
.thanks h3 {
  font-family: var(--f-jp);
  font-weight: 700;
  font-size: 24px;
  margin: 6px 0 0;
  letter-spacing: .06em;
}
.thanks .en {
  font-family: var(--f-en);
  font-style: var(--f-en-style);
  font-weight: var(--f-en-weight);
  color: var(--accent-deep);
  font-size: 22px;
  white-space: nowrap;
}
.thanks p { color: var(--ink-soft); line-height: 1.9; font-size: 14.5px; margin: 0; max-width: 360px; }
.thanks .btn-ghost { margin-top: 12px; }

/* Footer */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px var(--pad-x) 36px;
  background: var(--paper-2);
}
.footer-inner {
  max-width: var(--max);
  margin-inline: auto;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
}
.footer-inner .copy {
  font-family: var(--f-en-body);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--ink-mute);
}
.scroll-top {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-en-body);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--accent-deep);
  background: none; border: 0;
  text-transform: uppercase;
}
.scroll-top:hover { color: var(--accent-darker); }

/* helpers */
.hide-pc { display: none; }
@media (max-width: 800px) {
  .hide-sp { display: none; }
  .hide-pc { display: initial; }
}
