/* ============================================================
   PARFUN CO., LTD. — The Atelier Thread
   Japanese craft × French lingerie elegance
   ============================================================ */

:root {
  --ivory:        #F7F4EE;
  --ivory-2:      #EFE9DD;
  --ink:          #353B49;
  --ink-soft:     #5C6373;
  --night:        #272B34;
  --night-2:      #2E333E;
  --crimson:      #C40D4E;
  --crimson-deep: #8F0A39;
  --silver:       #9AA1B0;
  --line:         rgba(53, 59, 73, 0.16);
  --line-light:   rgba(247, 244, 238, 0.18);

  --font-display: 'Cormorant Garamond', serif;
  --font-jp:      'Shippori Mincho', serif;
  --font-sans:    'Hanken Grotesk', sans-serif;

  --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
  --ease-silk: cubic-bezier(0.65, 0, 0.13, 1);

  --pad: clamp(1.5rem, 5vw, 5rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  font-family: var(--font-sans);
  background: var(--ivory);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* hide the browser scrollbar (page remains scrollable) */
html { scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { width: 0; height: 0; display: none; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
em { font-style: normal; }

::selection { background: var(--crimson); color: var(--ivory); }

/* ============ GRAIN — per section, never on the dark global/footer ============ */
.hero::after, .about::after, .craft::after,
.materials::after, .history::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ CURSOR ============ */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  /* hide the native cursor — the custom one takes over */
  .has-anim, .has-anim * { cursor: none !important; }
  .cursor { display: block; position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; }
  .cursor__dot {
    position: absolute; top: -2.5px; left: -2.5px;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--crimson);
    transition: opacity 0.3s;
  }
  /* a quiet hairline circle, drifting after the dot like silk —
     over links it calmly contracts and fills crimson */
  .cursor__ring {
    position: absolute; top: -17px; left: -17px;
    width: 34px; height: 34px;
  }
  .cursor__ring::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(53, 59, 73, 0.5);
    background: transparent;
    transition: transform 0.45s var(--ease-silk), background 0.45s, border-color 0.45s;
  }
  .cursor--active .cursor__dot { opacity: 0; }
  .cursor--active .cursor__ring::before {
    transform: scale(0.42);
    background: rgba(196, 13, 78, 0.85);
    border-color: transparent;
  }
  /* on dark sections the cursor switches to ivory */
  .cursor--invert .cursor__dot { background: #E14E79; }
  .cursor--invert .cursor__ring::before { border-color: rgba(247, 244, 238, 0.6); }
  .cursor--invert.cursor--active .cursor__ring::before { background: rgba(225, 78, 121, 0.9); }
}

/* ============ LOGO MARK ============ */
.mark { display: block; }
.mark--preloader { width: clamp(52px, 7.5vw, 88px); flex-shrink: 0; }
.mark--header { width: 30px; flex-shrink: 0; }
.mark--footer { width: 30px; }

/* ============ PRELOADER ============ */
.preloader {
  position: fixed; inset: 0; z-index: 8000;
  display: grid; place-items: center;
}
.preloader__curtain {
  position: absolute; left: 0; width: 100%; height: 50.5%;
  background: var(--ivory);
}
.preloader__curtain--top { top: 0; }
.preloader__curtain--bottom { bottom: 0; }
.preloader__inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: 1.5rem;
}
/* the real logo lockup: mark left, wordmark right */
.preloader__logo {
  display: flex; align-items: center;
  gap: clamp(0.9rem, 2.2vw, 1.6rem);
}
.preloader__wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.4vw, 3.3rem);
  letter-spacing: 0.04em;
  color: var(--silver);
  display: flex;
  overflow: hidden;
}
.preloader__wordmark .char {
  display: inline-block;
  transform: translateY(110%);
}
/* keep the mark invisible until GSAP takes over (prevents the pre-JS flash) */
.has-anim .mark__stroke { stroke-dasharray: 2600; stroke-dashoffset: 2600; }
.preloader__tagline {
  font-family: var(--font-jp);
  font-size: 0.8rem;
  letter-spacing: 0.45em;
  color: var(--ink-soft);
  opacity: 0;
}

/* ============ HEADER ============ */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--pad);
  transition: background 0.5s, box-shadow 0.5s, padding 0.5s;
}
.header--solid {
  background: rgba(247, 244, 238, 0.94);
  backdrop-filter: blur(14px);
  padding-block: 0.75rem;
  box-shadow: 0 1px 0 var(--line);
}
.header__logo {
  display: flex; align-items: center; gap: 0.7rem;
}
.has-anim .header__logo { opacity: 0; /* revealed after preloader FLIP */ }
.header__wordmark {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: 0.03em;
  color: var(--silver);
  white-space: nowrap;
}
.header__right { display: flex; align-items: center; gap: 2rem; }
.header__login {
  font-size: 0.62rem; letter-spacing: 0.3em; font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 1px dashed rgba(196, 13, 78, 0.5);
  padding-bottom: 0.15rem;
  transition: color 0.3s;
}
.header__login:hover { color: var(--crimson); }
.nav-open .header__login { color: rgba(247, 244, 238, 0.8); }
.header__est {
  font-size: 0.62rem; letter-spacing: 0.3em; color: var(--ink-soft);
  display: none;
}
@media (min-width: 760px) { .header__est { display: block; } }

.menu-btn {
  display: flex; align-items: center; gap: 0.8rem;
  background: none; border: 0; cursor: pointer;
  font-family: var(--font-sans);
  color: var(--ink);
  padding: 0.4rem 0;
}
.menu-btn__label {
  font-size: 0.7rem; letter-spacing: 0.32em; font-weight: 600;
}
.menu-btn__stitches {
  display: flex; flex-direction: column; gap: 5px; width: 30px;
}
.menu-btn__dash {
  height: 2px; background: var(--crimson); border-radius: 2px;
  transition: transform 0.5s var(--ease-silk), width 0.5s var(--ease-silk), background 0.4s;
  transform-origin: center;
}
.menu-btn__dash:nth-child(1) { width: 30px; }
.menu-btn__dash:nth-child(2) { width: 20px; margin-left: auto; }
.menu-btn__dash:nth-child(3) { width: 25px; }
.menu-btn:hover .menu-btn__dash { width: 30px; }
.nav-open .menu-btn__dash { background: var(--ivory); }
.nav-open .menu-btn__dash:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 30px; }
.nav-open .menu-btn__dash:nth-child(2) { transform: scaleX(0); }
.nav-open .menu-btn__dash:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 30px; }
.nav-open .menu-btn__label { color: var(--ivory); }
.nav-open .header__wordmark { color: var(--ivory); }
.nav-open .header__est { color: rgba(247,244,238,0.6); }
.nav-open .header--solid { background: transparent; backdrop-filter: none; box-shadow: none; }

/* ============ FULLSCREEN NAV ============ */
.nav {
  position: fixed; inset: 0; z-index: 4500;
  visibility: hidden;
  pointer-events: none; /* never block the page when closed */
}
.nav-open .nav { pointer-events: auto; }
.nav__panel-accent {
  position: absolute; inset: 0;
  background: var(--crimson-deep);
  clip-path: inset(0 0 100% 0);
}
.nav__panel {
  position: absolute; inset: 0;
  background: var(--night);
  clip-path: inset(0 0 100% 0);
}
.nav__inner {
  position: relative; z-index: 2;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: clamp(5rem, 12vh, 8rem) var(--pad) 3rem;
  gap: 3rem;
}
@media (min-width: 980px) {
  .nav__inner { grid-template-columns: 1.4fr 1fr; }
}
.nav__links { display: flex; flex-direction: column; max-width: 640px; }
.nav__link {
  display: flex; align-items: baseline; gap: 1.4rem;
  padding: clamp(0.45rem, 1.4vh, 0.9rem) 0;
  color: var(--ivory);
  position: relative;
}
.nav__num {
  font-size: 0.62rem; letter-spacing: 0.2em; color: var(--silver);
  font-variant-numeric: tabular-nums;
  min-width: 3.2em;
  opacity: 0; transform: translateX(-12px);
}
.nav__word {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.6vh, 3.1rem);
  line-height: 1.18;
  overflow: hidden;
  display: inline-flex;
  transition: color 0.4s, transform 0.5s var(--ease-out);
}
.nav__word-inner {
  display: inline-block;
  position: relative;
  transform: translateY(115%);
  padding-bottom: 0.12em;
}
/* a running stitch sews itself under the word on hover */
.nav__word-inner::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background-image: repeating-linear-gradient(90deg, var(--crimson) 0 6px, transparent 6px 11px);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 0.55s var(--ease-silk);
}
.nav__link:hover .nav__word-inner::after { background-size: 100% 100%; }
.nav__jp {
  font-family: var(--font-jp);
  font-size: 0.75rem; letter-spacing: 0.25em;
  color: var(--silver);
  transition: color 0.4s;
  opacity: 0;
}
.nav__link:hover .nav__word { color: var(--crimson); transform: translateX(10px); }
.nav__link:hover .nav__jp { color: var(--ivory); }
.nav__seam {
  height: 1px; width: 100%;
  background-image: repeating-linear-gradient(90deg,
    var(--line-light) 0 7px, transparent 7px 13px);
  background-repeat: no-repeat;
  background-size: 0% 100%;
}
.nav__aside {
  display: none;
  color: var(--silver);
}
@media (min-width: 980px) {
  .nav__aside { display: flex; gap: 3rem; align-items: flex-start; }
}
.nav__needle svg { overflow: visible; }
.nav__needle { transform-origin: 30px 0; animation: sway 5.5s ease-in-out infinite; opacity: 0; }
@keyframes sway {
  0%, 100% { transform: rotate(2.4deg); }
  50% { transform: rotate(-2.4deg); }
}
.nav__thread {
  stroke: var(--crimson); stroke-width: 1.4;
  stroke-dasharray: 4 5;
}
.nav__info { font-size: 0.78rem; line-height: 2; opacity: 0; }
.nav__info-label {
  font-size: 0.6rem; letter-spacing: 0.3em; color: var(--crimson);
  margin-top: 1.6rem; margin-bottom: 0.2rem;
}
.nav__info-label:first-child { margin-top: 0; }

/* ============ SECTION SCAFFOLD ============ */
.section { padding: clamp(5rem, 12vh, 9rem) var(--pad); position: relative; }
.section--dark { background: var(--night); color: var(--ivory); }
.section--crimson { background: var(--crimson-deep); color: var(--ivory); }

.section__head {
  display: flex; align-items: center; gap: 1.4rem;
  margin-bottom: clamp(3rem, 7vh, 5rem);
}
.section__num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--crimson);
}
.section__label {
  font-size: 0.66rem; letter-spacing: 0.34em; font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}
.section__head--light .section__label { color: var(--silver); }
.section__seam {
  flex: 1; height: 1px;
  background-image: repeating-linear-gradient(90deg,
    var(--line) 0 7px, transparent 7px 13px);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  transition: background-size 1.6s var(--ease-silk);
}
.section__head--light .section__seam {
  background-image: repeating-linear-gradient(90deg,
    var(--line-light) 0 7px, transparent 7px 13px);
}
.section__seam.is-sewn { background-size: 100% 100%; }

/* ============ SHARED REVEALS ============ */
/* hidden initial states only when JS is running (html.has-anim) —
   if scripts fail, the page stays fully visible */
.line { display: block; overflow: hidden; }
.line__inner { display: inline-block; }
.has-anim .line__inner { transform: translateY(115%); }

.has-anim .reveal { opacity: 0; transform: translateY(40px); }

.reveal-img { overflow: hidden; position: relative; }
.reveal-img img { width: 100%; }
.has-anim .reveal-img img {
  clip-path: inset(100% 0 0 0);
  transform: scale(1.12);
}
figure figcaption {
  font-size: 0.62rem; letter-spacing: 0.26em; color: var(--ink-soft);
  margin-top: 0.8rem; line-height: 1.7;
}
.section--dark figcaption, .section--crimson figcaption { color: var(--silver); }

/* ============ BUTTONS ============ */
.btn { display: inline-block; font-size: 0.78rem; letter-spacing: 0.22em; font-weight: 600; }
.btn--stitch {
  position: relative;
  padding: 0.95rem 2.2rem;
  color: var(--ink);
  border: 1px dashed rgba(196, 13, 78, 0.65);
  transition: color 0.45s var(--ease-out);
  overflow: hidden;
}
.btn--stitch span { position: relative; z-index: 1; }
.btn--stitch::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--crimson);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.5s var(--ease-silk);
}
.btn--stitch:hover { color: var(--ivory); }
.btn--stitch:hover::before { transform: scaleY(1); }
.btn--light { color: var(--ivory); border-color: rgba(247,244,238,0.6); }
.btn--light::before { background: var(--ivory); }
.btn--light:hover { color: var(--crimson-deep); }
.btn--text { color: var(--ink); padding: 1.05rem 0; }
.btn--text .btn__arrow { display: inline-block; margin-left: 0.6em; transition: transform 0.4s var(--ease-out); }
.btn--text:hover .btn__arrow { transform: translateX(7px); }

/* ============ HERO ============ */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(7rem, 16vh, 10rem) var(--pad) 4rem;
  position: relative;
  overflow: hidden;
}
.hero__inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: center;
}
@media (min-width: 920px) {
  .hero__inner { grid-template-columns: 1.25fr 1fr; gap: clamp(2rem, 6vw, 6rem); }
}
.hero__kicker {
  display: flex; align-items: center; gap: 1.1rem;
  font-size: 0.58rem; letter-spacing: 0.42em; font-weight: 600;
  color: rgba(196, 13, 78, 0.75);
  margin-bottom: clamp(2.4rem, 4vh, 3.2rem);
}
.has-anim .hero__kicker { opacity: 0; }
.hero__kicker-line { display: block; width: 3.4rem; height: 1px; background: var(--crimson); transform-origin: left; }
.hero__title {
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: clamp(1.45rem, 4.1vw, 3.4rem);
  line-height: 1.62;
  letter-spacing: 0.055em;
  white-space: nowrap;
}
.hero__title em {
  font-style: normal;
  color: var(--crimson);
}
.hero__cta { display: flex; align-items: center; gap: 2.4rem; margin-top: clamp(3rem, 5.5vh, 4rem); flex-wrap: wrap; }
.has-anim .hero__cta { opacity: 0; }
.hero__media { position: relative; max-width: 440px; justify-self: center; width: 100%; }
@media (min-width: 920px) { .hero__media { justify-self: end; } }
.has-anim .hero__media { opacity: 0; }
.hero__atelier {
  border: 1px dashed rgba(196, 13, 78, 0.32);
  border-radius: 999px 999px 0 0; /* arched, like a pattern piece */
  background: rgba(239, 233, 221, 0.45);
  padding: clamp(2rem, 4vw, 3rem) clamp(1.2rem, 2.4vw, 2rem) 0.5rem;
}
.hero__atelier svg { display: block; width: 100%; height: auto; overflow: visible; }
.hero__atelier path, .hero__atelier line, .hero__atelier rect,
.hero__atelier ellipse, .hero__atelier circle {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.at-measure line { stroke: var(--crimson); stroke-width: 1.2; }
.at-measure text {
  font-family: var(--font-sans);
  font-size: 10px; letter-spacing: 0.22em; font-weight: 600;
  fill: var(--ink-soft); stroke: none;
}
#atSeamC { stroke: var(--silver); stroke-width: 1.1; stroke-dasharray: 3 5; }
.at-panel, #atNeck { stroke: var(--ink-soft); stroke-width: 1.8; }
#atStitch { stroke: var(--crimson); stroke-width: 1.6; stroke-dasharray: 5 6; }
#atLace { stroke: var(--crimson); stroke-width: 1.3; opacity: 0.85; }
#atBow { stroke: var(--crimson); stroke-width: 1.4; }
.at-seam { stroke: var(--silver); stroke-width: 1.2; stroke-dasharray: 3 5; opacity: 0.7; }
.hero__caption {
  position: absolute; left: -1rem; bottom: 1.4rem;
  writing-mode: vertical-rl;
  font-size: 0.6rem; letter-spacing: 0.3em; color: var(--ink-soft);
  margin: 0;
}
/* ============ ABOUT ============ */
.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.5rem;
  align-items: stretch; /* all three columns form one even block */
}
@media (min-width: 1020px) {
  .about__grid { grid-template-columns: auto 1.3fr 1fr; gap: clamp(2.5rem, 5vw, 5.5rem); }
}
.about__vertical {
  writing-mode: vertical-rl;
  font-family: var(--font-jp);
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 6rem);
  letter-spacing: 0.22em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--crimson);
  display: none;
}
@media (min-width: 1020px) { .about__vertical { display: block; } }
.about__title {
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.7rem);
  line-height: 1.6;
  margin-bottom: 2.2rem;
}
.about__text { color: var(--ink-soft); margin-bottom: 1.4rem; max-width: 56ch; }
.about__text strong { color: var(--crimson); font-weight: 600; }
.about__counters {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1.5rem;
  margin-top: 3.2rem;
}
.counter__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.counter__label {
  font-size: 0.62rem; letter-spacing: 0.26em; color: var(--ink-soft);
  display: block; margin-top: 0.4rem;
  border-top: 1px dashed rgba(196, 13, 78, 0.45);
  padding-top: 0.6rem;
}
.about__media { display: flex; flex-direction: column; }
.about__media img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
@media (min-width: 1020px) {
  /* the image stretches to exactly match the text column's height */
  .about__media img { aspect-ratio: auto; flex: 1; height: 100%; }
  .about__vertical { align-self: center; }
}

/* ============ CRAFT ============ */
/* the thread runs off the bottom edge and disappears behind the next section */
.craft { padding-bottom: 0; }
.craft__title {
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.5;
  text-align: center;
}
.craft__intro {
  text-align: center;
  color: var(--silver);
  max-width: 46ch;
  margin: 1.8rem auto 0;
}
.craft__journey {
  position: relative;
  max-width: 1000px;
  margin: clamp(4rem, 9vh, 7rem) auto 0;
}
.craft__thread-svg {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  height: 100%; width: 100%;
  pointer-events: none;
  overflow: visible;
  display: none;
}
@media (min-width: 880px) { .craft__thread-svg { display: block; } }
.craft__thread-bg {
  stroke: rgba(247, 244, 238, 0.1);
  stroke-width: 1.5;
  stroke-dasharray: 6 7;
}
.craft__thread-line {
  stroke: var(--crimson);
  stroke-width: 2;
  stroke-linecap: round;
}
/* overlay ABOVE the cards: the thread's hidden trace, shown as stitching */
.craft__stitch-svg {
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  height: 100%; width: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 3;
  display: none;
}
@media (min-width: 880px) { .craft__stitch-svg { display: block; } }
.craft__stitch-seg {
  fill: none;
  stroke: #E14E79;
  stroke-width: 1.4;
  stroke-dasharray: 6 7;
  stroke-linecap: round;
  opacity: 0;
}
.craft__steps {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  gap: clamp(2.5rem, 8vh, 5.5rem);
  counter-reset: step;
  padding-top: clamp(4.5rem, 10vh, 7.5rem); /* breathing room after the thread start */
  padding-bottom: clamp(4rem, 10vh, 7rem); /* lifts the last card off the border */
}
.craft__step {
  max-width: min(410px, 88vw);
  background: var(--night-2);
  border: 1px solid rgba(247,244,238,0.07);
  /* generous padding so the inner stitch seam never touches the text */
  padding: clamp(2rem, 2.8vw, 2.6rem) clamp(2.1rem, 3vw, 2.8rem);
  position: relative;
}
.has-anim .craft__step { opacity: 0; transform: translateY(46px); }
.craft__step::before {
  content: '';
  position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px;
  border: 1px dashed rgba(247, 244, 238, 0.12);
  pointer-events: none;
}
@media (min-width: 880px) {
  /* the thread passes through the card's outer zone; the text is shifted
     inward so the stitching never cuts through it */
  .craft__step--left  { align-self: flex-start; margin-left: 48px; padding-left: 7.5rem; }
  .craft__step--right { align-self: flex-end;  margin-right: 48px; padding-right: 7.5rem; }
}
.craft__step-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.2rem;
  color: var(--crimson);
  line-height: 1;
  display: block;
  margin-bottom: 0.8rem;
}
.craft__step h3 {
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: 1.3rem;
  white-space: nowrap;
  margin-bottom: 0.7rem;
}
.craft__step-en {
  display: block;
  font-family: var(--font-sans); font-size: 0.58rem;
  letter-spacing: 0.3em; color: var(--silver); font-weight: 600;
  margin-top: 0.35rem;
}
.craft__step p { font-size: 0.85rem; color: rgba(247, 244, 238, 0.82); line-height: 1.9; }
.craft__media {
  max-width: 760px;
  margin: clamp(4rem, 10vh, 7rem) auto 0;
}
.craft__media img { aspect-ratio: 16 / 9; object-fit: cover; }

/* ============ MATERIALS — crimson atelier ============ */
.materials {
  background: var(--crimson-deep);
  color: var(--ivory);
  position: relative;
  overflow: hidden;
}
.materials__cover {
  position: absolute; inset: 0; z-index: 4;
  background: var(--ivory);
  transform-origin: bottom;
  pointer-events: none;
  display: none;
}
.has-anim .materials__cover { display: block; }
.materials__inner { position: relative; z-index: 1; }
.materials__title {
  font-family: var(--font-jp);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.55;
}
.materials__lead {
  max-width: 62ch;
  margin: 2rem 0 clamp(3rem, 7vh, 5rem);
  color: rgba(247, 244, 238, 0.82);
  font-size: 0.92rem;
}
.materials .section__label { color: rgba(247, 244, 238, 0.7); }
.materials .section__num { color: var(--ivory); }
.materials .section__seam {
  background-image: repeating-linear-gradient(90deg,
    rgba(247,244,238,0.35) 0 7px, transparent 7px 13px);
}

/* material blocks */
.mat {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem clamp(2.5rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(2.8rem, 6vh, 4.5rem) 0;
  border-bottom: 1px dashed rgba(247, 244, 238, 0.3);
}
.mat:last-child { border-bottom: 0; }
@media (min-width: 880px) {
  .mat { grid-template-columns: 1fr 1.35fr; }
  .mat:nth-child(even) .mat__visual { order: 2; }
}
.mat__visual { max-width: 380px; justify-self: center; width: 100%; }
.mat__visual svg { width: 100%; height: auto; overflow: visible; }
.mat__visual path, .mat__visual line, .mat__visual rect,
.mat__visual circle, .mat__visual ellipse {
  fill: none;
  stroke: rgba(247, 244, 238, 0.85);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mat__visual .acc { stroke: #FFC9D9; }
.mat__num {
  font-family: var(--font-display); font-style: italic;
  color: #FFC9D9; font-size: 1.1rem;
  display: block; margin-bottom: 0.5rem;
}
.mat__name {
  font-family: var(--font-jp); font-weight: 600;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.mat__en {
  font-family: var(--font-sans); font-size: 0.58rem;
  letter-spacing: 0.3em; font-weight: 600;
  color: rgba(247, 244, 238, 0.65);
}
.mat__body p {
  font-size: 0.9rem;
  line-height: 2.05;
  color: rgba(247, 244, 238, 0.85);
  max-width: 56ch;
}

/* material SVG ambient animations */
@keyframes mat-march { to { stroke-dashoffset: -28; } }
@keyframes mat-spin { to { transform: rotate(360deg); } }
@keyframes mat-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes mat-drift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(10px); } }
@keyframes mat-drop {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 1; }
  70% { transform: translateY(44px); opacity: 1; }
  100% { transform: translateY(58px); opacity: 0; }
}
@keyframes mat-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.09); } }
@keyframes mat-sway { 0%, 100% { transform: rotate(2deg); } 50% { transform: rotate(-2deg); } }
@keyframes mat-rise {
  0% { transform: translateY(6px); opacity: 0; }
  20% { opacity: 0.9; }
  80% { transform: translateY(-22px); opacity: 0.7; }
  100% { transform: translateY(-30px); opacity: 0; }
}
.rc-old { stroke-dasharray: 5 5; opacity: 0.55; }
.rc-flow { stroke-dasharray: 5 6; animation: mat-march 3.4s linear infinite; }
.rc-spark { animation: mat-pulse 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ws-drum { animation: mat-spin 9s linear infinite; transform-origin: 180px 142px; }
.ws-drum path, .ws-drum rect, .ws-drum line { stroke-width: 1.7; }
.ws-water { animation: mat-drift 4.5s ease-in-out infinite; }
.ws-bub { animation: mat-rise 3s ease-out infinite; }
.hp-vein { stroke-width: 1.1; opacity: 0.6; }
.sg-sun { animation: mat-pulse 4.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.up-wave { animation: mat-drift 8s ease-in-out infinite; }
.up-bottle-float { animation: mat-bob 4.6s ease-in-out infinite; }
.up-ground { stroke: rgba(247, 244, 238, 0.3); stroke-width: 1.3; stroke-dasharray: 2 6; }
.up-gull { stroke-width: 1.4; opacity: 0.6; }
.up-flow { stroke-dasharray: 4 6; animation: mat-march 3.8s linear infinite; }
.up-frame { stroke: rgba(247, 244, 238, 0.35); stroke-width: 1; stroke-dasharray: 5 6; }
@keyframes up-pellet {
  0% { transform: translate(142px, 128px); opacity: 0; }
  12% { opacity: 1; }
  50% { transform: translate(180px, 104px); }
  88% { opacity: 1; }
  100% { transform: translate(214px, 88px); opacity: 0; }
}
.up-pellet { animation: up-pellet 6.6s linear infinite; fill: #FFC9D9; stroke: none; }
.sg-boll { animation: mat-pulse 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sg-plus { animation: mat-pulse 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hp-leafgroup { animation: mat-sway 6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.hp-drop { animation: mat-drop 3.2s ease-in infinite; }
.hp-shield { animation: mat-pulse 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

/* ============ GLOBAL ============ */
.global__grid {
  display: grid; grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}
@media (min-width: 980px) { .global__grid { grid-template-columns: 1fr 1.15fr; gap: clamp(3rem, 6vw, 6rem); } }
.global__grid { align-items: center; }
.global__title {
  font-family: var(--font-jp); font-weight: 600;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.5;
  margin-bottom: 1.2rem;
}
.global__text > p { color: var(--silver); max-width: 50ch; font-size: 0.9rem; }
.global__list { margin-top: 1.6rem; }
.global__co {
  padding: 0.9rem 0.9rem;
  border-bottom: 1px dashed var(--line-light);
  cursor: pointer;
  transition: background 0.35s, padding-left 0.45s var(--ease-out);
}
.global__co:first-child { border-top: 1px dashed var(--line-light); }
.global__co h3 {
  font-family: var(--font-jp); font-weight: 600;
  font-size: 1.05rem;
  display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap;
}
.global__co h3 span {
  font-family: var(--font-sans); font-size: 0.56rem;
  letter-spacing: 0.28em; font-weight: 600; color: var(--silver);
}
.global__co p { font-size: 0.78rem; color: var(--silver); margin-top: 0.2rem; }
.global__co.is-active, .global__co:hover {
  background: rgba(247, 244, 238, 0.05);
  padding-left: 1.6rem;
}
.global__coord {
  display: block; margin-top: 0.4rem;
  font-size: 0.6rem; letter-spacing: 0.18em; color: rgba(247,244,238,0.4);
  font-variant-numeric: tabular-nums;
}
.global__map { position: relative; }
.global__map svg { width: 100%; height: auto; display: block; }
.map__ctx {
  fill: rgba(247,244,238,0.04);
  stroke: rgba(247,244,238,0.1); stroke-width: 1;
  stroke-linejoin: round;
}
.map__hl, .map__hl path {
  fill: rgba(247,244,238,0.12);
  stroke: rgba(247,244,238,0.55); stroke-width: 1.2;
  stroke-linejoin: round;
}
.map__region {
  font-family: var(--font-sans);
  font-size: 10px; letter-spacing: 0.34em;
  fill: rgba(247,244,238,0.3);
}
.map__region--hl { fill: rgba(247,244,238,0.85); font-size: 11px; }
/* halo behind every map label so it stays legible over borders */
.map__region, .map__point text {
  paint-order: stroke;
  stroke: var(--night); stroke-width: 4px;
  stroke-linejoin: round;
  font-weight: 600;
}
.map__plane path { fill: var(--ivory); stroke: none; }
.map__point { cursor: pointer; }
.map__hit { fill: transparent; pointer-events: all; }
.map__dot {
  fill: var(--ivory);
  transition: transform 0.3s var(--ease-out), fill 0.3s;
  transform-box: fill-box; transform-origin: center;
}
.map__point.is-active .map__dot,
.map__point:hover .map__dot { transform: scale(1.6); fill: var(--crimson); stroke: var(--ivory); stroke-width: 1; }
.map__point.is-active text, .map__point:hover text { fill: var(--ivory); }
.map__tip {
  position: absolute;
  transform: translate(-50%, -130%);
  background: var(--ivory);
  color: var(--ink);
  border: 1px dashed var(--crimson);
  padding: 0.75rem 1rem;
  min-width: 190px;
  font-size: 0.72rem;
  line-height: 1.7;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.3s var(--ease-out);
  z-index: 5;
}
.map__tip.is-on { opacity: 1; transform: translate(-50%, -118%); }
.map__tip strong {
  display: block;
  font-family: var(--font-jp); font-weight: 600;
  font-size: 0.85rem;
}
.map__tip em {
  display: block;
  font-size: 0.56rem; letter-spacing: 0.24em; font-weight: 600;
  color: var(--crimson);
  margin: 0.15rem 0 0.25rem;
}
.map__route {
  stroke: var(--crimson); stroke-width: 1.4;
  stroke-dasharray: 5 6;
  opacity: 0.85;
  animation: route-march 1.4s linear infinite;
}
@keyframes route-march { to { stroke-dashoffset: -22; } }
.map__dot { fill: var(--ivory); }
.map__point text {
  font-family: var(--font-sans);
  font-size: 11px; letter-spacing: 0.18em;
  fill: rgba(247,244,238,0.82);
}

/* ============ HISTORY ============ */
.history__title {
  font-family: var(--font-jp); font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 1.55;
  margin-bottom: clamp(3.5rem, 8vh, 6rem);
}
.history__timeline {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  padding-left: clamp(2.5rem, 6vw, 4.5rem);
}
.history__thread {
  position: absolute; left: -14px; top: 0.5rem; bottom: 0.5rem;
  width: clamp(44px, 5vw, 64px);
}
.history__thread svg { width: 100%; height: 100%; display: block; overflow: visible; }
.history__thread-bg {
  fill: none; stroke: var(--line); stroke-width: 1;
  stroke-dasharray: 5 6;
  vector-effect: non-scaling-stroke;
}
.history__thread-line {
  fill: none; stroke: var(--crimson); stroke-width: 1.8;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.history__item {
  display: grid; grid-template-columns: auto 1fr;
  gap: 1.6rem 2.4rem;
  align-items: baseline;
  padding: 1.7rem 0;
  position: relative;
}
.history__item::before {
  content: '';
  position: absolute;
  left: -2.1rem;
  top: 2.45rem;
  width: 1.5rem; height: 1px;
  background-image: repeating-linear-gradient(90deg, var(--crimson) 0 5px, transparent 5px 9px);
  opacity: 0.7;
}
.history__year {
  font-family: var(--font-display);
  font-weight: 500; font-style: italic;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  color: var(--crimson);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.history__body h3 {
  font-family: var(--font-jp); font-weight: 600;
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}
.history__body p { font-size: 0.85rem; color: var(--ink-soft); max-width: 48ch; }

/* ============ CTA + FOOTER — united ============ */
.footer {
  background: var(--night);
  color: var(--silver);
  padding: clamp(5rem, 11vh, 8.5rem) var(--pad) 2rem;
}
.footer__grid {
  display: grid; grid-template-columns: 1fr;
  gap: clamp(3rem, 6vw, 5.5rem);
  margin-bottom: clamp(3.5rem, 7vh, 5.5rem);
}
@media (min-width: 980px) { .footer__grid { grid-template-columns: 2fr 1fr; } }
.footer__label {
  display: block;
  font-size: 0.62rem; letter-spacing: 0.36em; font-weight: 600;
  color: #E14E79;
  margin-bottom: 1.8rem;
}
.contact__title {
  font-family: var(--font-jp); font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  line-height: 1.45;
  color: var(--ivory);
}
.contact__title em { color: #E14E79; }
.footer__sub {
  color: rgba(247, 244, 238, 0.65);
  font-size: 0.9rem;
  margin: 1.8rem 0 2.6rem;
  max-width: 46ch;
}
.footer__addresses {
  display: grid; grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: clamp(2.8rem, 5vh, 4rem);
}
@media (min-width: 640px) { .footer__addresses { grid-template-columns: 1fr 1fr; } }
.footer__addresses h4 {
  font-size: 0.6rem; letter-spacing: 0.28em; font-weight: 600;
  color: rgba(247, 244, 238, 0.8);
  margin-bottom: 0.6rem;
}
.footer__addresses p { font-size: 0.8rem; line-height: 2; }
.footer__links { display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 980px) {
  .footer__links {
    border-left: 1px dashed var(--line-light);
    padding-left: clamp(2rem, 3.5vw, 3.5rem);
  }
}
.footer__links a {
  display: flex; align-items: baseline; gap: 1.2rem;
  padding: 0.95rem 0;
  border-bottom: 1px dashed var(--line-light);
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--ivory);
  transition: padding-left 0.4s var(--ease-out), color 0.35s;
}
.footer__links a span {
  font-style: italic;
  font-size: 0.8rem;
  color: var(--silver);
  font-variant-numeric: tabular-nums;
}
.footer__links a:hover { color: #E14E79; padding-left: 0.9rem; }
.footer__brand { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer__name {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.2rem; color: var(--ivory);
}
.footer__jp { font-family: var(--font-jp); font-size: 0.68rem; letter-spacing: 0.3em; }
.footer__seam {
  height: 1px; margin: 2.8rem 0 1.6rem;
  background-image: repeating-linear-gradient(90deg, var(--line-light) 0 7px, transparent 7px 13px);
}
.footer__bottom {
  display: flex; flex-wrap: wrap; gap: 1rem 2rem;
  justify-content: space-between; align-items: center;
  font-size: 0.66rem; letter-spacing: 0.14em;
}
.footer__motto { font-family: var(--font-jp); letter-spacing: 0.2em; }

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .preloader { display: none; }
  .header__logo { opacity: 1; }
  .line__inner { transform: none; }
  .reveal { opacity: 1; transform: none; }
  .reveal-img img { clip-path: none; transform: none; }
  .hero__kicker, .hero__cta, .hero__media { opacity: 1; }
  .nav__word-inner { transform: none; }
  .nav__num { opacity: 1; transform: none; }
  .nav__jp { opacity: 1; }
  .craft__step { opacity: 1; transform: none; }
}
