/* ==========================================================
   BNI STORES Initiative — Refined Stylesheet
   Design Language: Editorial · Geopolitical · Restrained Luxury
   ========================================================== */

:root {
  --ink: #0B1220;
  --midnight: #142032;
  --deep-sea: #1E3A5F;
  --steel: #4A5568;
  --pearl: #F4F1EC;
  --bone: #E8E3DA;
  --champagne: #C9A96E;
  --accent: #B8860B;
  --signal: #D64545;
}

html {
  scroll-behavior: smooth;
}

body {
  font-feature-settings: "palt" 1, "pkna" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- Header state ---------- */
#site-header {
  background: transparent;
}

#site-header .header-color {
  color: var(--pearl);
  transition: color 0.5s ease;
}

#site-header .header-cta {
  color: var(--pearl);
  transition: color 0.5s ease;
}

#site-header.scrolled {
  background: rgba(244, 241, 236, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(11, 18, 32, 0.08);
}

#site-header.scrolled .header-color,
#site-header.scrolled .header-cta {
  color: var(--ink);
}

/* ---------- Scroll line animation ---------- */
@keyframes scroll-line {
  0% {
    transform: translateY(-100%);
  }
  50% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100%);
  }
}

.animate-scroll-line {
  animation: scroll-line 2.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

/* ---------- Gentle pulse (not aggressive) ---------- */
@keyframes ping-slow {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.animate-ping-slow {
  animation: ping-slow 2.2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pulse-subtle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.15);
  }
}

.animate-pulse-subtle {
  animation: pulse-subtle 2.5s ease-in-out infinite;
}

/* ---------- Typography refinements ---------- */
h1, h2, h3, h4 {
  font-feature-settings: "palt" 1, "pkna" 1;
}

.font-serif-jp {
  letter-spacing: -0.01em;
}

.font-serif-en {
  letter-spacing: -0.015em;
}

/* ---------- Selection ---------- */
::selection {
  background: var(--champagne);
  color: var(--ink);
}

::-moz-selection {
  background: var(--champagne);
  color: var(--ink);
}

/* ---------- Focus ---------- */
a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--champagne);
  outline-offset: 4px;
}

/* ---------- Image quality ---------- */
img {
  -webkit-user-drag: none;
  user-select: none;
}

/* ---------- Subtle link hover ---------- */
a {
  transition: all 0.3s ease;
}

/* ---------- Container fine-tuning ---------- */
@media (min-width: 1536px) {
  .container {
    max-width: 1400px;
  }
}

/* ---------- Grain texture for pearl sections (optional subtle noise) ---------- */
.bg-pearl {
  position: relative;
}

/* ---------- Ken Burns effect for fullbleed plates ---------- */
@keyframes ken-burns-slow {
  0% {
    transform: scale(1.05);
    transform-origin: 50% 50%;
  }
  100% {
    transform: scale(1.15);
    transform-origin: 45% 55%;
  }
}

@keyframes ken-burns-slower {
  0% {
    transform: scale(1.1);
    transform-origin: 40% 50%;
  }
  100% {
    transform: scale(1.2);
    transform-origin: 55% 45%;
  }
}

#solution-plate-img {
  animation: ken-burns-slow 20s ease-in-out infinite alternate;
}

#closing-plate-img {
  animation: ken-burns-slower 24s ease-in-out infinite alternate;
}

/* ==========================================================
   COMING SOON BUTTON (Disabled state with stamp watermark)
   ========================================================== */
.coming-soon-btn {
  position: relative;
  opacity: 0.75;
  transition: opacity 0.3s ease;
}

.coming-soon-btn:hover {
  opacity: 0.9;
}

.coming-soon-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    rgba(244, 241, 236, 0.03) 8px,
    rgba(244, 241, 236, 0.03) 16px
  );
  pointer-events: none;
}

.coming-soon-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 4px 14px;
  border: 2px solid rgba(255, 107, 53, 0.85);
  color: rgba(255, 107, 53, 0.95);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.25em;
  background: rgba(11, 18, 32, 0.55);
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 107, 53, 0.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: stamp-breathe 3s ease-in-out infinite;
}

@keyframes stamp-breathe {
  0%, 100% {
    opacity: 0.95;
    transform: translate(-50%, -50%) rotate(-8deg) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-8deg) scale(1.03);
  }
}

/* Text-link variant (no stripe texture, tighter opacity) */
span.coming-soon-btn {
  overflow: visible;
}
span.coming-soon-btn::before {
  display: none;
}

/* Small variant for text-link style (admin dashboard link) */
.coming-soon-stamp--sm {
  top: 50%;
  left: auto;
  right: -96px;
  transform: translateY(-50%) rotate(-6deg);
  padding: 2px 8px;
  font-size: 8.5px;
  letter-spacing: 0.2em;
  border-width: 1.5px;
  animation: stamp-breathe-sm 3s ease-in-out infinite;
}

@keyframes stamp-breathe-sm {
  0%, 100% {
    opacity: 0.92;
    transform: translateY(-50%) rotate(-6deg) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) rotate(-6deg) scale(1.04);
  }
}

@media (max-width: 640px) {
  .coming-soon-stamp--sm {
    right: -70px;
    font-size: 7.5px;
    padding: 2px 6px;
  }
}

/* ==========================================================
   SAMPLE WATERMARK (for live-stats demo section)
   ========================================================== */
.sample-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.sample-watermark-text {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(8rem, 22vw, 22rem);
  line-height: 0.9;
  letter-spacing: 0.08em;
  color: rgba(11, 18, 32, 0.06);
  transform: rotate(-12deg);
  text-transform: uppercase;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  text-shadow:
    0 0 1px rgba(11, 18, 32, 0.04),
    2px 2px 0 rgba(201, 169, 110, 0.03);
  animation: sample-drift 18s ease-in-out infinite;
}

.sample-watermark-sub {
  margin-top: 0.5rem;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.35em;
  color: rgba(11, 18, 32, 0.22);
  text-transform: uppercase;
  transform: rotate(-12deg);
  user-select: none;
  -webkit-user-select: none;
}

@keyframes sample-drift {
  0%, 100% {
    transform: rotate(-12deg) scale(1);
    opacity: 1;
  }
  50% {
    transform: rotate(-12deg) scale(1.02);
    opacity: 0.85;
  }
}

@media (max-width: 768px) {
  .sample-watermark-text {
    font-size: clamp(5rem, 28vw, 10rem);
    letter-spacing: 0.05em;
  }
  .sample-watermark-sub {
    font-size: 9px;
    letter-spacing: 0.25em;
  }
}

/* ==========================================================
   MODAL & FORM STYLES
   ========================================================== */

/* ---------- Modal base ---------- */
.modal {
  display: none;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  opacity: 0;
  animation: fade-in 0.4s ease forwards;
}

.modal-dialog {
  opacity: 0;
  transform: translateY(20px);
  animation: slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

@keyframes slide-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Prevent body scroll when modal open */
body.modal-open {
  overflow: hidden;
}

/* ---------- Form elements ---------- */
.form-label {
  display: block;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink);
  margin-bottom: 10px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid rgba(11, 18, 32, 0.12);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--ink);
  transition: all 0.25s ease;
  border-radius: 0;
  appearance: none;
  -webkit-appearance: none;
}

.form-input:hover {
  border-color: rgba(11, 18, 32, 0.28);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.08);
}

.form-input::placeholder {
  color: rgba(11, 18, 32, 0.35);
  font-weight: 300;
}

textarea.form-input {
  resize: vertical;
  min-height: 90px;
  line-height: 1.8;
}

select.form-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%230B1220' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

/* ---------- Radio Tile (large card selector) ---------- */
.radio-tile-content {
  padding: 20px 16px;
  border: 1px solid rgba(11, 18, 32, 0.12);
  background: #fff;
  text-align: center;
  transition: all 0.25s ease;
  color: var(--ink);
}

.radio-tile-content i {
  color: rgba(11, 18, 32, 0.4);
  transition: color 0.25s ease;
}

.radio-tile:hover .radio-tile-content {
  border-color: rgba(184, 134, 11, 0.5);
}

.radio-tile input:checked + .radio-tile-content {
  border-color: var(--accent);
  background: rgba(184, 134, 11, 0.06);
  box-shadow: 0 0 0 1px var(--accent);
}

.radio-tile input:checked + .radio-tile-content i {
  color: var(--accent);
}

/* ---------- Urgency Chip ---------- */
.urgency-chip {
  cursor: pointer;
}

.urgency-chip span {
  display: block;
  padding: 11px 8px;
  text-align: center;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(11, 18, 32, 0.12);
  transition: all 0.25s ease;
}

.urgency-chip:hover span {
  border-color: rgba(184, 134, 11, 0.4);
}

.urgency-chip input:checked + span {
  background: var(--ink);
  color: var(--pearl);
  border-color: var(--ink);
  font-weight: 500;
}

/* ---------- Check Tile (multi-select card) ---------- */
.check-tile {
  cursor: pointer;
}

.check-tile-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid rgba(11, 18, 32, 0.12);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  color: var(--ink);
  transition: all 0.25s ease;
}

.check-tile-content i {
  font-size: 13px;
  transition: transform 0.25s ease;
}

.check-tile:hover .check-tile-content {
  border-color: rgba(184, 134, 11, 0.5);
  background: rgba(184, 134, 11, 0.03);
}

.check-tile input:checked + .check-tile-content {
  border-color: var(--accent);
  background: rgba(184, 134, 11, 0.08);
  box-shadow: 0 0 0 1px var(--accent);
}

.check-tile input:checked + .check-tile-content i {
  transform: scale(1.15);
}

/* ---------- Native radio (simple) ---------- */
.form-radio-native {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(11, 18, 32, 0.3);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease;
}

.form-radio-native:hover {
  border-color: var(--accent);
}

.form-radio-native:checked {
  border-color: var(--accent);
}

.form-radio-native:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
}

/* ---------- Submit Button ---------- */
.form-submit {
  display: inline-flex;
  align-items: center;
  padding: 14px 28px;
  background: var(--ink);
  color: var(--pearl);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.form-submit:hover:not(:disabled) {
  background: var(--accent);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-submit.is-loading .form-submit-label::after {
  content: '...';
  animation: dots 1s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: ''; }
  40% { content: '.'; }
  60% { content: '..'; }
  80%, 100% { content: '...'; }
}

/* ---------- Field error ---------- */
.form-input.has-error {
  border-color: var(--signal);
  background: rgba(214, 69, 69, 0.03);
}

.form-input.has-error:focus {
  box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.08);
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 640px) {
  .modal-dialog {
    max-height: 95vh;
  }
}

/* ---------- Reduce motion for accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
