/* ============================================================
   MIRAI — design system
   Palette + techniques inspected from studiothink.com:
   cream #F8F5F2 · ink #403D3B · brown #7B695E · sage #A8A99B · mocha #C3BAB3
   Hero = background <video> + 30% black dim + light text on top.
   "Transparent" titles = -webkit-text-stroke with transparent fill,
   so the video shows through the letters.
   ============================================================ */

:root {
  --cream:  #F8F5F2;
  --ink:    #403D3B;
  --brown:  #7B695E;
  --sage:   #A8A99B;
  --mocha:  #C3BAB3;
  --black:  #000000;
  --white:  #FFFFFF;

  --serif-display: "Cormorant Garamond", Georgia, serif;
  --serif-body:    "EB Garamond", Georgia, serif;
  --sans:          "Montserrat", Helvetica, Arial, sans-serif;
  /* Subset webfonts contain only 未来 / 미래, so each script falls through to its own font */
  --cjk:           "Noto Serif JP", "Noto Serif KR", "Hiragino Mincho ProN", "Apple SD Gothic Neo", serif;

  --pad: clamp(24px, 5vw, 72px);          /* outer page gutter */
  --section: clamp(96px, 14vh, 180px);    /* vertical rhythm between sections */
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--serif-body);
  font-size: clamp(17px, 1.2vw, 19px);
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection { background: var(--brown); color: var(--cream); }

/* visible focus ring for keyboard users, invisible for mouse clicks */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 4px;
}

.container { max-width: 1200px; margin-inline: auto; padding-inline: var(--pad); }

/* ---------- custom cursor (desktop, fine pointers only) ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 9999;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--mocha);
  mix-blend-mode: difference;        /* stays visible on light & dark sections */
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: width .25s ease, height .25s ease, opacity .3s ease;
  opacity: 0;
}
.cursor.on { opacity: 1; }
.cursor.grow { width: 44px; height: 44px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- shared type styles ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--brown);
}
.eyebrow.light { color: var(--mocha); }

/* The signature effect: hollow letters, video/photo shows through the fill */
.outline-line, .band-outline {
  font-family: var(--sans);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.02em;
  line-height: .9;
  -webkit-text-stroke: 1.5px var(--cream);
  -webkit-text-fill-color: transparent;
  color: var(--cream);               /* fallback for browsers without text-stroke */
}
@supports not (-webkit-text-stroke: 1px black) {
  .outline-line, .band-outline { color: var(--cream); }
}

.section-title {
  font-family: var(--serif-display);
  font-weight: 300;
  font-size: clamp(34px, 4.6vw, 64px);
  line-height: 1.12;
  letter-spacing: .01em;
}
.section-title em { font-style: italic; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  padding: 1em 2.2em;
  border: 1px solid currentColor;
  border-radius: 999px;
  transition: background .35s ease, color .35s ease, border-color .35s ease;
}

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background .4s ease, padding .4s ease;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: clamp(18px, 3vh, 34px) var(--pad);
  color: var(--cream);
  transition: padding .4s ease;
}
.site-header.scrolled { background: rgba(64, 61, 59, .92); backdrop-filter: blur(10px); }
.site-header.scrolled .header-inner { padding-block: 14px; }

.logo { display: inline-flex; align-items: baseline; gap: .6em; }
.logo-word {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .42em;
}
.logo-kanji { font-family: var(--cjk); font-weight: 200; font-size: 15px; color: var(--mocha); }

.main-nav { display: flex; gap: clamp(1.4rem, 3vw, 3rem); }
.main-nav a {
  font-family: var(--sans);
  font-size: 11px; font-weight: 600;
  letter-spacing: .26em; text-transform: uppercase;
  position: relative; padding-block: 4px;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s ease;
}
.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.btn-header:hover { background: var(--cream); color: var(--ink); }

/* hamburger — hidden on desktop */
.menu-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  width: 36px; height: 28px;
  flex-direction: column; justify-content: center; gap: 7px;
}
.menu-toggle span { display: block; height: 1.5px; background: var(--cream); transition: transform .3s ease; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child  { transform: translateY(-4.25px) rotate(-45deg); }

.overlay-menu {
  position: fixed; inset: 0; z-index: 90;
  background: var(--ink); color: var(--cream);
  display: grid; place-content: center; text-align: center;
  opacity: 0; visibility: hidden;
  transition: opacity .4s ease, visibility .4s ease;
}
.overlay-menu.open { opacity: 1; visibility: visible; }
.overlay-menu nav { display: grid; gap: 2.2rem; }
.overlay-menu a {
  font-family: var(--serif-display); font-weight: 300;
  font-size: clamp(30px, 8vw, 44px); line-height: 1;
}
.overlay-kanji {
  margin-top: 3.5rem;
  font-family: var(--cjk); font-weight: 200;
  font-size: 10vw; line-height: 1; color: var(--brown); opacity: .45;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--pad);
  color: var(--cream);
  background: var(--ink);            /* shows while the video loads */
  overflow: hidden;
}
.bg-video, .bg-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;                 /* fill the section like a photo */
  display: block;
}
.dim { position: absolute; inset: 0; background: var(--black); opacity: .38; }
/* hero overlay: an angled gradient — dark where the headline sits (left),
   clearer where the generative flow is most active (right) */
.hero .dim {
  opacity: 1;
  background: linear-gradient(102deg,
    rgba(22, 20, 18, .82) 0%,
    rgba(22, 20, 18, .55) 32%,
    rgba(22, 20, 18, .18) 60%,
    rgba(22, 20, 18, .42) 100%);
}

.hero-content { position: relative; max-width: 1100px; }
.hero h1 { font-weight: 300; }
.hero .serif-line {
  display: block;
  font-family: var(--serif-display);
  font-weight: 300;
  font-size: clamp(40px, 7vw, 104px);
  line-height: 1.06;
  letter-spacing: .01em;
}
.hero .serif-line em { font-style: italic; }
.hero .serif-line:last-child { font-size: clamp(26px, 3.4vw, 50px); margin-top: .35em; }
.hero .outline-line {
  display: block;
  font-size: clamp(56px, 11vw, 168px);
  margin-block: .04em;
}
.hero .eyebrow { color: var(--mocha); margin-bottom: 2.2rem; }
.hero-sub {
  max-width: 520px;
  margin-top: 2.6rem;
  font-size: clamp(16px, 1.15vw, 18px);
  color: rgba(248, 245, 242, .85);
}

/* staggered load-in for the hero lines */
.hero-line {
  opacity: 0;
  transform: translateY(34px);
  animation: rise 1s cubic-bezier(.22, .8, .3, 1) forwards;
}
.hero-line:nth-child(1) { animation-delay: .15s; }
h1 .hero-line:nth-child(1) { animation-delay: .3s; }
h1 .hero-line:nth-child(2) { animation-delay: .45s; }
h1 .hero-line:nth-child(3) { animation-delay: .6s; }
.hero-sub { animation-delay: .85s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* vertical Japanese caption on the right edge */
.hero-side {
  position: absolute; right: calc(var(--pad) / 2); top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--cjk); font-weight: 200;
  font-size: 13px; letter-spacing: .55em;
  color: rgba(248, 245, 242, .55);
}

.scroll-cue {
  position: absolute; bottom: 34px; left: var(--pad);
  display: flex; align-items: center; gap: 14px;
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: .3em; text-transform: uppercase;
  color: rgba(248, 245, 242, .75);
}
.scroll-cue i {
  width: 56px; height: 1px; background: currentColor;
  position: relative; overflow: hidden; display: block;
}
.scroll-cue i::after {
  content: ""; position: absolute; inset: 0;
  background: var(--mocha);
  animation: sweep 2.2s ease-in-out infinite;
}
@keyframes sweep {
  0%   { transform: translateX(-100%); }
  55%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}

/* ---------- manifesto ---------- */
.manifesto { padding-block: var(--section); }
.manifesto .eyebrow { margin-bottom: 2.4rem; }
.statement {
  font-family: var(--serif-display);
  font-weight: 300;
  font-size: clamp(28px, 3.6vw, 54px);
  line-height: 1.3;
  max-width: 1020px;
}
.statement em { font-style: italic; color: var(--brown); }
.kanji-inline { font-family: var(--cjk); font-weight: 200; }

.ticks {
  display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 4rem);
  margin-top: 3.6rem;
  border-top: 1px solid var(--mocha);
  padding-top: 2.2rem;
}
.ticks li {
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--brown);
}
.ticks strong { color: var(--ink); font-weight: 800; }

/* ---------- solutions (dark) ---------- */
.solutions {
  background: var(--ink); color: var(--cream);
  padding-block: var(--section);
}
.solutions .section-title { max-width: 700px; margin-top: 1.6rem; }
.solutions .section-title em { color: var(--mocha); }

.solution-list { margin-top: clamp(3rem, 7vh, 5.5rem); }
.solution {
  display: grid;
  grid-template-columns: 80px 1fr 1.1fr;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: baseline;
  padding-block: clamp(2rem, 4.5vh, 3.4rem);
  border-top: 1px solid rgba(248, 245, 242, .18);
  transition: padding-left .4s ease;
}
.solution:last-child { border-bottom: 1px solid rgba(248, 245, 242, .18); }
.solution:hover { padding-left: 14px; }
.solution .num {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: .2em; color: var(--sage);
}
.solution h3 {
  font-family: var(--serif-display); font-weight: 300;
  font-size: clamp(26px, 3vw, 42px); line-height: 1.1;
  transition: color .35s ease;
}
.solution:hover h3 { color: var(--mocha); }
.solution p { color: rgba(248, 245, 242, .72); font-size: 17px; max-width: 46ch; }

/* ---------- video band ---------- */
.band {
  position: relative;
  min-height: 88vh;
  display: grid; place-content: center; text-align: center;
  padding: var(--section) var(--pad);
  color: var(--cream);
  background: var(--brown);
  overflow: hidden;
}
.band .dim { opacity: .45; }
.band-content { position: relative; }
.band .eyebrow { margin-bottom: 2.4rem; }
.band-outline {
  font-size: clamp(52px, 10.5vw, 160px);
  -webkit-text-stroke-width: 2px;
}
.band-note {
  margin-top: 2.6rem;
  font-family: var(--serif-display); font-weight: 300; font-style: italic;
  font-size: clamp(19px, 2vw, 28px);
  color: rgba(248, 245, 242, .85);
}

/* ---------- approach ---------- */
.approach { padding-block: var(--section); }
.approach-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 1.4fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
}
.approach-label { position: sticky; top: 120px; }
.approach-label .section-title { margin-top: 1.6rem; }
.approach-label em { color: var(--brown); }

.step {
  display: grid; grid-template-columns: 64px 1fr;
  gap: clamp(1rem, 2.5vw, 2.4rem);
  padding-block: 2.4rem;
  border-top: 1px solid var(--mocha);
}
.step:last-child { border-bottom: 1px solid var(--mocha); }
.step .num {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: .2em; color: var(--sage);
  padding-top: .55em;
}
.step h3 {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(24px, 2.4vw, 34px);
  margin-bottom: .5rem;
}
.step p { color: var(--brown); max-width: 52ch; }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  background: var(--mocha);
  padding-block: var(--section);
  text-align: center;
  overflow: hidden;
}
.cta-title {
  font-family: var(--serif-display); font-weight: 300;
  font-size: clamp(42px, 7vw, 110px); line-height: 1.05;
  margin-top: 1.8rem;
}
.cta-title .outline-line {
  font-size: .92em;
  -webkit-text-stroke-color: var(--ink);
  color: var(--ink);                  /* fallback fill */
}
@supports (-webkit-text-stroke: 1px black) {
  .cta-title .outline-line { -webkit-text-fill-color: transparent; }
}
.cta-title em { font-style: normal; color: var(--brown); }
.cta-sub { max-width: 460px; margin: 2rem auto 3rem; color: var(--ink); }
.btn-big {
  color: var(--ink);
  text-transform: none;      /* the email address reads better lowercase */
  letter-spacing: .08em;
  font-size: 13px;
}
.btn-big:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.cta-kanji {
  position: absolute; right: -2vw; bottom: -9vw;
  font-family: var(--cjk); font-weight: 200;
  font-size: 26vw; line-height: 1;
  color: var(--cream); opacity: .35;
  pointer-events: none;
}
.cta-hangul {
  position: absolute; left: -3vw; top: -7vw;
  font-family: var(--cjk); font-weight: 200;
  font-size: 20vw; line-height: 1;
  color: var(--cream); opacity: .28;
  pointer-events: none;
}

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--cream); padding-block: 3.2rem; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1.6rem;
}
.site-footer nav { display: flex; gap: 2.2rem; }
.site-footer nav a {
  font-family: var(--sans); font-size: 10px; font-weight: 600;
  letter-spacing: .26em; text-transform: uppercase;
  color: var(--mocha);
}
.site-footer nav a:hover { color: var(--cream); }
.copyright { font-size: 14px; color: var(--sage); font-style: italic; }

/* ---------- scroll-reveal (driven by js/main.js) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity .9s cubic-bezier(.22, .8, .3, 1), transform .9s cubic-bezier(.22, .8, .3, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .main-nav, .btn-header { display: none; }
  .menu-toggle { display: flex; }

  .hero-side { display: none; }

  .outline-line, .band-outline { -webkit-text-stroke-width: 1px; }

  .solution { grid-template-columns: 48px 1fr; }
  .solution p { grid-column: 2; }

  .approach-grid { grid-template-columns: 1fr; }
  .approach-label { position: static; }
}

/* ---------- reduced motion: show everything, stop animating ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-line, .reveal { opacity: 1; transform: none; animation: none; transition: none; }
  .scroll-cue i::after { animation: none; }
  .cursor { display: none; }
}
