/* Google Fonts loaded via <link> in index.html head for better performance */

/* Hide system cursor only on hover-capable devices (custom cursor takes over).
   Touch and keyboard-only users keep the default cursor. */
@media (hover: hover) and (pointer: fine) {
  html { cursor: none; }
}

body {
  background: var(--c-void);
  color: var(--c-cream);
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-wrap: break-word;
  word-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--c-void); }
::-webkit-scrollbar-thumb { background: var(--c-red); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-red-glow); }

/* Selection */
::selection { background: var(--c-red); color: var(--c-cream); }

/* Focus ring — thicker + soft halo for strong keyboard visibility on dark bg */
:focus-visible {
  outline: 3px solid var(--c-gold-light);
  outline-offset: 3px;
  border-radius: var(--r-sm);
  box-shadow: 0 0 0 6px rgba(232, 41, 74, 0.18);
}
/* Skip focus halo on links inside prose */
p a:focus-visible { box-shadow: none; }

/* Container */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 4vw, 3.5rem);
}

/* Section base */
section { position: relative; overflow: hidden; }

/* Section header pattern */
.sec-overline {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 0.75rem;
}

.sec-title {
  font-family: var(--font-heading);
  font-size: var(--t-h2);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-heading);
  color: var(--c-cream);
  line-height: 1.05;
}

.sec-rule {
  width: 48px;
  height: 2px;
  background: var(--c-gold);
  margin: 1.2rem 0;
}

.sec-tagline {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  color: var(--c-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;                 /* WCAG / Apple HIG touch target */
  padding: 0.75rem 1.75rem;
  font-family: var(--font-heading);
  font-size: var(--t-small);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;                  /* fallback — custom cursor overrides on desktop */
  touch-action: manipulation;       /* removes 300ms tap delay on iOS */
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur-fast),
              box-shadow var(--dur-fast);
}
@media (hover: hover) and (pointer: fine) { .btn { cursor: none; } }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--c-ember);
  color: var(--c-cream);
}
.btn-primary:hover {
  background: var(--c-ember-hover);
  box-shadow: 0 6px 28px rgba(196, 92, 26, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--c-cream);
  border: 1.5px solid rgba(240, 240, 238, 0.35);
}
.btn-ghost:hover {
  border-color: var(--c-gold);
  color: var(--c-gold);
  box-shadow: 0 0 18px rgba(200, 146, 42, 0.15);
}

/* Gold rule divider */
.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-ridge) 20%, var(--c-ridge) 80%, transparent);
  margin: 0;
}

/* Scissors divider */
.scissors-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2.5rem 0;
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
}
.scissors-divider::before,
.scissors-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-gold);
}
.scissors-divider svg { color: var(--c-gold); flex-shrink: 0; }

/* Reveal utility (JS adds class) */
.reveal { opacity: 0; }

/* GSAP will-change hints */
.gsap-animated { will-change: transform, opacity; }

/* Body prose readability — 62ch is ideal measure for English copy */
.about-text p,
.faq-body p,
.exp-pillar p,
.contact-info p,
.sec-tagline { max-width: var(--measure); }

/* Screen-reader-only utility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Skip link — hidden until keyboard focus */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--c-red);
  color: var(--c-cream);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--r-sm);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* ── Grain texture overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 192px 192px;
}

/* ── Scroll-next button ── */
.scroll-next {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 2rem 0 1rem;
  text-decoration: none;
  cursor: none;
}
.scroll-next::before {
  content: 'SCROLL';
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--c-gold-dim);
  transition: color 0.3s;
}
.scroll-next:hover::before { color: var(--c-gold); }

.scroll-next-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(200, 16, 46, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s, background 0.3s, transform 0.3s;
  animation: scroll-next-bounce 2.4s ease-in-out infinite;
}
.scroll-next:hover .scroll-next-ring {
  border-color: var(--c-gold);
  background: rgba(200,146,42,0.08);
  animation-play-state: paused;
  transform: translateY(3px);
}
.scroll-next-chevron {
  color: var(--c-gold-dim);
  transition: color 0.3s;
  display: block;
}
.scroll-next:hover .scroll-next-chevron { color: var(--c-gold); }

@keyframes scroll-next-bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(7px); }
}

/* ── Smooth scroll (motion-safe) ── */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ── PRELOADER ── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #070810;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
#preloader img {
  width: auto;
  height: 72px;
  object-fit: contain;
  opacity: 0.85;
  animation: preloader-pulse 1.4s ease-in-out infinite;
}
@keyframes preloader-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.95); }
  50%       { opacity: 1;   transform: scale(1.05); }
}

/* ── PHONE TOAST (desktop tel: intercept) ── */
#phone-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: var(--c-surface);
  border: 1.5px solid var(--c-ridge);
  color: var(--c-cream);
  font-family: var(--f-body);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.7rem 1.4rem;
  border-radius: 2rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 99999;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
#phone-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
