/* ============================================================
   217 Products — ukiyo-e maximalist edition
   Bright washi + sumi + vermilion + gold. Layered 3D-parallax
   hero, immersive image sections, HubX scroll mechanics, brush
   217 identity and cel-shaded anime illustrations.
   ============================================================ */

:root {
  --paper: #F3ECDC;
  --paper-2: #ECE1C9;
  --paper-3: #E4D7BB;
  --ink: #1E1A16;
  --ink-2: #6C6154;
  --ink-dim: #C9BEA6;
  --vermilion: #E24B26;
  --vermilion-deep: #C13C1B;
  --gold: #C39A46;
  --gold-deep: #A67C2E;
  --sage: #7E8E6C;
  --pad: clamp(22px, 5vw, 90px);
  --maxw: 1220px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 400; line-height: 1.65; color: var(--ink);
  background: var(--paper);
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
::selection { background: var(--vermilion); color: var(--paper); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--vermilion); outline-offset: 4px; border-radius: 2px; }
img { max-width: 100%; height: auto; display: block; }

.display { font-family: "Shippori Mincho", Georgia, serif; font-weight: 700; letter-spacing: 0.004em; }
.gold { color: var(--gold-deep); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--pad);
  background: linear-gradient(180deg, rgba(243,236,220,0.92), rgba(243,236,220,0));
  backdrop-filter: blur(4px);
}
.brand-mark { width: 78px; height: 78px; }
.nav-links { display: flex; gap: clamp(12px, 2vw, 30px); align-items: center; }
.nav-links a { font-size: 13px; font-weight: 600; letter-spacing: 0.03em; color: var(--ink-2); transition: color 0.25s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { color: var(--vermilion) !important; }
.nav-alt { color: var(--gold-deep) !important; }
.nav-toggle { display: none; width: 44px; height: 44px; background: none; border: 0; padding: 10px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; z-index: 60; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s ease, opacity 0.2s ease; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 0 0 0 auto; width: min(78vw, 300px);
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 26px;
    padding: var(--pad);
    background: var(--paper); box-shadow: -20px 0 60px rgba(30,26,22,0.18);
    transform: translateX(100%); transition: transform 0.42s cubic-bezier(0.7,0,0.2,1);
    z-index: 50;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 19px; color: var(--ink); }
}

/* ---------- shared ---------- */
main { position: relative; z-index: 2; }
section { padding: clamp(96px, 15vh, 210px) var(--pad); position: relative; }
.eyebrow, .kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.36em; color: var(--vermilion); }
.big { font-size: clamp(44px, 8.4vw, 128px); }
.rise { will-change: transform, opacity; }

.tate {
  position: absolute; top: 18vh; z-index: 4;
  writing-mode: vertical-rl; font-family: "Shippori Mincho", serif;
  font-size: 13px; letter-spacing: 0.4em; color: var(--ink-2); opacity: 0.7;
}
.tate-l { left: clamp(10px, 2.5vw, 34px); }
.tate-r { right: clamp(10px, 2.5vw, 34px); color: var(--vermilion); }
@media (max-width: 860px) { .tate { display: none; } }

/* ---------- 1 · hero (3D parallax) ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
}
.hero-scene { position: absolute; inset: 0; }
.pl { position: absolute; will-change: transform, opacity; }
.pl-sky, .pl-mount, .pl-torii, .pl-fore {
  inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 46%;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(135% 105% at 50% 46%, rgba(243,236,220,0) 0%, rgba(243,236,220,0.16) 62%, rgba(243,236,220,0.55) 100%),
    linear-gradient(180deg, rgba(243,236,220,0.12) 0%, transparent 22%, transparent 72%, var(--paper) 100%);
}

.hero-content { position: relative; z-index: 5; will-change: transform; }
.kicker { margin-bottom: 26px; }
.hero-heads { display: grid; position: relative; }
.hero-heads .head {
  grid-area: 1 / 1; margin: 0;
  font-family: "Shippori Mincho", Georgia, serif; font-weight: 800;
  font-size: clamp(48px, 8.8vw, 132px); line-height: 0.98; letter-spacing: -0.015em;
  text-shadow: 0 1px 3px rgba(243,236,220,0.85), 0 2px 44px rgba(243,236,220,0.7);
  opacity: 0;
}
.hero-heads .head.is-active { opacity: 1; }
.hero-heads .head em { font-style: italic; color: var(--vermilion); }
.hero-sub { margin: 26px auto 0; font-size: clamp(15px, 1.7vw, 20px); color: var(--ink-2); max-width: 44ch; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 14px 28px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn.primary { background: var(--vermilion); color: #fff; box-shadow: 0 14px 30px rgba(226,75,38,0.28); }
.btn.primary:hover { transform: translateY(-2px); background: var(--vermilion-deep); }
.btn.quiet { border: 1px solid rgba(30,26,22,0.3); color: var(--ink); background: rgba(243,236,220,0.6); }
.btn.quiet:hover { transform: translateY(-2px); border-color: var(--gold-deep); color: var(--gold-deep); }
.hero-cta { margin-top: 38px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.scroll-cue { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 0.28em; color: var(--ink-2); }
.scroll-cue i { width: 30px; height: 1px; background: currentColor; position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--vermilion); animation: slide 2.2s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-120%);} 60%,100% { transform: translateX(260%);} }

/* ---------- 2 · marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid rgba(30,26,22,0.14); border-bottom: 1px solid rgba(30,26,22,0.14); background: var(--paper-2); padding: 16px 0; }
.marquee-row { display: inline-flex; align-items: center; gap: 26px; white-space: nowrap; will-change: transform; }
.marquee-row span { font-family: "Shippori Mincho", serif; font-weight: 600; font-size: clamp(15px, 1.8vw, 22px); letter-spacing: 0.06em; color: var(--ink); }
.marquee-row .dot { color: var(--vermilion); font-size: 13px; }

/* ---------- 3 · manifesto ---------- */
.statement { max-width: var(--maxw); margin: 0 auto; }
.section-seal {
  position: absolute; top: clamp(50px, 8vh, 120px); right: clamp(20px, 6vw, 120px);
  font-family: "Shippori Mincho", serif; font-size: clamp(90px, 16vw, 260px); font-weight: 800;
  color: rgba(226,75,38,0.08); z-index: 0; pointer-events: none; user-select: none;
}
.statement .display { margin-top: 24px; font-size: clamp(40px, 7vw, 104px); line-height: 1.0; position: relative; }
.brighten {
  margin-top: clamp(40px, 6vh, 84px); position: relative;
  font-family: "Shippori Mincho", Georgia, serif;
  font-size: clamp(22px, 3vw, 42px); font-weight: 500; line-height: 1.4; letter-spacing: -0.005em; max-width: 24ch;
}
.brighten .w { color: var(--ink-dim); transition: color 0.1s linear; }

/* ---------- 4 · pinned hub ---------- */
.hub { padding: 0; }
.hub-pin {
  position: relative; height: 100svh; min-height: 600px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(18px, 3.4vh, 46px); overflow: hidden;
}
.hub-mist { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 130%; max-width: none; opacity: 0.08; mix-blend-mode: multiply; pointer-events: none; }
.hub-stage { position: relative; width: min(84vw, 58vh, 620px); aspect-ratio: 1; }
.hub-ribbons { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ribbon { fill: none; stroke: var(--vermilion); stroke-width: 8; stroke-linecap: round; opacity: 0.85; }
.ribbon-gold { stroke: var(--gold); }
.hub-enso { position: absolute; inset: 2%; width: 96%; height: 96%; overflow: visible; }
.enso-path { fill: none; stroke: var(--ink); stroke-width: 12; stroke-linecap: round; opacity: 0.9; }
.hub-core { position: absolute; top: 50%; left: 50%; width: 46%; aspect-ratio: 1; display: grid; place-items: center; }
.hub-mark { width: 82%; height: auto; }
.hub-ring { position: absolute; inset: -20%; width: 140%; height: 140%; animation: spin 30s linear infinite; }
.hub-ring text { fill: var(--ink-2); font-size: 12px; font-weight: 600; letter-spacing: 0.22em; font-family: "Manrope", sans-serif; }
@keyframes spin { to { transform: rotate(360deg); } }
.hub-seal {
  position: absolute; z-index: 3; width: clamp(70px, 15%, 100px); aspect-ratio: 1;
  display: grid; place-items: center; text-align: center;
  border: 2px solid var(--vermilion); color: var(--vermilion); border-radius: 14px;
  background: rgba(243,236,220,0.72); backdrop-filter: blur(2px);
  font-weight: 700; font-size: 12px; letter-spacing: 0.04em; box-shadow: 0 12px 30px rgba(30,26,22,0.12);
}
.hub-seal span { padding: 4px; }
.seal-osnote { left: 0%; top: 62%; }
.seal-next { right: 2%; top: 14%; color: var(--gold-deep); border-color: var(--gold); }
.seal-idea { right: 8%; top: 72%; color: var(--sage); border-color: var(--sage); }
.hub-caption { text-align: center; font-family: "Shippori Mincho", Georgia, serif; font-size: clamp(20px, 2.8vw, 36px); line-height: 1.3; color: var(--ink); position: relative; z-index: 3; }

/* ---------- 5 · products ---------- */
.products { max-width: var(--maxw); margin: 0 auto; }
.product { margin-top: 52px; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.product-art { position: relative; padding: 12px; background: #fff; border-radius: 4px; box-shadow: 0 30px 70px rgba(30,26,22,0.16), 0 0 0 1px var(--gold), 0 0 0 8px rgba(195,154,70,0.12); }
.product-art img { border-radius: 2px; display: block; width: 100%; height: auto; }
.frame-seal, .section-seal.s2 { position: absolute; }
.frame-seal {
  right: -20px; bottom: -20px; width: 60px; height: 60px; display: grid; place-items: center;
  background: var(--vermilion); color: #fff; border-radius: 10px; transform: rotate(-6deg);
  font-family: "Shippori Mincho", serif; font-weight: 700; font-size: 24px; box-shadow: 0 10px 26px rgba(226,75,38,0.4);
}
.product h3 { font-size: clamp(46px, 6.5vw, 92px); line-height: 1; }
.product-sub { margin-top: 16px; font-size: clamp(16px, 1.8vw, 21px); color: var(--ink-2); max-width: 30ch; }
.features { list-style: none; margin-top: 30px; }
.features li { padding: 14px 0 14px 26px; position: relative; border-top: 1px solid rgba(30,26,22,0.12); font-size: 15px; font-weight: 500; }
.features li:last-child { border-bottom: 1px solid rgba(30,26,22,0.12); }
.features li::before { content: ""; position: absolute; left: 0; top: 50%; margin-top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--vermilion); }
.features + .btn { margin-top: 30px; }
.growing { margin-top: clamp(60px, 9vh, 120px); display: flex; align-items: center; justify-content: center; gap: 16px; text-align: center; font-family: "Shippori Mincho", Georgia, serif; font-size: clamp(20px, 2.8vw, 36px); color: var(--ink-2); }
.growing-mark { display: inline-grid; place-items: center; width: 54px; height: 54px; flex: none; border: 2px solid var(--sage); color: var(--sage); border-radius: 50%; font-size: 22px; }

/* ---------- 6 · craft (immersive) ---------- */
.craft { position: relative; min-height: 92svh; display: flex; align-items: center; overflow: hidden; padding-block: clamp(120px, 18vh, 220px); }
.craft-bg { position: absolute; inset: -12% 0; z-index: 0; }
.craft-bg img { width: 100%; height: 100%; object-fit: cover; }
.craft::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(243,236,220,0.82) 0%, rgba(243,236,220,0.4) 48%, rgba(243,236,220,0.04) 100%); z-index: 1; }
.craft-inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.craft .display { margin-top: 22px; font-size: clamp(38px, 6.2vw, 92px); line-height: 1.02; text-shadow: 0 1px 3px rgba(243,236,220,0.8); }
.craft-lead { margin-top: 28px; font-size: clamp(16px, 1.9vw, 22px); color: var(--ink); max-width: 40ch; text-shadow: 0 1px 2px rgba(243,236,220,0.85); }

/* ---------- 7 · studio / values ---------- */
.studio { max-width: var(--maxw); margin: 0 auto; }
.studio .display { margin-top: 24px; font-size: clamp(38px, 6.4vw, 92px); line-height: 1.0; }
.values { margin-top: clamp(56px, 8vh, 110px); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: clamp(24px, 3vw, 48px); }
.value { padding: 30px 26px; border: 1px solid rgba(30,26,22,0.14); border-radius: 8px; background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(236,225,201,0.35)); transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease; }
.value:hover { transform: translateY(-6px); box-shadow: 0 26px 50px rgba(30,26,22,0.1); border-color: var(--gold); }
.value-seal { display: inline-grid; place-items: center; width: 48px; height: 48px; background: var(--vermilion); color: #fff; border-radius: 12px; font-family: "Shippori Mincho", serif; font-size: 24px; font-weight: 700; box-shadow: 0 8px 20px rgba(226,75,38,0.3); }
.value h4 { margin-top: 20px; font-size: 22px; font-weight: 700; }
.value p { margin-top: 10px; font-size: 15px; color: var(--ink-2); }

/* ---------- 8 · process ---------- */
.process { max-width: var(--maxw); margin: 0 auto; }
.process .display { margin-top: 24px; font-size: clamp(38px, 6.4vw, 92px); line-height: 1.0; }
.steps { list-style: none; margin-top: clamp(48px, 7vh, 90px); }
.steps li { display: grid; grid-template-columns: 92px minmax(0, 230px) 1fr; gap: clamp(14px, 3vw, 48px); align-items: baseline; padding: clamp(22px, 3vh, 34px) 0; border-top: 1px solid rgba(30,26,22,0.14); transition: padding-left 0.3s ease; }
.steps li:last-child { border-bottom: 1px solid rgba(30,26,22,0.14); }
.steps li:hover { padding-left: 10px; }
.step-n { font-size: 13px; font-weight: 700; color: var(--vermilion); letter-spacing: 0.08em; }
.step-t { font-family: "Shippori Mincho", Georgia, serif; font-size: clamp(24px, 3vw, 44px); font-weight: 700; }
.step-d { font-size: 15px; color: var(--ink-2); }

/* ---------- 9 · stats ---------- */
.stats { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: clamp(24px, 4vw, 60px); padding-block: clamp(70px, 10vh, 130px); border-top: 1px solid rgba(30,26,22,0.14); border-bottom: 1px solid rgba(30,26,22,0.14); text-align: center; }
.stat-n { display: block; font-family: "Shippori Mincho", serif; font-weight: 800; font-size: clamp(44px, 6vw, 84px); line-height: 1; color: var(--vermilion); }
.stat-l { display: block; margin-top: 10px; font-size: 13px; letter-spacing: 0.08em; color: var(--ink-2); }

/* ---------- 10 · final ---------- */
.final { position: relative; max-width: var(--maxw); margin: 0 auto; text-align: center; min-height: 88svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.final-branch { position: absolute; top: 4%; right: -4%; width: clamp(180px, 26vw, 380px); opacity: 0.7; z-index: 0; transform: scaleX(-1); }
.final .display, .final .cta { position: relative; z-index: 2; }
.final .display { line-height: 1.0; }
.cta { margin-top: 42px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* ---------- footer ---------- */
.foot { padding: clamp(60px, 9vh, 110px) var(--pad) clamp(40px, 6vh, 70px); max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; border-top: 1px solid rgba(30,26,22,0.14); }
.foot-logo { width: clamp(120px, 16vw, 180px); height: auto; }
.foot-meta { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); text-align: right; }
.foot-meta a:hover { color: var(--vermilion); }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .product { grid-template-columns: 1fr; gap: 40px; }
  .product-art { order: -1; }
  .steps li { grid-template-columns: 54px 1fr; grid-row-gap: 6px; }
  .step-d { grid-column: 1 / -1; }
  .foot { flex-direction: column; text-align: center; }
  .foot-meta { text-align: center; }
  .craft::after { background: linear-gradient(180deg, rgba(243,236,220,0.6) 0%, rgba(243,236,220,0.92) 100%); }
}
@media (max-width: 560px) {
  .hub-ring text { font-size: 10.5px; letter-spacing: 0.14em; }
  .pl-branch { width: 46vw; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hub-ring, .marquee-row, .scroll-cue i::after { animation: none; }
  .brighten .w { color: var(--ink); }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   cross-browser + responsive hardening
   ============================================================ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: hidden; }
.nav { -webkit-backdrop-filter: blur(4px); }
.hub-seal { -webkit-backdrop-filter: blur(2px); }

/* small-viewport-unit fallback (older iOS / Android) */
@supports not (height: 100svh) {
  .hero { min-height: 100vh; }
  .hub-pin { height: 100vh; }
  .craft { min-height: 92vh; }
  .final { min-height: 88vh; }
}

/* ---------- tablets & phones (touch: hub is a normal section) ---------- */
@media (max-width: 820px) {
  .hero { padding-top: clamp(104px, 15vh, 150px); }
  /* portrait crop that keeps the torii + valley in frame */
  .hero-scene .pl { object-position: 32% 46%; }
  .hub { padding: 0; }
  .hub-pin { height: auto; min-height: 86svh; padding: clamp(90px,13vh,150px) var(--pad); gap: clamp(26px,5vh,52px); }
  .section-seal { font-size: clamp(80px, 22vw, 180px); }
}
@supports not (height: 86svh) { @media (max-width: 820px) { .hub-pin { min-height: 640px; } } }

/* ---------- phones ---------- */
@media (max-width: 600px) {
  .hero-heads .head { font-size: clamp(33px, 11.4vw, 54px); line-height: 1.03; max-width: 100%; }
  .hero-sub { font-size: 15px; max-width: 32ch; }
  .hero-cta { gap: 10px; }
  .btn { padding: 12px 20px; font-size: 13px; }
  .statement .display, .studio .display, .process .display, .craft .display { font-size: clamp(33px, 9.2vw, 54px); }
  .final .display.big { font-size: clamp(37px, 10.6vw, 58px); }
  .brighten { font-size: clamp(20px, 5.8vw, 29px); max-width: 100%; }
  .product h3 { font-size: clamp(42px, 12.6vw, 68px); }
  .hub-stage { width: min(90vw, 66vh, 440px); }
  .marquee-row span { font-size: 15px; }
  .marquee-row { gap: 20px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 32px 18px; }
  .values { gap: 22px; }
  .steps li { grid-template-columns: 46px 1fr; }
  .foot-logo { width: 128px; }
  .growing { flex-direction: column; gap: 12px; }
}

/* ---------- very small ---------- */
@media (max-width: 380px) {
  :root { --pad: 18px; }
  .hero-heads .head { font-size: 32px; }
  .brand-mark { width: 58px; height: 58px; }
}
