/* =========================================================
   INDISOY — Premium Fermented Soy Sauce
   Design tokens + global styles
   ========================================================= */

:root {
  --color-red: #d21f27;
  --color-red-dark: #a1131a;
  --color-red-glow: rgba(210, 31, 39, 0.18);
  --color-charcoal: #1a1a1a;
  --color-ink: #0d0d0d;
  --color-warm-white: #faf7f2;
  --color-white: #ffffff;
  --color-line: #ececec;
  --color-muted: #6b6b6b;
  --font-display: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-jp: "Noto Serif JP", serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 12px 30px -12px rgba(0, 0, 0, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--color-charcoal);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, .display-serif {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--color-ink);
  line-height: 1.1;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-red);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--color-red);
  display: inline-block;
}

.jp-mark {
  font-family: var(--font-jp);
  color: var(--color-red);
  opacity: 0.9;
}

a { color: inherit; text-decoration: none; transition: color .3s var(--ease); }
a:hover { color: var(--color-red); }

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

.container-xxl { max-width: 1360px; }

/* ========== Buttons ========== */
.btn { border-radius: 0; font-weight: 600; letter-spacing: 0.04em; padding: 0.9rem 1.75rem; font-size: 0.85rem; text-transform: uppercase; transition: all .35s var(--ease); border: 1px solid transparent; }
.btn-primary-red { background: var(--color-red); color: #fff; border-color: var(--color-red); }
.btn-primary-red:hover { background: var(--color-red-dark); border-color: var(--color-red-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 12px 24px -10px var(--color-red-glow); }
.btn-outline-dark { background: transparent; color: var(--color-ink); border-color: var(--color-ink); }
.btn-outline-dark:hover { background: var(--color-ink); color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-outline-light:hover { background: #fff; color: var(--color-ink); }
.btn-ghost { padding: 0; background: transparent; color: var(--color-ink); border: none; position: relative; text-transform: uppercase; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.15em; }
.btn-ghost::after { content: ""; display: block; width: 100%; height: 1px; background: currentColor; transform-origin: right; transform: scaleX(1); transition: transform .5s var(--ease); }
.btn-ghost:hover { color: var(--color-red); }
.btn-ghost:hover::after { transform-origin: left; transform: scaleX(0.4); }

/* ========== Header ========== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1050;
  padding: 1.1rem 0;
  transition: background .4s var(--ease), padding .4s var(--ease), box-shadow .4s var(--ease);
  background: transparent;
}
.site-header .navbar-brand img { height: 46px; width: auto; transition: filter .3s var(--ease); }
.site-header .nav-link {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.5rem 1rem !important;
  position: relative;
}
.site-header .nav-link::after {
  content: ""; position: absolute; left: 1rem; right: 1rem; bottom: 0.25rem;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.site-header .nav-link:hover::after,
.site-header .nav-link.active::after { transform: scaleX(1); transform-origin: left; }
.site-header .btn-header {
  background: var(--color-red); color: #fff; border: none;
  padding: 0.7rem 1.4rem; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
}
.site-header .btn-header:hover { background: var(--color-red-dark); color: #fff; }

/* Solid state (scrolled OR non-hero pages) */
.site-header.is-solid {
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(14px);
  padding: 0.6rem 0;
  box-shadow: 0 1px 0 var(--color-line);
}
.site-header.is-solid .nav-link { color: var(--color-ink); }
.site-header.is-solid .navbar-toggler { color: var(--color-ink); }

.navbar-toggler {
  border: none; padding: 0.25rem 0.5rem; color: #fff;
  background: transparent; font-size: 1.6rem;
}
.navbar-toggler:focus { box-shadow: none; }

/* Mobile menu */
@media (max-width: 991px) {
  .site-header .navbar-collapse {
    background: #fff;
    margin: 1rem -1rem -1.1rem;
    padding: 1.25rem 1.5rem 1.75rem;
    border-top: 1px solid var(--color-line);
  }
  .site-header .nav-link { color: var(--color-ink) !important; padding: 0.75rem 0 !important; }
  .site-header .nav-link::after { display: none; }
  .site-header .btn-header { margin-top: 0.75rem; display: inline-block; }
}

/* ========== HERO ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  transform: scale(1.06);
  animation: heroZoom 14s var(--ease) forwards;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0.75) 100%);
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__inner { padding: 8rem 0 6rem; width: 100%; }
.hero__eyebrow {
  color: #fff; opacity: 0.85;
  display: inline-flex; align-items: center; gap: 0.75rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase;
}
.hero__eyebrow::before { content: ""; width: 40px; height: 1px; background: var(--color-red); display: inline-block; }
.hero__title {
  font-size: clamp(2.8rem, 6.5vw, 6rem);
  color: #fff; margin: 1.25rem 0 1.5rem;
  font-weight: 400;
}
.hero__title em { font-style: italic; color: var(--color-red); font-family: var(--font-display); }
.hero__lede {
  max-width: 640px; font-size: 1.05rem; opacity: 0.85; margin-bottom: 2.25rem;
}
.hero__meta {
  position: absolute; right: 3rem; bottom: 3rem;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 0.7rem; letter-spacing: 0.4em; text-transform: uppercase; opacity: 0.6;
}
.hero__scroll {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  color: #fff; opacity: 0.7; font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.hero__scroll::after {
  content: ""; width: 1px; height: 40px; background: #fff; opacity: 0.6;
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine { 0%,100% { transform: scaleY(1); opacity: 0.5; } 50% { transform: scaleY(0.4); opacity: 1; } }

/* Sub-hero (interior pages) */
.subhero {
  position: relative; padding: 12rem 0 6rem;
  background-size: cover; background-position: center;
  color: #fff; isolation: isolate;
}
.subhero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.35));
}
.subhero h1 { color: #fff; font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 400; }
.subhero .breadcrumb { --bs-breadcrumb-divider: '/'; }
.subhero .breadcrumb-item, .subhero .breadcrumb-item a { color: rgba(255,255,255,0.75); font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase; }
.subhero .breadcrumb-item.active { color: #fff; }

/* ========== Sections ========== */
.section { padding: 7rem 0; }
.section-lg { padding: 9rem 0; }
.section-title {
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  margin: 1rem 0 1.25rem;
  font-weight: 400;
}
.section-title em { color: var(--color-red); font-style: italic; }
.section-lead { color: var(--color-muted); font-size: 1.05rem; max-width: 620px; }

.divider-dot { width: 6px; height: 6px; background: var(--color-red); border-radius: 50%; display: inline-block; }

/* Split about */
.about-split img { width: 100%; height: 100%; object-fit: cover; }
.about-media { position: relative; aspect-ratio: 4/5; overflow: hidden; }
.about-media__badge {
  position: absolute; bottom: 1.5rem; left: 1.5rem;
  background: var(--color-red); color: #fff; padding: 1.25rem 1.5rem;
  font-family: var(--font-display); font-size: 2rem; line-height: 1;
}
.about-media__badge span { display: block; font-family: var(--font-sans); font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; margin-top: 0.5rem; opacity: 0.9; }

/* Feature grid */
.feature-card {
  padding: 2.5rem 2rem;
  border: 1px solid var(--color-line);
  background: #fff;
  transition: all .5s var(--ease);
  height: 100%;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--color-red);
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-card__num {
  font-family: var(--font-display); font-size: 2.2rem; color: var(--color-red);
  font-style: italic; opacity: 0.55; line-height: 1;
}
.feature-card h4 { font-size: 1.4rem; margin: 1rem 0 0.75rem; }
.feature-card p { color: var(--color-muted); margin: 0; font-size: 0.95rem; }

/* Product cards */
.product-card { position: relative; display: block; overflow: hidden; background: var(--color-warm-white); }
.product-card__media { aspect-ratio: 4/5; overflow: hidden; background: #f0ece5; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.product-card:hover .product-card__media img { transform: scale(1.08); }
.product-card__body { padding: 1.5rem 0.25rem 0.25rem; display: flex; justify-content: space-between; align-items: flex-end; }
.product-card__body h5 { font-size: 1.4rem; margin: 0; }
.product-card__body span { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--color-muted); }
.product-card__cta { color: var(--color-red); font-size: 0.75rem; letter-spacing: 0.18em; font-weight: 600; text-transform: uppercase; }

/* Marquee ticker */
.ticker {
  border-top: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line);
  overflow: hidden; background: var(--color-warm-white); padding: 1.25rem 0;
}
.ticker__track {
  display: flex; gap: 4rem; white-space: nowrap;
  animation: tickerScroll 40s linear infinite;
  font-family: var(--font-display); font-style: italic;
  font-size: 1.8rem; color: var(--color-ink);
}
.ticker__track span { display: inline-flex; align-items: center; gap: 3rem; }
.ticker__track span::after { content: "◆"; color: var(--color-red); font-size: 0.7rem; }
@keyframes tickerScroll { to { transform: translateX(-50%); } }

/* Stats */
.stats { background: var(--color-ink); color: #fff; }
.stat { text-align: center; padding: 2rem 1rem; }
.stat__num {
  font-family: var(--font-display); font-size: clamp(3rem, 5vw, 4.5rem);
  color: #fff; line-height: 1; font-weight: 400;
}
.stat__num em { color: var(--color-red); font-style: normal; }
.stat__label {
  margin-top: 1rem; font-size: 0.75rem; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(255,255,255,0.65);
}

/* Process timeline */
.process-step { position: relative; padding: 2rem 1.5rem 2rem 4rem; border-left: 1px solid var(--color-line); }
.process-step__num {
  position: absolute; left: -18px; top: 2rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-red); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1rem;
}
.process-step h4 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.process-step p { color: var(--color-muted); margin: 0; font-size: 0.95rem; }

/* Gallery */
.masonry { columns: 3; column-gap: 1rem; }
.masonry .m-item { break-inside: avoid; margin-bottom: 1rem; overflow: hidden; position: relative; cursor: zoom-in; }
.masonry .m-item img { width: 100%; height: auto; transition: transform 1s var(--ease); }
.masonry .m-item::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.5));
  opacity: 0; transition: opacity .4s var(--ease);
}
.masonry .m-item:hover img { transform: scale(1.06); }
.masonry .m-item:hover::after { opacity: 1; }
@media (max-width: 991px) { .masonry { columns: 2; } }
@media (max-width: 575px) { .masonry { columns: 1; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(10,10,10,0.95); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 2rem; }
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 90vh; max-width: 92vw; box-shadow: var(--shadow-lg); }
.lightbox__close { position: absolute; top: 1.5rem; right: 2rem; color: #fff; font-size: 2rem; background: none; border: none; cursor: pointer; }

/* CTA banner */
.cta-band {
  background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
  color: #fff; padding: 5rem 0; position: relative; overflow: hidden;
}
.cta-band::before {
  content: "壱"; position: absolute; right: -3rem; top: 50%; transform: translateY(-50%);
  font-family: var(--font-jp); font-size: 26rem; color: rgba(255,255,255,0.06); line-height: 1;
}
.cta-band h2 { color: #fff; font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 400; }
.cta-band .btn-outline-light { border-color: #fff; }

/* Footer */
.site-footer { background: var(--color-ink); color: rgba(255,255,255,0.7); padding: 5rem 0 2rem; }
.site-footer h5 { color: #fff; font-family: var(--font-sans); font-size: 0.8rem; letter-spacing: 0.25em; text-transform: uppercase; font-weight: 600; margin-bottom: 1.5rem; }
.site-footer a { color: rgba(255,255,255,0.7); font-size: 0.92rem; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 0.6rem; }
.site-footer .brand-mark img { height: 60px; margin-bottom: 1.25rem;  }
.site-footer__bottom {
  margin-top: 4rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.8rem; letter-spacing: 0.08em; color: rgba(255,255,255,0.55);
}

/* Floating buttons */
.floats { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 900; display: flex; flex-direction: column; gap: 0.75rem; }
.floats a {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-red); color: #fff;
  box-shadow: 0 12px 30px -8px rgba(0,0,0,0.35);
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.floats a.wa { background: #25d366; }
.floats a:hover { transform: translateY(-3px); color: #fff; }
.floats svg { width: 26px; height: 26px; }

/* Loader */
.page-loader {
  position: fixed; inset: 0; background: var(--color-warm-white); z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s var(--ease), visibility .6s var(--ease);
}
.page-loader.is-hidden { opacity: 0; visibility: hidden; }
.page-loader__logo { width: 88px; height: 88px; border-radius: 50%; background: var(--color-red); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--font-jp); font-size: 2rem; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.9); opacity: .7; } }

/* Product detail */
.product-detail__media { background: var(--color-warm-white); aspect-ratio: 1/1; overflow: hidden; }
.product-detail__media img { width: 100%; height: 100%; object-fit: cover; }
.product-detail h1 { font-size: clamp(2.4rem, 4vw, 3.4rem); }
.spec-table { width: 100%; }
.spec-table th, .spec-table td { padding: 1rem 0; border-bottom: 1px solid var(--color-line); text-align: left; font-size: 0.95rem; }
.spec-table th { color: var(--color-muted); font-weight: 500; width: 40%; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; }

/* Contact */
.form-control, .form-select {
  border-radius: 0; border: none; border-bottom: 1px solid #d5d5d5;
  padding: 1rem 0; background: transparent; font-size: 1rem;
}
.form-control:focus, .form-select:focus { box-shadow: none; border-color: var(--color-red); background: transparent; }
.form-floating > label { padding-left: 0; color: var(--color-muted); }

.contact-info-card { padding: 2rem; border: 1px solid var(--color-line); height: 100%; }
.contact-info-card h5 { font-family: var(--font-sans); font-size: 0.75rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--color-red); margin-bottom: 1rem; }
.contact-info-card p { color: var(--color-ink); font-size: 1.05rem; margin: 0; }

/* Reveal animation */
[data-reveal] { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .1s; }
[data-reveal-delay="2"] { transition-delay: .2s; }
[data-reveal-delay="3"] { transition-delay: .3s; }
[data-reveal-delay="4"] { transition-delay: .4s; }

/* 404 */
.errpage { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 6rem 1rem; }
.errpage__code { font-family: var(--font-display); font-size: clamp(6rem, 18vw, 14rem); color: var(--color-red); line-height: 1; font-style: italic; }
