/* ==========================================================================
   Corium — Studio Carbon design system (see /DESIGN.md for token source)
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #0d0e11;
  --surface: #121316;
  --surface-container-low: #1b1b1f;
  --surface-container: #1f1f23;
  --surface-container-high: #292a2d;
  --surface-container-highest: #343538;
  --surface-glass: rgba(31, 31, 35, 0.55);
  --surface-glass-border: rgba(255, 255, 255, 0.1);

  /* Text */
  --on-surface: #e3e2e6;
  --on-surface-variant: #b9b3a4;
  --outline: rgba(154, 144, 121, 0.35);
  --outline-variant: rgba(78, 70, 51, 0.5);

  /* Brand accents */
  --gold: #f0c028;
  --gold-light: #ffdf8e;
  --gold-glow: rgba(240, 192, 40, 0.45);
  --on-gold: #241a00;
  --red: #e82127;
  --red-glow: rgba(232, 33, 39, 0.4);

  /* Shape */
  --radius-sm: 0.5rem;
  --radius: 1rem;
  --radius-md: 1.5rem;
  --radius-lg: 2rem;
  --radius-xl: 3rem;
  --radius-full: 9999px;

  /* Spacing */
  --gutter: 32px;
  --container-max: 1440px;
  --margin-desktop: 80px;
  --margin-mobile: 24px;
  --section-gap: 160px;

  --font-body: "Urbanist", -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  background: var(--bg);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--margin-desktop);
}

@media (max-width: 900px) {
  .container { padding: 0 var(--margin-mobile); }
}

main {
  position: relative;
  z-index: 1;
  isolation: isolate;
}

.noscript-banner {
  background: var(--red);
  color: #fff;
  text-align: center;
  padding: 10px;
  font-weight: 600;
}

/* ---- Typography ---- */
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
}
.eyebrow.center { text-align: center; }

.hero-title, .section-title {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.hero-title { font-size: 64px; margin-bottom: 24px; }
.section-title { font-size: 40px; margin-bottom: 16px; }
.section-title.center, .section-lead.center { text-align: center; }

.section-lead {
  color: var(--on-surface-variant);
  font-size: 18px;
  max-width: 640px;
}
.section-lead.center { margin: 0 auto 64px; }

.text-gold { color: var(--gold); }

@media (max-width: 900px) {
  .hero-title { font-size: 36px; }
  .section-title { font-size: 28px; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-lg { padding: 18px 36px; font-size: 16px; }

.btn-primary {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: var(--on-gold);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px var(--gold-glow);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--on-surface);
  border-color: var(--gold);
  backdrop-filter: blur(12px);
}
.btn-ghost:hover {
  background: rgba(240, 192, 40, 0.08);
  box-shadow: 0 0 20px var(--gold-glow);
}

/* ---- Glass card ---- */
.card {
  background: var(--surface-glass);
  border: 1px solid var(--surface-glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.chip {
  display: inline-block;
  margin-top: 16px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(240, 192, 40, 0.12);
  color: var(--gold-light);
}
.chip-red { background: rgba(232, 33, 39, 0.15); color: #ff9a9a; }

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
}
.site-header::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 220px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.6) 30%,
    rgba(0, 0, 0, 0.25) 60%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
  z-index: -1;
  transition: opacity 0.3s ease;
}
.site-header.is-scrolled {
  background: rgba(13, 14, 17, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--surface-glass-border);
}
.site-header.is-scrolled::before {
  opacity: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand-logo { height: 22px; width: auto; }

.main-nav { display: flex; gap: 36px; }
.main-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--on-surface-variant);
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--gold-light); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--on-surface);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 16px var(--margin-mobile) 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--surface-glass-border);
}

.site-header.nav-open {
  display: flex;
  flex-direction: column;
  height: 100vh;
}
.site-header.nav-open .mobile-nav {
  flex: 1;
  overflow-y: auto;
}
.mobile-nav a {
  padding: 12px 4px;
  font-size: 15px;
  color: var(--on-surface);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-nav .btn { margin-top: 12px; justify-content: center; }

@media (max-width: 900px) {
  .main-nav, .header-actions { display: none; }
  .nav-toggle { display: flex; }
  .mobile-nav.is-open { display: flex; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  background: #000;
  padding-top: 88px;
}

.hero-media {
  line-height: 0;
  overflow: hidden;
}
.hero-media-img {
  width: 100%;
  height: auto;
  display: block;
  transform: scale(calc(1 + var(--hero-fade, 0) * 0.06));
  transform-origin: center;
}
.hero-fade {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: var(--hero-fade, 0);
  pointer-events: none;
}
.hero-content {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding-top: 64px;
  padding-bottom: 96px;
}
.hero-lead { color: var(--on-surface-variant); font-size: 18px; margin: 0 auto 40px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

@media (max-width: 700px) {
  .hero-content { padding-top: 48px; padding-bottom: 64px; }
}

.scroll-cue {
  position: relative;
  display: block;
  margin: 48px auto 0;
  width: 26px; height: 42px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-full);
}
.scroll-cue span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  background: var(--gold);
  border-radius: var(--radius-full);
  animation: scrollCue 1.6s ease infinite;
}
@keyframes scrollCue {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 0; }
}

/* ---- Brand watermark: wordmark de fondo fijo, spotlight en desktop, latido en mobile ---- */
.brand-watermark {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh; /* fallback for browsers without svh support */
  height: 100svh; /* "small" viewport height: stays constant even when the mobile browser's address bar shows/hides, so this never resizes/jumps mid-scroll */
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
  display: grid;
  place-items: center;
}
.brand-watermark-mark {
  grid-area: 1 / 1;
  width: clamp(300px, 92vw, 1100px);
  height: auto;
}
.brand-watermark-base {
  opacity: 0.04;
}
.brand-watermark-spot {
  opacity: 0;
  transition: opacity 0.4s ease;
  -webkit-mask-image: radial-gradient(circle 260px at var(--spot-x, 50%) var(--spot-y, 50%), #000 0%, transparent 70%);
  mask-image: radial-gradient(circle 260px at var(--spot-x, 50%) var(--spot-y, 50%), #000 0%, transparent 70%);
}
.brand-watermark.has-spot .brand-watermark-spot {
  opacity: 0.18;
}
@media (hover: none) {
  .brand-watermark-spot { display: none; }
  .brand-watermark-base {
    opacity: 0.02;
    animation: watermarkPulse 8.5s ease-in-out infinite;
  }
}
@keyframes watermarkPulse {
  0%, 100% { opacity: 0.02; }
  25% { opacity: 0.4; }
  55% { opacity: 0.4; }
}

/* ---- Marquee ---- */
.marquee {
  border-top: 1px solid var(--surface-glass-border);
  border-bottom: 1px solid var(--surface-glass-border);
  overflow: hidden;
  padding: 28px 0;
  background: var(--surface);
}
.marquee-track {
  display: flex;
  gap: 64px;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
}
.marquee-track span {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--on-surface-variant);
  opacity: 0.6;
}
@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---- Sections ---- */
.section { padding: var(--section-gap) 0; }
.section-dim { background: var(--surface-container-low); }

@media (max-width: 900px) {
  .section { padding: 96px 0; }
}

/* ---- Services ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
}
@media (max-width: 1100px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }

.service-card { padding: 36px 28px; transition: transform 0.25s ease, border-color 0.25s ease; }
.service-card:hover { transform: translateY(-6px); border-color: rgba(240, 192, 40, 0.35); }
.service-icon {
  display: inline-flex;
  width: 48px; height: 48px;
  align-items: center; justify-content: center;
  border-radius: var(--radius);
  background: rgba(240, 192, 40, 0.1);
  color: var(--gold-light);
  margin-bottom: 20px;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.service-card p { color: var(--on-surface-variant); font-size: 15px; }

/* ---- Protected images / watermark ---- */
.protected-image {
  position: relative;
  background: radial-gradient(ellipse at 50% 35%, #121212 0%, #000 75%);
  user-select: none;
  -webkit-user-drag: none;
}
.protected-image::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Ctext x='-10' y='130' font-size='26' font-family='Urbanist,sans-serif' fill='rgba(255,255,255,0.07)' transform='rotate(-28 110 110)'%3ECORIUM%3C/text%3E%3C/svg%3E");
  background-repeat: repeat;
  mix-blend-mode: overlay;
}
.protected-image.is-hidden-guard {
  filter: blur(24px) brightness(0.4);
  transition: filter 0.15s ease;
}

/* ---- Compare slider ---- */
.compare-slider {
  position: relative;
  height: 460px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 96px;
  border: 1px solid var(--surface-glass-border);
}
.compare-pane {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
}
.compare-pane::before {
  content: attr(data-label);
  position: absolute;
  top: 20px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}
.compare-after { background: radial-gradient(ellipse at 60% 30%, #161310 0%, #000 75%); }
.compare-after::before { right: 20px; color: var(--gold-light); }
.compare-before {
  clip-path: inset(0 50% 0 0);
  background: radial-gradient(ellipse at 40% 30%, #101010 0%, #000 75%);
}
.compare-before::before { left: 20px; color: var(--on-surface-variant); }

.compare-handle {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 3px;
  background: var(--gold);
  cursor: ew-resize;
  box-shadow: 0 0 12px var(--gold-glow);
}
.compare-handle-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  box-shadow: 0 0 20px var(--gold-glow);
}

.gallery-note { margin-bottom: 32px !important; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
}
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-item {
  height: 260px;
  border-radius: var(--radius-md);
  display: flex; align-items: flex-end;
  padding: 20px;
  overflow: hidden;
  transition: transform 0.3s ease;
}
.gallery-item:hover { transform: scale(1.02); }
.gallery-item span {
  position: relative; z-index: 1;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.gallery-disclaimer {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--on-surface-variant);
  opacity: 0.7;
}

/* ---- About ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-visual { height: 420px; border-radius: var(--radius-lg); }
.about-copy p { color: var(--on-surface-variant); margin-bottom: 16px; }
.about-list li {
  padding: 10px 0 10px 28px;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.about-list li::before {
  content: "";
  position: absolute; left: 0; top: 18px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { height: 280px; }
}

/* ---- Location ---- */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}
.location-copy p { color: var(--on-surface-variant); margin-bottom: 20px; }
.location-list li { margin-bottom: 12px; font-size: 15px; }
.location-list a { color: var(--gold-light); }
.location-list a:hover { text-decoration: underline; }
.location-map { height: 420px; padding: 6px; overflow: hidden; }
.location-map iframe { border-radius: calc(var(--radius-md) - 6px); }

@media (max-width: 900px) {
  .location-grid { grid-template-columns: 1fr; gap: 40px; }
  .location-map { height: 300px; }
}

/* ---- Quote form ---- */
.quote-form {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
}
.form-row-full, .form-submit { grid-column: 1 / -1; }
.form-row label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-bottom: 8px;
}
.form-row input, .form-row select, .form-row textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: none;
  border-bottom: 1px solid var(--outline-variant);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--on-surface);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240, 192, 40, 0.15);
}
.form-row select option { background: var(--surface-container-high); }
.form-submit { justify-self: center; margin-top: 8px; }

@media (max-width: 700px) {
  .quote-form { grid-template-columns: 1fr; padding: 28px 20px; }
}

/* ---- Footer ---- */
.site-footer {
  position: relative;
  z-index: 1;
  isolation: isolate;
  background: var(--surface);
  border-top: 1px solid var(--surface-glass-border);
  padding: 48px 0;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-logo { height: 18px; }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { font-size: 14px; color: var(--on-surface-variant); }
.footer-nav a:hover { color: var(--gold-light); }
.footer-copy { font-size: 13px; color: var(--on-surface-variant); opacity: 0.7; width: 100%; text-align: center; }

/* ---- WhatsApp float ---- */
.whatsapp-float {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  animation: pulseWa 2.4s ease infinite;
}
.whatsapp-float svg { width: 30px; height: 30px; }
@keyframes pulseWa {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7); }
}

/* ---- Protection UI ---- */
.protection-flash {
  position: fixed; inset: 0;
  background: #000;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}
.protection-flash.is-active { opacity: 1; }

.protection-toast {
  position: fixed;
  bottom: 100px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-container-high);
  border: 1px solid var(--outline-variant);
  color: var(--on-surface);
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.protection-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
