/* ============================================================
   2案目（C案）
   PC: Figma "C案 / PC 1440" / SP: Figma "C案 / SP 390"
   ============================================================ */
:root {
  /* color */
  --color-ink: #111;
  --color-black: #000;
  --color-white: #fff;
  --color-navy: #203459;
  --color-bg: #f7f6f0;
  --color-yellow: #fcd726;
  --color-teal: #47cac6;
  --color-btn-gray: #ededed;

  /* font */
  --font-gothic: "Noto Sans JP", sans-serif;
  --font-nav: "Zen Kaku Gothic New", sans-serif;
  --tracking: 0.28px;

  /* layout */
  --header-h: 104px;

  /* Grain on the circles (same parameters as the Figma noise effect) */
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n' x='0' y='0' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6667' numOctaves='3' seed='9840' stitchTiles='stitch'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='2' intercept='-.5'/%3E%3CfeFuncG type='linear' slope='2' intercept='-.5'/%3E%3CfeFuncB type='linear' slope='2' intercept='-.5'/%3E%3CfeFuncA type='discrete' tableValues='.25 0'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul, figure { margin: 0; padding: 0; }
address { font-style: normal; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.sp-only { display: none; }
@media (max-width: 767px) {
  .pc-only { display: none !important; }
  .sp-only { display: block; }
}

body {
  font-family: var(--font-gothic);
  color: var(--color-ink);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header ---------- */
.header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 32px 24px;
  background: var(--color-white);
}
.header__logo {
  display: block;
  width: 122px;
  height: 30px;
  overflow: hidden;
}
.header__logo img {
  width: auto;
  max-width: none;
  height: 100%;
}
.header__right {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 14px;
  line-height: 14px;
  letter-spacing: var(--tracking);
  color: var(--color-navy);
  white-space: nowrap;
}
.nav-list a:hover { opacity: 0.7; }
.header__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 128px;
  height: 40px;
  border-radius: 4px;
  background: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 13px;
  line-height: 14px;
  letter-spacing: var(--tracking);
}
.header__cta:hover { opacity: 0.8; }
.nav-btn {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-white);
  border-radius: 20px;
  background: var(--color-btn-gray);
}
.nav-btn span {
  position: absolute;
  left: 10px;
  width: 18px;
  height: 1px;
  background: var(--color-navy);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-btn span:nth-child(1) { top: 13px; }
.nav-btn span:nth-child(2) { top: 18px; }
.nav-btn span:nth-child(3) { top: 23px; }
.nav-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Collapse nav before it overflows */
@media (max-width: 1199px) {
  .header__right { gap: 8px; }
  .nav-btn { display: block; }
  .header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    padding: 24px;
    border-radius: 8px;
    background: var(--color-white);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  }
  .header__nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: flex-start; gap: 20px; }
}
@media (max-width: 767px) {
  .header { padding: 16px; }
  :root { --header-h: 72px; }
  .header__logo { width: 100px; height: 24.72px; }
}

/* ---------- Main ---------- */
.main {
  overflow-x: clip;
}

/* ---------- FV ----------
   Figma "C案 / FV比較 / 実装外周＋元コピー＋背景タイポ" (1440 x 860).
   Layers, back to front: background words / yellow circle / main copy / media / CTA.
   The stage keeps the comp's proportions (1 Figma px = --u) and is centered, so the
   copy and the four media read as one visual; the background words span the full width. */
.fv {
  container-type: inline-size; /* FV sizes are derived from the page width (cqw); kept off .main so fixed layers below stay viewport-based */
  position: relative;
  overflow: hidden; /* circles and media may bleed past the edges */
  background: var(--color-bg);
}

/* Background typography (decorative) */
.fv__bg {
  --b: calc(100cqw / 1440); /* always fills the width */
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  font-weight: 900;
  line-height: 1.1;
  color: #1f1f1a;
  white-space: nowrap;
}
.fv__bg span {
  position: absolute;
  left: calc(var(--x) * var(--b));
  top: calc(var(--y) * var(--b));
  font-size: calc(var(--f) * var(--b));
  letter-spacing: -0.04em;
  opacity: var(--o);
}
.fv__bg .is-vertical { writing-mode: vertical-rl; line-height: 1; }

.fv__stage {
  position: relative;
  z-index: 1;
  width: calc(1440 * var(--u));
  height: calc(860 * var(--u));
  margin: 0 auto;
}

/* Yellow circle (CSS + grain) */
.fv__sun,
.fm__dot {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.fv__sun {
  left: calc(690 * var(--u));
  top: calc(-85 * var(--u));
  width: calc(610 * var(--u));
  height: calc(610 * var(--u));
  background: var(--noise), var(--color-yellow);
}

/* Main copy: live text, each glyph fitted to the Figma outline (--h = 1 px of the 580 x 530 copy box) */
.fv__copy {
  --h: calc(var(--u) * 1.12);
  position: absolute;
  left: calc(395 * var(--u));
  top: calc(88 * var(--u));
  width: calc(580 * var(--h));
  height: calc(530 * var(--h));
  font-weight: 900;
  line-height: 1;
  color: var(--color-ink);
  white-space: nowrap;
}
.fv__ch {
  position: absolute;
  left: calc(var(--x) * var(--h));
  top: calc(var(--y) * var(--h));
  font-size: calc(var(--f) * var(--h));
  transform: scaleX(var(--sx));
  transform-origin: 0 0;
}

/* Media: image, circle and label are separate elements; --w is the image box width */
.fm {
  position: absolute;
  margin: 0;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u));
}
.fm__img {
  position: relative;
  z-index: 1;
  display: block;
  overflow: hidden;
  aspect-ratio: var(--ar);
}
.fm__img img { position: absolute; max-width: none; }
/* Crops taken from the Figma image fills */
.fm--tv    { --ar: 365 / 268.87; }
.fm--sign  { --ar: 360 / 239.03; }
.fm--print { --ar: 330 / 275; }
.fm--movie { --ar: 440 / 227.1; }
.fm--tv .fm__img img    { left: -0.08%; top: 0.22%; width: 114.54%; height: 103.46%; }
.fm--sign .fm__img img  { inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fm--print .fm__img img { left: -13.32%; top: 0; width: 124.78%; height: 100%; }
.fm--movie .fm__img img { left: 0; top: -18.63%; width: 100%; height: 129.19%; }

.fm__dot {
  z-index: 0;
  left: var(--dot-x);
  top: var(--dot-y);
  width: var(--dot-d);
  aspect-ratio: 1;
  background: var(--noise), var(--color-teal);
}
/* Circle / label positions in % of the image box (from the Figma groups) */
.fm--tv    { --dot-x: 31.5%; --dot-y: 26%;   --dot-d: 68.5%; --lb-x: 9.6%;  --lb-y: 98.6%; }
.fm--sign  { --dot-x: 4.2%;  --dot-y: -9.2%; --dot-d: 70.8%; --lb-x: -3.3%; --lb-y: -8.4%; }
.fm--print { --dot-x: 22.7%; --dot-y: 25.5%; --dot-d: 75.8%; --lb-x: 0%;    --lb-y: 103.6%; }
.fm--movie { --dot-x: 33%;   --dot-y: -8.8%; --dot-d: 61.4%; --lb-x: 18%;   --lb-y: 85.4%; }

.fm__label {
  position: absolute;
  z-index: 2;
  left: var(--lb-x);
  top: var(--lb-y);
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  padding: 0.44em 0.75em;
  background: #0a0a0a;
  color: var(--color-white);
  font-weight: 700;
  font-size: max(12px, calc(16 * var(--u)));
  line-height: 1.2;
  white-space: nowrap;
}
.fm__en {
  font-size: 0.69em;
  color: #b3b3b3;
}

.cta {
  position: absolute;
  z-index: 3;
  /* Figma x 1038 y 782, 310 x 56 — anchored bottom-right so a min-size button grows inward */
  right: calc(92 * var(--u));
  bottom: calc(22 * var(--u));
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: calc(310 * var(--u));
  min-height: max(48px, calc(56 * var(--u)));
  padding: 0 1.5em;
  border: 2px solid var(--color-ink);
  background: var(--color-white);
  color: var(--color-ink);
  font-weight: 700;
  font-size: max(14px, calc(16 * var(--u)));
  line-height: 1.4;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.cta:hover { background: var(--color-ink); color: var(--color-white); }

/* --- PC / landscape --- */
@media (min-width: 1024px), (min-width: 768px) and (min-aspect-ratio: 1/1) {
  .fv__stage {
    /* width-based; eases down (to 85%) so the whole visual fits the screen height */
    --u: min(100cqw / 1440, max((100svh - var(--header-h)) / 860, 100cqw / 1440 * 0.85));
  }
  .fm--tv    { --x: -15;  --y: 105; --w: 365; }
  .fm--sign  { --x: 1120; --y: 125; --w: 360; }
  .fm--print { --x: 90;   --y: 490; --w: 330; }
  .fm--movie { --x: 1060; --y: 500; --w: 440; }
}

/* --- SP / portrait: 390-wide stage, the 4-line copy stays the centerpiece --- */
@media (max-width: 767px), (max-width: 1023px) and (max-aspect-ratio: 1/1) {
  .fv__stage {
    --u: min(100cqw / 390, max((100svh - var(--header-h)) / 790, 1px));
    width: calc(390 * var(--u));
    height: calc(790 * var(--u));
  }
  .fv__bg { --b: calc(100cqw / 390 * 0.62); }
  .fv__bg span { opacity: calc(var(--o) * 0.85); }
  .fv__sun {
    left: calc(150 * var(--u));
    top: calc(150 * var(--u));
    width: calc(300 * var(--u));
    height: calc(300 * var(--u));
  }
  .fv__copy {
    --h: calc(var(--u) * 350 / 580);
    left: calc(20 * var(--u));
    top: calc(196 * var(--u));
  }
  .fm--tv    { --x: -8;  --y: 26;  --w: 184; }
  .fm--sign  { --x: 206; --y: 40;  --w: 196; }
  .fm--print { --x: 6;   --y: 530; --w: 168; }
  .fm--movie { --x: 160; --y: 540; --w: 250; }
  .fm__label { font-size: 12px; }
  .cta {
    right: auto;
    bottom: auto;
    left: calc(20 * var(--u));
    top: calc(712 * var(--u));
    width: calc(350 * var(--u));
    min-height: 52px;
  }
}

/* ---------- Intro ----------
   「朝の駅から、〜アドサンで。」: pinned with position: sticky while scrolling;
   main.js maps the scroll position to CSS variables (--enter, --p1…--p4, --sun, --m-*).
   Without JS (or with reduced motion) the defaults below show the finished state:
   four black lines, the circle and the media, in a normal block. */
.intro {
  position: relative;
  background: var(--color-bg);
}
/* Background layer holding the yellow circle. Without JS it sits behind the first screen;
   with the scroll effect it is pinned for the whole section (copy → label lines). */
.intro__bg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  pointer-events: none;
}
.intro.has-pinned-bg .intro__bg {
  position: sticky;
  margin-bottom: -100svh; /* takes no space; the blocks below scroll over it */
}
.intro__scrolly,
.intro__body {
  position: relative;
  z-index: 1;
}

.intro__stage {
  --fs: min(6.2vw, 12.5svh, 108px);
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 64px 20px;
  overflow: hidden;
}
.intro__scrolly.is-scrolly {
  height: 230vh; /* the stage stays pinned for 230vh - 100svh (≈130vh) */
}
.intro__scrolly.is-scrolly .intro__stage {
  position: sticky;
  top: 0;
  height: 100svh;
}

/* Copy: grey base text (read by screen readers) + black ink copy revealed left to right */
.intro__title {
  position: relative;
  z-index: 2;
  font-weight: 900;
  font-size: var(--fs);
  line-height: 1.45;
  color: var(--color-ink);
  white-space: nowrap;
  opacity: var(--enter, 1);
  translate: 0 calc((1 - var(--enter, 1)) * 28px);
}
.intro__line {
  position: relative;
  display: block;
  width: max-content;
}
.intro__line--4 { font-size: 1.15em; }
.intro__line--1 { --p: var(--p1, 1); }
.intro__line--2 { --p: var(--p2, 1); }
.intro__line--3 { --p: var(--p3, 1); }
.intro__line--4 { --p: var(--p4, 1); }
.intro__base { color: #a8a59b; } /* light grey, still readable on the cream background */
.intro__ink {
  position: absolute;
  inset: 0;
  color: var(--color-ink);
  /* from fully hidden (p = 0) to fully shown (p = 1); 0.2em slack keeps glyph edges unclipped */
  clip-path: inset(-0.2em calc((1 - var(--p)) * (100% + 0.4em) - 0.2em) -0.2em -0.2em);
}

/* Yellow circle behind the copy, grows with the last line and stays for the label lines */
.intro__sun {
  position: absolute;
  left: 56%;
  top: 50%;
  width: min(60vw, 76svh);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--noise), var(--color-yellow);
  transform: translate(-50%, -50%) scale(var(--sun, 1));
  pointer-events: none;
}

/* Media: small, at the screen edges, never over the copy */
.intro__media { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.intro__m {
  position: absolute;
  height: auto;
  opacity: calc(var(--m, 1) * 0.92);
  translate: 0 calc((1 - var(--m, 1)) * 16px);
}
.intro__m--sign  { --m: var(--m-sign, 1);  right: 3vw; top: 14svh;    width: min(19vw, 30svh); }
.intro__m--tv    { --m: var(--m-tv, 1);    left: 3vw;  top: 14svh;    width: min(18vw, 28svh); }
.intro__m--print { --m: var(--m-print, 1); left: 4vw;  bottom: 10svh; width: min(16vw, 26svh); }
.intro__m--movie { --m: var(--m-movie, 1); right: 2vw; bottom: 12svh; width: min(22vw, 32svh); }

@media (max-width: 767px), (max-width: 1023px) and (max-aspect-ratio: 1/1) {
  .intro__stage { --fs: min(10.6vw, 8.6svh); padding: 48px 16px; }
  .intro__scrolly.is-scrolly { height: 190svh; }
  .intro__sun { left: 50%; width: min(88vw, 56svh); }
  .intro__m--tv    { left: 4vw;  top: 9svh;    width: min(34vw, 19svh); }
  .intro__m--sign  { right: 4vw; top: 7svh;    width: min(36vw, 20svh); }
  .intro__m--print { left: 5vw;  bottom: 7svh; width: min(32vw, 18svh); }
  .intro__m--movie { right: 2vw; bottom: 9svh; width: min(40vw, 22svh); }
}

/* Label lines + 「一日をたどる」: plain text on the same cream background as the copy above.
   Scroll-linked: the list stays pinned while the lines appear in reading order
   (each fades in from faint and rises slightly). main.js sets --l1…--l7 (0–1);
   without JS / with reduced motion they default to 1 (all shown). */
.intro__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 96px;
  color: var(--color-ink);
}
.intro__labels { width: 100%; }
.intro__labels-stage {
  display: grid;
  place-items: center;
  padding: 96px 0 72px;
}
.intro__labels.is-scrolly { height: 220vh; } /* pinned for 220vh - 100svh */
.intro__labels.is-scrolly .intro__labels-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  padding: 0;
}
.intro__lines {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5em;
  font-weight: 700;
  font-size: clamp(18px, 2.2vw, 36px);
  line-height: 1.6;
  letter-spacing: 0.06em;
}
.intro__lines li {
  --r: 1;
  white-space: nowrap;
  opacity: calc(0.12 + var(--r) * 0.88);
  translate: 0 calc((1 - var(--r)) * 14px);
}
.intro__lines li:nth-child(1) { --r: var(--l1, 1); }
.intro__lines li:nth-child(2) { --r: var(--l2, 1); }
.intro__lines li:nth-child(3) { --r: var(--l3, 1); }
.intro__lines li:nth-child(4) { --r: var(--l4, 1); }
.intro__lines li:nth-child(5) { --r: var(--l5, 1); }
.intro__lines li:nth-child(6) { --r: var(--l6, 1); }
.intro__lines li:nth-child(7) { --r: var(--l7, 1); }

.scroll-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.scroll-more__text {
  padding-left: 2.8px; /* balances the trailing letter-spacing */
  font-weight: 700;
  font-size: 14px;
  line-height: 14px;
  letter-spacing: 2.8px;
}
.scroll-more__arrow {
  position: relative;
  width: 1px;
  height: 40px;
  background: currentColor;
  animation: scroll-more-flow 2s ease-in-out infinite; /* same motion as 1案 */
}
.scroll-more__arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 1px;
  width: 9px;
  height: 9px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}
.scroll-more:hover { opacity: 0.7; }
@keyframes scroll-more-flow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-more__arrow { animation: none; }
}

@media (max-width: 767px), (max-width: 1023px) and (max-aspect-ratio: 1/1) {
  .intro__body { padding: 0 16px 80px; }
  .intro__labels-stage { padding: 64px 0 48px; }
  .intro__labels.is-scrolly { height: 200svh; }
  /* sized so the longest line (21 chars) fits on one line down to 320px */
  .intro__lines { font-size: clamp(13px, 4.1vw, 24px); letter-spacing: 0.04em; max-width: 100%; }
  .intro__lines li { white-space: normal; word-break: auto-phrase; }
}

/* ---------- Opening animation ----------
   Plays only while html.is-intro (set by the inline script in <head>). Every rule
   below is scoped to that class, so the finished FV is the normal layout.
   Timeline (ms): copy in 150–850 / hold / panel lifts 1450–2350 /
   media 1850–2750 (staggered 100) / header 2150–2650 / CTA 2350–2850 */
.opening { display: none; }

html.is-intro,
html.is-intro body { overflow: hidden; } /* scroll is locked only during the intro */

html.is-intro .opening {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
}
.opening__panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100lvh; /* covers the screen even when the address bar collapses */
  min-height: 100%;
  background: var(--noise), var(--color-yellow);
  pointer-events: auto;
  animation: opening-lift 900ms cubic-bezier(0.76, 0, 0.24, 1) 1450ms both;
}
.opening__copy {
  position: absolute;
  left: 50%;
  top: 50svh; /* centered in the visible area */
  display: flex;
  align-items: flex-start;
  gap: 1.214%;
  width: 88vw;
  transform: translate(-50%, -50%);
}
.opening__line { display: contents; }
.opening__g { display: block; height: auto; }
/* SVG widths from the Figma group (total 2595 incl. three 31.5 gaps) */
.opening__g--1 { width: 23.224%; }
.opening__g--2 { width: 24.506%; }
.opening__g--3 { width: 23.553%; }
.opening__g--4 { width: 25.078%; }
.opening__copy {
  animation:
    opening-copy-in 700ms cubic-bezier(0.22, 1, 0.36, 1) 150ms both,
    opening-copy-out 900ms cubic-bezier(0.76, 0, 0.24, 1) 1450ms forwards;
}

.opening__skip {
  position: absolute;
  right: 24px;
  /* inside the panel (100lvh tall): keep it in the visible area; it lifts away with the panel */
  top: calc(100svh - 68px - env(safe-area-inset-bottom, 0px));
  min-width: 72px;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--color-ink);
  background: transparent;
  color: var(--color-ink);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  pointer-events: auto;
}
.opening__skip:hover,
.opening__skip:focus-visible { background: var(--color-ink); color: var(--color-yellow); }

/* Smartphone / portrait: the same SVGs in two meaningful lines, no distortion */
@media (max-width: 767px), (max-width: 1023px) and (max-aspect-ratio: 1/1) {
  .opening__copy {
    flex-direction: column;
    align-items: center;
    gap: 2vw;
    width: 92vw;
  }
  .opening__line {
    display: flex;
    align-items: flex-start;
    gap: 2.435%;
    width: 100%;
  }
  .opening__line:first-child { width: 98.19%; } /* 1270 / 1293.5 */
  .opening__line:first-child .opening__g--1 { width: 48.67%; }
  .opening__line:first-child .opening__g--2 { width: 51.33%; }
  .opening__g--3 { width: 47.25%; }
  .opening__g--4 { width: 50.31%; }
  .opening__line .opening__g { flex: none; }
  .opening__skip { right: 16px; top: calc(100svh - 60px - env(safe-area-inset-bottom, 0px)); }
}

/* FV build-up while the panel lifts (final state = the normal layout) */
html.is-intro .header { animation: opening-fade-in 500ms ease 2150ms both; }
html.is-intro .fm {
  --in: 26px;
  animation: opening-media-in 600ms cubic-bezier(0.22, 1, 0.36, 1) var(--in-delay) both;
}
html.is-intro .fm--tv    { --dx: calc(var(--in) * -1); --dy: calc(var(--in) * -1); --in-delay: 1850ms; }
html.is-intro .fm--sign  { --dx: var(--in);            --dy: calc(var(--in) * -1); --in-delay: 1950ms; }
html.is-intro .fm--print { --dx: calc(var(--in) * -1); --dy: var(--in);            --in-delay: 2050ms; }
html.is-intro .fm--movie { --dx: var(--in);            --dy: var(--in);            --in-delay: 2150ms; }
html.is-intro .cta { animation: opening-fade-in 500ms ease 2350ms both; }
@media (max-width: 767px), (max-width: 1023px) and (max-aspect-ratio: 1/1) {
  html.is-intro .fm { --in: 12px; } /* gentler on small screens */
}

@keyframes opening-copy-in {
  from { opacity: 0; translate: 0 32px; }
  to   { opacity: 1; translate: 0 0; }
}
@keyframes opening-copy-out {
  to { translate: 0 -12vh; }
}
@keyframes opening-lift {
  to { transform: translateY(-100%); }
}
@keyframes opening-fade-in {
  from { opacity: 0; }
}
@keyframes opening-media-in {
  from { opacity: 0; translate: var(--dx) var(--dy); }
}

/* ============================================================
   After the intro: A Day in Osaka + following sections
   Content, order and gimmicks come from 1案 (proposal-01); the look follows C案.
   ============================================================ */
:root {
  --color-charcoal: #1d1d1b;
  --color-ph: #e5e2d6; /* image placeholder */
  --ink-72: rgba(17, 17, 17, 0.72);
  --ink-14: rgba(17, 17, 17, 0.14);
}

/* ---------- Day: one day in Osaka ----------
   Works without JS. With JS (html.is-day-js) the fixed time display, sun arc and
   walker appear while the scenes are on screen (.day.is-live); --day-bg follows the
   current scene's hour (morning/noon cream -> evening pale yellow -> night charcoal). */
.day {
  --day-bg: var(--color-bg);
  --day-fg: var(--color-ink);
  --day-fg2: var(--ink-72);
  --day-line: var(--ink-14);
  --day-word: rgba(17, 17, 17, 0.07);   /* large pale English words */
  --day-band: rgba(17, 17, 17, 0.035);  /* panel behind each scene's text */
  --day-label-bg: var(--color-ink);
  --day-label-fg: var(--color-white);
  --day-ph: var(--color-ph);
  --day-ph-fg: var(--ink-72);
  /* layout: the left gutter holds the time display on PC */
  --gutter: clamp(184px, 13.5vw, 240px);
  --pad-r: clamp(32px, 4.4vw, 80px);
  --main-max: 1400px;
  --ground: 84px; /* bottom band where the walker walks */
  position: relative;
  overflow-x: clip;
  background: var(--day-bg);
  color: var(--day-fg);
  transition: background-color 0.9s ease, color 0.6s ease;
}
.day.is-night {
  --day-fg: var(--color-bg);
  --day-fg2: rgba(247, 246, 240, 0.78);
  --day-line: rgba(247, 246, 240, 0.2);
  --day-word: rgba(247, 246, 240, 0.08);
  --day-band: rgba(247, 246, 240, 0.045);
  --day-label-bg: var(--color-bg);
  --day-label-fg: var(--color-ink);
  --day-ph: #3a3935;
  --day-ph-fg: rgba(247, 246, 240, 0.8);
}

/* Section head: giant pale English + bold Japanese title */
.day__head {
  position: relative;
  z-index: 1;
  padding: clamp(120px, 12vw, 200px) var(--pad-r) 0 var(--gutter);
}
.day__head > * { max-width: var(--main-max); margin-inline: auto; }
.day__en {
  font-weight: 900;
  font-size: min(11.4vw, 220px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--day-word);
}
.day__title {
  display: flex;
  align-items: center;
  gap: 0.4em;
  margin-top: 0.2em;
  font-weight: 900;
  font-size: clamp(30px, 2.9vw, 46px);
  line-height: 1.3;
  letter-spacing: 0.04em;
}
.day__title::before { /* small sun */
  content: "";
  flex: none;
  width: 0.62em;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--noise), var(--color-yellow);
}

/* ---------- Scenes ----------
   12-column grid. Rows: 1 English word / 2 media label / 3 text + link / 4 photo.
   Pattern A: text left, vertical copy on the photo's right edge.
   Pattern B: mirrored. Variants: --sub (small offset photo), --yoko (horizontal copy). */
.hours {
  position: relative;
  z-index: 1;
  padding: 0 var(--pad-r) 120px var(--gutter);
}
.hour {
  --en-fs: clamp(64px, 8.4vw, 150px);
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 1.7vw, 28px);
  max-width: var(--main-max);
  margin-inline: auto;
  padding: clamp(96px, 9vw, 152px) 0 0;
}
/* pale panel behind the English word, label and text (ends where the photo starts) */
.hour::before {
  content: "";
  grid-column: 1 / -1;
  grid-row: 1 / 4;
  z-index: -1;
  margin-top: calc(var(--en-fs) * 0.5);
  background: var(--day-band);
  transition: background-color 0.6s;
}
.hour__en {
  grid-column: 1 / -1;
  grid-row: 1;
  font-weight: 900;
  font-size: var(--en-fs);
  line-height: 0.9;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--day-word);
  pointer-events: none;
  transition: color 0.6s;
}
.hour--b .hour__en { text-align: right; }
/* Time label inside each scene: shown on SP and without JS; PC uses the fixed display */
.hour__time {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--day-fg2);
}
.hour__time span {
  font-weight: 900;
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--day-fg);
}
/* media label: black ground, white text (inverted at night) */
.hour__cat {
  grid-row: 2;
  justify-self: start;
  align-self: start;
  margin-top: 36px;
  padding: 6px 12px;
  background: var(--day-label-bg);
  color: var(--day-label-fg);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.06em;
  transition: background-color 0.6s, color 0.6s;
}
.hour__body {
  grid-row: 3;
  max-width: 520px;
  padding: 24px 0 56px;
}
.hour__text {
  font-weight: 500;
  font-size: 15px;
  line-height: 2.1;
  letter-spacing: 0.04em;
  color: var(--day-fg2);
}
/* service link: C案 outline button */
.hour__link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  min-height: 52px;
  margin-top: 28px;
  padding: 10px 18px 10px 22px;
  border: 2px solid var(--day-fg);
  color: var(--day-fg);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  transition: background-color 0.2s, color 0.2s, border-color 0.6s;
}
.hour__link-icon {
  flex: none;
  width: 14px;
  height: 13px;
  background: currentColor;
  -webkit-mask: url("../assets/arrow.svg") no-repeat center / 14px 13px;
  mask: url("../assets/arrow.svg") no-repeat center / 14px 13px;
}
.hour__link:hover { background: var(--day-fg); color: var(--day-bg); }

/* Main photo: the frame keeps its ratio, so a real <img> can replace the placeholder */
.hour__ph {
  position: relative;
  z-index: 0;
  grid-row: 4;
  aspect-ratio: var(--ratio, 16 / 9);
}
.hour__ph > img,
.hour__ph > .ph,
.hour__sub > img,
.hour__sub > .ph {
  display: flex;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Vertical copy on cream bands, overlapping the photo's edge.
   The column sits on the photo row and is lifted by 38% of its own height,
   so about 60% of it lies on the photo. */
.hour__title {
  z-index: 2;
  grid-row: 4;
  align-self: start;
  display: flex;
  flex-direction: row-reverse; /* first column on the right (vertical reading order) */
  align-items: flex-start;
  gap: 0.18em;
  translate: 0 -38%;
  font-weight: 900;
  font-size: clamp(30px, 2.8vw, 46px);
  line-height: 1;
  letter-spacing: 0.06em;
}
.hour__col {
  writing-mode: vertical-rl;
  padding: 0.5em 0.32em;
  background: var(--day-bg);
  transition: background-color 0.9s;
}
.hour__col:nth-child(2) { margin-top: 1.6em; }
.hour__col:nth-child(3) { margin-top: 3.2em; }

/* Pattern A */
.hour--a .hour__cat,
.hour--a .hour__body { grid-column: 1 / 8; margin-left: clamp(24px, 3vw, 48px); }
.hour--a .hour__ph { grid-column: 1 / -1; }
.hour--a .hour__title { grid-column: 9 / -1; justify-self: end; margin-right: clamp(24px, 3.4vw, 56px); }
/* Pattern B (mirrored) */
.hour--b .hour__cat,
.hour--b .hour__body { grid-column: 7 / -1; margin-right: clamp(24px, 3vw, 48px); }
.hour--b .hour__ph { grid-column: 2 / -1; }
.hour--b .hour__title { grid-column: 1 / 5; justify-self: start; }

/* Sub photo: on the side opposite the main photo, dropped lower */
.hour__sub {
  position: relative;
  z-index: 1;
  grid-row: 4;
  align-self: end;
  aspect-ratio: 4 / 5;
  margin-bottom: -120px;
}
.hour--sub { padding-bottom: 120px; }
.hour--a.hour--sub .hour__ph { grid-column: 1 / 10; }
.hour--a.hour--sub .hour__title { grid-column: 6 / 10; }
.hour--a.hour--sub .hour__sub { grid-column: 10 / -1; }
.hour--b.hour--sub .hour__ph { grid-column: 4 / -1; }
.hour--b.hour--sub .hour__title { grid-column: 4 / 8; margin-left: clamp(24px, 3.4vw, 56px); }
.hour--b.hour--sub .hour__sub { grid-column: 1 / 4; }

/* Horizontal variant (long copy): copy across the top, text on the right */
.hour--yoko .hour__title {
  grid-column: 1 / 8;
  grid-row: 2 / 4;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12em;
  translate: none;
  margin: 36px 0 56px clamp(24px, 3vw, 48px);
  font-size: clamp(32px, 3.3vw, 54px);
}
.hour--yoko .hour__col { writing-mode: horizontal-tb; padding: 0.12em 0.3em; margin: 0 !important; }
.hour--yoko .hour__col:nth-child(2) { margin-left: 1.2em !important; }
.hour--yoko .hour__cat,
.hour--yoko .hour__body { grid-column: 8 / -1; margin-right: 0; margin-left: clamp(8px, 1vw, 16px); }
.hour--yoko .hour__ph { grid-column: 1 / -1; }

/* 18:30: the lit sign, dusk turning to night (yellow afterglow across the scene) */
.hour--glow::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0 calc(-1 * var(--pad-r)) 30% calc(-1 * var(--gutter));
  background: linear-gradient(180deg, rgba(252, 215, 38, 0), rgba(252, 215, 38, 0.2) 50%, rgba(252, 215, 38, 0));
  pointer-events: none;
}

/* Image placeholders (replace with <img>) */
.day .ph {
  position: relative;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--day-ph);
  color: var(--day-ph-fg);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  transition: background-color 0.6s, color 0.6s;
}
.ph__note { font-weight: 700; }
.day .ph--night {
  align-items: flex-end;
  justify-content: flex-end;
  text-align: right;
  background: linear-gradient(180deg, #34322d 0%, #26251f 55%, #1a1a17 100%);
  color: var(--color-bg);
}
.ph__sign { /* stand-in for the lit sign */
  position: absolute;
  top: 14%;
  left: 50%;
  width: 40%;
  height: 30%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-yellow);
  color: var(--color-ink);
  font-weight: 900;
  font-size: clamp(24px, 3vw, 48px);
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  box-shadow: 0 0 60px 12px rgba(252, 215, 38, 0.45); /* the sign's light, not a UI shadow */
}

/* Reveal on scroll (JS adds .is-in; skipped with reduced motion) */
.is-day-reveal .hour [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.is-day-reveal .hour .hour__ph[data-reveal] { transition-delay: 0.1s; }
.is-day-reveal .hour .hour__title[data-reveal] { transition-delay: 0.25s; }
.is-day-reveal .hour .hour__body[data-reveal] { transition-delay: 0.2s; }
.is-day-reveal .hour .hour__sub[data-reveal] { transition-delay: 0.35s; }
.is-day-reveal .hour [data-reveal].is-in { opacity: 1; transform: none; }

/* End of the day: night fades back into the page color */
.day__end {
  height: 32vh;
  background: linear-gradient(to bottom, rgba(247, 246, 240, 0), var(--color-bg));
}

/* ---------- Fixed layers (JS only) ---------- */
.day__sky,
.day__ground,
.day__now { display: none; }
.is-day-js .day__sky,
.is-day-js .day__ground,
.is-day-js .day__now {
  display: block;
  position: fixed;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}
.is-day-js .day.is-live .day__sky,
.is-day-js .day.is-live .day__ground,
.is-day-js .day.is-live .day__now { opacity: 1; visibility: visible; }

/* Sky: big arc behind the content */
.is-day-js .day__sky { inset: 0; z-index: 0; }
.day__arc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.day__arc path {
  fill: none;
  stroke: var(--day-fg);
  stroke-width: 1;
  stroke-dasharray: 2 6;
  opacity: 0.3;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.6s;
}
/* vertical rule between the time display and the content */
.day__sky::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--gutter) - 24px);
  width: 1px;
  background: var(--day-line);
}
/* Sun: the C案 yellow with grain */
.day__sun {
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  margin: -24px 0 0 -24px;
  border-radius: 50%;
  background: var(--noise), var(--color-yellow);
  will-change: transform;
  transition: opacity 0.4s;
}

/* Ground: walker band at the bottom */
.is-day-js .day__ground {
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  height: var(--ground);
  background: linear-gradient(to top, var(--day-bg) 62%, transparent);
  color: var(--day-fg);
  transition: opacity 0.5s, visibility 0.5s, background-color 0.9s;
}
.day__ground::before {
  content: "";
  position: absolute;
  left: calc(var(--gutter) - 24px);
  right: 0;
  bottom: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.35;
}
.day__walk {
  position: absolute;
  left: 0;
  bottom: 22px;
  height: 56px;
  line-height: 0;
  will-change: transform;
}
.day__walk svg { display: block; width: auto; height: 100%; overflow: visible; transform: scaleX(-1); }
.day__walk path { fill: currentColor; }
.wk-legA, .wk-legB { transform-box: view-box; transform-origin: 53px 300px; }
.wk-arm { transform-box: view-box; transform-origin: 80px 160px; }
.wk-body { transform-box: view-box; }

/* Current time / place / progress */
.is-day-js .day__now {
  z-index: 4;
  left: 40px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--day-fg);
}
.now__label {
  position: absolute;
  left: -26px;
  top: 0;
  writing-mode: vertical-rl;
  white-space: nowrap;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--day-fg2);
}
.now__time {
  display: flex;
  font-weight: 900;
  font-size: clamp(44px, 3.4vw, 58px);
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
/* rolling digits */
.now__dg {
  display: block;
  width: 0.6em;
  height: 1.1em;
  overflow: hidden;
  transition: width 0.6s cubic-bezier(0.6, 0, 0.2, 1), opacity 0.4s;
}
.now__dg.is-blank { width: 0; opacity: 0; }
.now__col {
  display: block;
  transition: transform 0.7s cubic-bezier(0.6, 0, 0.2, 1);
}
.now__col span { display: block; height: 1.1em; line-height: 1.1em; text-align: center; }
.now__colon { line-height: 1.02; padding: 0 0.02em; }
.now__place {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.16em;
  transition: opacity 0.3s, transform 0.3s;
}
.now__place::before { /* yellow accent */
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-yellow);
}
.now__place.is-swap { opacity: 0; transform: translateY(6px); }
.now__prog {
  display: flex;
  gap: 4px;
  width: 120px;
  margin-top: 22px;
}
.now__prog i {
  flex: 1;
  height: 3px;
  background: var(--day-line);
  transition: background-color 0.4s;
}
.now__prog i.on { background: var(--day-fg); }
.now__prog i.is-cur { background: var(--color-yellow); }

/* PC with JS: the fixed display replaces the in-scene time label */
@media (min-width: 1024px) {
  .is-day-js .hour__time {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
/* Without JS (or with reduced motion handled in JS) the gutter is not needed */
html:not(.is-day-js) .day { --gutter: var(--pad-r); }
html:not(.is-day-js) .hour__time { align-self: start; margin: 32px clamp(24px, 3vw, 48px) 0; }
html:not(.is-day-js) .hour--b .hour__time { justify-content: flex-end; }
html:not(.is-day-js) .hour__cat { margin-top: 92px; }

@media (prefers-reduced-motion: reduce) {
  .wk-legA, .wk-legB, .wk-arm, .wk-body { transform: none !important; }
  .now__col, .now__dg, .now__place { transition: none; }
}

/* ---------- Day: TB / SP (single column, horizontal copy) ----------
   time -> label + copy -> photo -> text + link -> sub photo */
@media (max-width: 1023px) {
  .day {
    --gutter: 20px;
    --pad-r: 20px;
    --ground: 92px; /* tall enough to hold the chat button */
  }
  .day__head { max-width: 720px; margin: 0 auto; padding: 96px 20px 8px; }
  .day__en { font-size: min(calc((100vw - 40px) / 8.4), 84px); }
  .day__title { font-size: clamp(26px, 7vw, 36px); }
  .hours { max-width: 720px; margin: 0 auto; padding: 0 20px 72px; }
  .hour,
  .hour--sub {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 72px 0 0;
  }
  .hour::before { display: none; }
  .hour__en,
  .hour--b .hour__en {
    font-size: min(calc((100vw - 40px) / 6.8), 80px);
    text-align: right;
    margin-bottom: -0.32em;
  }
  .hour__time,
  html:not(.is-day-js) .hour__time { justify-content: flex-start; margin: 0 0 18px; }
  .hour__time span { font-size: 30px; }
  .hour__cat,
  .hour--a .hour__cat,
  .hour--b .hour__cat,
  .hour--yoko .hour__cat,
  html:not(.is-day-js) .hour__cat { align-self: flex-start; margin: 0 0 14px; font-size: 12px; }
  .hour__title,
  .hour--yoko .hour__title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    translate: none;
    margin: 0 0 24px;
    font-size: clamp(24px, 6.8vw, 34px);
    line-height: 1.45;
  }
  .hour__col,
  .hour--yoko .hour__col,
  .hour--yoko .hour__col:nth-child(2) {
    writing-mode: horizontal-tb;
    padding: 0;
    margin: 0 !important;
    background: none;
  }
  .hour__ph,
  .hour--a .hour__ph,
  .hour--b .hour__ph { aspect-ratio: 3 / 2; margin: 0; }
  .hour--glow .hour__ph { aspect-ratio: 4 / 5; }
  .hour__body,
  .hour--a .hour__body,
  .hour--b .hour__body,
  .hour--yoko .hour__body { max-width: none; margin: 0; padding: 24px 0 0; }
  .hour__text { font-size: 14px; line-height: 2; }
  .hour__link { margin-top: 22px; }
  .hour__sub {
    align-self: flex-end;
    width: 56%;
    aspect-ratio: 4 / 3;
    margin: 28px 0 0;
  }
  .day .ph { padding: 16px; font-size: 12px; }
  .ph__sign { font-size: 22px; }

  /* sky arc + sun + walker are gathered in the bottom band */
  .is-day-js .day__sky {
    top: auto;
    left: 0;
    right: 84px; /* keep clear of the chat button */
    bottom: 0;
    z-index: 4;
    height: var(--ground);
  }
  .day__sky::before { display: none; }
  .day__arc path { stroke-dasharray: 2 4; }
  .day__sun { width: 18px; height: 18px; margin: -9px 0 0 -9px; }
  .day__ground::before { left: 0; bottom: 14px; }
  .day__walk { bottom: 14px; height: 36px; }

  /* compact time bar at the top (only while the scenes are on screen) */
  .is-day-js .day__now {
    top: 0;
    left: 0;
    right: 0;
    transform: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    background: var(--day-bg);
    border-bottom: 1px solid var(--day-line);
    transition: opacity 0.5s, visibility 0.5s, background-color 0.9s;
  }
  .now__label { display: none; }
  .now__time { font-size: 28px; }
  .now__place { margin: 0; font-size: 12px; }
  .now__prog { width: 80px; margin: 0 0 0 auto; }
  .is-day-live .totop.is-show { opacity: 0; visibility: hidden; }
}

/* ---------- Common (sections after the day) ---------- */
.in {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
}
.sec {
  padding: 112px 0;
  border-top: 1px solid var(--ink-14);
  background: var(--color-bg);
}
.h2t {
  margin-bottom: 20px;
  font-weight: 900;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.45;
  letter-spacing: 0.04em;
}
.leadt {
  max-width: 760px;
  margin-bottom: 48px;
  font-weight: 500;
  font-size: 15px;
  line-height: 2.1;
  color: var(--ink-72);
}
.more {
  margin-top: 40px;
  text-align: right;
}
/* outline button with arrow (C案) */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 10px 18px 10px 22px;
  border: 2px solid var(--color-ink);
  color: var(--color-ink);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.04em;
  transition: background-color 0.2s, color 0.2s;
}
.link-arrow::after {
  content: "";
  flex: none;
  width: 14px;
  height: 13px;
  background: currentColor;
  -webkit-mask: url("../assets/arrow.svg") no-repeat center / 14px 13px;
  mask: url("../assets/arrow.svg") no-repeat center / 14px 13px;
}
.link-arrow:hover { background: var(--color-ink); color: var(--color-white); }
.sec .ph {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: var(--color-ph);
  color: var(--ink-72);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

/* ---------- Design: steps + stats ---------- */
.stp3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.stp3 a {
  display: block;
  padding-top: 24px;
  border-top: 3px solid var(--color-ink);
}
.stp3 b {
  display: inline-block;
  padding: 4px 10px;
  background: var(--color-ink);
  color: var(--color-white);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.14em;
}
.stp3 h4 { margin: 16px 0 10px; font-weight: 900; font-size: 19px; line-height: 1.6; }
.stp3 p { font-weight: 500; font-size: 14px; line-height: 1.9; color: var(--ink-72); }
.stp3 a:hover h4 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.statt {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 64px;
  border-top: 2px solid var(--color-ink);
  border-bottom: 2px solid var(--color-ink);
}
.statt a {
  display: block;
  padding: 28px 24px;
  border-right: 1px solid var(--ink-14);
  transition: background-color 0.2s;
}
.statt a:last-child { border-right: none; }
.statt a:hover { background: rgba(252, 215, 38, 0.35); }
.statt b {
  display: block;
  font-weight: 900;
  font-size: clamp(36px, 3.6vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.statt b small { margin-left: 4px; font-size: 14px; font-weight: 700; letter-spacing: 0.04em; }
.statt span { display: block; margin-top: 6px; font-weight: 700; font-size: 13px; color: var(--ink-72); }

/* ---------- Cards (works / vacancy): square photos, no frames ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}
.cards.c4 { grid-template-columns: repeat(4, 1fr); gap: 32px 24px; }
.card { display: block; }
.card .ph { aspect-ratio: 4 / 3; }
.cards.c4 .card .ph { aspect-ratio: 1 / 1; }
.card .b { padding-top: 16px; }
.card h3 { margin: 10px 0 8px; font-weight: 900; font-size: 17px; line-height: 1.6; }
.card p { font-weight: 500; font-size: 13px; line-height: 1.9; color: var(--ink-72); }
.card .nm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; font-weight: 900; font-size: 16px; }
.card .meta { font-weight: 500; font-size: 12px; line-height: 1.9; color: var(--ink-72); }
.card:hover h3,
.card:hover .nm { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
/* media label: black ground, white text */
.tag {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 5px 9px;
  background: var(--color-ink);
  color: var(--color-white);
  font-weight: 700;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.card .nm .tag { margin: 0; }

/* ---------- Omoi (message) ---------- */
.omoi {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 72px;
  align-items: center;
}
.sunset {
  position: relative;
  height: 280px;
  border-bottom: 2px solid var(--color-ink);
}
.sunset i {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 260px;
  height: 130px;
  margin-left: -130px;
  border-radius: 260px 260px 0 0;
  background: var(--noise), var(--color-yellow);
}
.sunset span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -34px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-align: center;
}
.omoi h2 {
  margin-bottom: 24px;
  font-weight: 900;
  font-size: clamp(22px, 2.1vw, 30px);
  line-height: 1.6;
  letter-spacing: 0.04em;
}
.omoi p {
  margin-bottom: 32px;
  font-weight: 500;
  font-size: 15px;
  line-height: 2.1;
  color: var(--ink-72);
}

/* ---------- FAQ ---------- */
.faqt a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 4px;
  border-bottom: 1px solid var(--ink-14);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.6;
  transition: background-color 0.2s;
}
.faqt a:first-child { border-top: 2px solid var(--color-ink); }
.faqt a::after {
  content: "";
  flex: none;
  width: 14px;
  height: 13px;
  background: currentColor;
  -webkit-mask: url("../assets/arrow.svg") no-repeat center / 14px 13px;
  mask: url("../assets/arrow.svg") no-repeat center / 14px 13px;
}
.faqt a:hover { background: rgba(252, 215, 38, 0.35); }

/* ---------- Contact ---------- */
.contact {
  padding: 96px 20px 104px;
  background: var(--noise), var(--color-yellow);
  color: var(--color-ink);
  text-align: center;
}
.contact .h {
  margin-bottom: 40px;
  font-weight: 900;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.6;
  letter-spacing: 0.04em;
}
.contact .bx {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.contact .b {
  display: block;
  width: 320px;
  padding: 22px 16px;
  border: 2px solid var(--color-ink);
  background: var(--color-ink);
  color: var(--color-white);
  line-height: 1.4;
  transition: background-color 0.2s, color 0.2s;
}
.contact .b + .b { background: var(--color-bg); color: var(--color-ink); }
.contact .b:hover { background: var(--color-white); color: var(--color-ink); }
.contact .b small { display: block; margin-bottom: 6px; font-weight: 700; font-size: 12px; }
.contact .b b { display: block; font-weight: 900; font-size: 26px; letter-spacing: 0.02em; }
.contact .b em { display: block; margin-top: 4px; font-style: normal; font-weight: 700; font-size: 11px; }

/* ---------- Footer ---------- */
.ft {
  padding: 24px 0 40px;
  background: var(--color-charcoal);
  color: var(--color-bg);
}
.ft .tp {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 56px;
  font-weight: 700;
  font-size: 11px;
}
.ft .tp a { padding: 0 14px; border-left: 1px solid rgba(247, 246, 240, 0.25); line-height: 1; }
.ft .tp a:first-child { border-left: none; }
.ft .bd {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: start;
}
.ft .logo img { width: 220px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.ft address { font-size: 12px; line-height: 1.9; color: rgba(247, 246, 240, 0.75); }
.ft .fnav {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 6px 48px;
  font-weight: 700;
  font-size: 13px;
  line-height: 2;
}
.ft a:hover { opacity: 0.7; }
.ft .cp { margin-top: 40px; font-size: 11px; text-align: center; color: rgba(247, 246, 240, 0.6); }

/* ---------- Page top ---------- */
.totop {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 100px;
  width: 44px;
  height: 44px;
  border: 2px solid var(--color-bg);
  background: var(--color-ink);
  color: var(--color-white);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.totop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask: url("../assets/arrow.svg") no-repeat center / 14px 13px;
  mask: url("../assets/arrow.svg") no-repeat center / 14px 13px;
  transform: rotate(-90deg);
}
.totop.is-show { opacity: 1; visibility: visible; }

/* ---------- Chatbot ---------- */
.chatbot {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 56px;
  padding: 8px 8px 8px 20px;
  border: 2px solid var(--color-bg);
  border-radius: 4px;
  background: var(--color-ink);
  transition: opacity 0.2s;
}
.chatbot:hover { opacity: 0.85; }
.chatbot__label {
  font-weight: 700;
  font-size: 14px;
  line-height: 20px;
  color: var(--color-white);
  white-space: nowrap;
}
.chatbot__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
}

/* ---------- Sections after the day: TB / SP ---------- */
@media (max-width: 1023px) {
  .cards.c4 { grid-template-columns: repeat(2, 1fr); }
  .omoi { gap: 48px; }
}
@media (max-width: 767px) {
  .in { padding: 0 20px; }
  .sec { padding: 72px 0; }
  .h2t { font-size: 26px; }
  .leadt { margin-bottom: 32px; font-size: 14px; }
  .more { margin-top: 32px; }

  .stp3 { grid-template-columns: 1fr; gap: 28px; }
  .statt { grid-template-columns: 1fr 1fr; margin-top: 48px; }
  .statt a { padding: 18px 14px; border-bottom: 1px solid var(--ink-14); }
  .statt a:nth-child(2n) { border-right: none; }
  .statt a:nth-child(n+3) { border-bottom: none; }
  .statt b { font-size: 34px; }
  .statt span { font-size: 12px; }

  .cards, .cards.c4 { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
  .cards:not(.c4) { grid-template-columns: 1fr; gap: 32px; }
  .card p, .card .meta { font-size: 12px; }
  .card .nm { font-size: 14px; }

  .omoi { grid-template-columns: 1fr; gap: 64px; }
  .sunset { height: 160px; }
  .sunset i { width: 180px; height: 90px; margin-left: -90px; }
  .omoi h2 { font-size: 22px; }
  .omoi p { font-size: 14px; }

  .faqt a { padding: 20px 4px; font-size: 15px; }

  .contact { padding: 72px 20px 80px; }
  .contact .h { font-size: 20px; margin-bottom: 28px; }
  .contact .b { width: 100%; }

  .ft .tp { justify-content: flex-start; margin-bottom: 32px; }
  .ft .bd { grid-template-columns: 1fr; gap: 24px; }
  .ft .fnav { grid-template-columns: 1fr 1fr; gap: 10px 16px; font-size: 12px; }

  .totop { bottom: 96px; }
  .chatbot {
    right: 10px;
    bottom: 24px;
    width: 60px;
    height: 60px;
    padding: 0;
  }
  .chatbot__label { display: none; }
  .chatbot__icon { width: 56px; height: 56px; }
}
