:root {
  /* ── Design Tokens — SoT: この :root ブロック自体 (実装が正)。mock は参考のみ ── */
  /* Backgrounds — denim dark navy */
  --bg-hero:      #081420;   /* deepest: hero */
  --bg-base:      #0c1a2e;   /* base background */
  --bg-alt:       #0f2038;   /* alternate section */
  --bg-card:      #111f33;   /* card surface */
  --bg-header:    rgba(8, 20, 32, 0.88);

  /* Borders */
  --border-subtle: rgba(201, 138, 60, 0.18); /* denim-stitch tan tint */
  --border-card:   rgba(159, 176, 196, 0.14);

  /* Text */
  --text-primary:   #e8ecf2;
  --text-secondary: #9fb0c4;
  --text-muted:     #7391ad;

  /* Accent — denim stitch (tan / golden orange) */
  --gold:          #c98a3c;
  --gold-hover:    #e0a050;
  --gold-dark:     #a86f2c;

  /* Misc */
  --radius-card:  12px;
  --radius-btn:    6px;
  --transition:   0.22s ease;
  --max-w:        1120px;
  --header-h:     64px;

  /* Breakpoint tokens — SoT for responsive boundaries. @media conditions
     hard-code the px value (CSS custom props can't be used in media queries),
     but reference these names in comments. 769-968px is an intentional seam:
     nav collapses to the drawer while body content stays desktop-width. */
  --bp-nav: 968px;       /* header/footer drawer switch */
  --bp-content: 768px;   /* hero/section body layout */

}

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

html {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  scroll-behavior: smooth;
}

body {
  font-family: inherit;
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;

  /* ── Full-page denim ground — SoT: このブロック自体 (実装が正)。mock は参考のみ ──
     The entire page sits on this denim fabric; sections are transparent.
     Reverted to the production-derived layer stack that reads as natural
     woven denim (no regular twill-wale/grid lines — those looked synthetic).
     Kept the good colour-blotch (seed 29) + thread-jitter (seed 53) layers. */
  --warp: #081420; /* 濃藍（縦糸ベース） */
  --weft: #d0d4d8; /* 緯糸の淡色 */

  background-color: var(--warp);
  background-image:
    /* 毛羽 (fine fuzz) */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.25' numOctaves='5' seed='7'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)' opacity='0.12'/%3E%3C/svg%3E"),

    /* 色ムラ・擦れ (coarse colour blotch — low freq, seed 29) */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.018 0.022' numOctaves='4' seed='29'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.16'/%3E%3C/svg%3E"),

    /* 糸の乱れ (thread jitter — anisotropic freq, seed 53) */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='h'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.9 0.35' numOctaves='3' seed='53'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23h)' opacity='0.10'/%3E%3C/svg%3E"),

    /* ロープ染色 → 縦ムラ */
    repeating-linear-gradient(0deg,
      rgba(0,0,0,.35) 0 4px,
      rgba(255,255,255,.05) 4px 7px,
      rgba(0,0,0,.30) 7px 11px,
      rgba(255,255,255,.04) 11px 14px
    ),

    /* 緯糸（3層で位相ずらし） */
    repeating-linear-gradient(137deg, transparent 0 11px, var(--weft) 11px 12px),
    repeating-linear-gradient(132deg, transparent 0 12px, var(--weft) 12px 13px),
    repeating-linear-gradient(142deg, transparent 0 10px, var(--weft) 10px 11px),

    /* 畝：角度ズラし＋濃淡 */
    repeating-linear-gradient(134deg,
      rgba(255,255,255,.05) 0 3px,
      rgba(0,0,0,.22) 3px 7px,
      rgba(0,0,0,.28) 7px 11px
    ),

    /* ベース（濃藍の地） */
    linear-gradient(135deg, var(--warp), var(--warp));

  background-size:
    180px 180px,   /* fuzz */
    420px 420px,   /* colour blotch */
    240px 240px,   /* thread jitter */
    250px 100%,    /* rope dye */
    15px 15px,     /* weft 1 */
    17px 15px,     /* weft 2 */
    14px 17px,     /* weft 3 */
    14px 17px,     /* twill */
    cover;         /* base */

  background-blend-mode:
    soft-light, overlay, soft-light, overlay,
    soft-light, soft-light, soft-light, soft-light, normal;

  /* Keep the fabric fixed so it reads as one continuous bolt of denim */
  /* All layers scroll together as one bolt of fabric. Mixing fixed + scroll
     made the weave layers slide against each other on scroll, producing the
     artificial seams between sections. A single attachment keeps the denim
     a single continuous sheet down the whole page. */
  background-attachment: scroll;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--gold-hover);
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

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

button, .btn {
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  border: none;
  transition: all 0.3s ease;
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--gold-hover);
  outline-offset: 3px;
  border-radius: 4px !important;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 1200;
  background: var(--gold);
  color: #081420;
  padding: 8px 14px;
  border-radius: var(--radius-btn);
  font-weight: 600;
}

.skip-link:focus-visible {
  top: 12px;
  color: #081420;
}

/* ── Layout utilities ─────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .product-card:hover,
  a.btn-gold:hover,
  a.btn-outline:hover {
    transform: none !important;
  }
}
