/* ========================================================================
   Teslasell — light theme, calm, integrator-grade
   ======================================================================== */

:root{
  --bg:           #FAFAF7;
  --surface:      #FFFFFF;
  --surface-alt:  #F2F2EE;
  --line:         #E3E3DE;
  --line-soft:    #ECECE7;
  --ink:          #0F1416;
  --ink-2:        #2E3A40;
  --ink-3:        #586872;
  --ink-4:        #8A95A0;
  --brand:        #14D0BB;
  --brand-ink:    #0B7770;
  --brand-soft:   #E6FBF8;
}

html { scroll-behavior: smooth; }
body { font-family:'Inter', system-ui, sans-serif; background: var(--bg); color: var(--ink); }
.font-display { font-family:'Space Grotesk', system-ui, sans-serif; letter-spacing:-0.02em; }
img { color-scheme: light; }

/* ========================================================================
   Override all dark-theme utility classes used in pages
   ======================================================================== */

/* Surfaces */
.bg-ink-950 { background: var(--bg) !important; }
.bg-ink-900 { background: var(--surface) !important; }
.bg-ink-800 { background: var(--surface-alt) !important; }
.bg-ink-700 { background: var(--line-soft) !important; }
.bg-ink-900\/80, .bg-ink-900\/95, .bg-ink-950\/60, .bg-ink-950\/70 { background: var(--surface) !important; }
.bg-ink-800\/80 { background: var(--surface-alt) !important; }
.bg-black\/40, .bg-black\/50 { background: rgba(255,255,255,0.75) !important; backdrop-filter: blur(10px); }

/* Text colors (white-on-dark → ink-on-light) */
[class*="text-white"] { color: var(--ink) !important; }
.text-white\/45, .text-white\/50, .text-white\/55 { color: var(--ink-3) !important; }
.text-white\/60, .text-white\/65, .text-white\/70 { color: var(--ink-2) !important; }
.text-white\/75, .text-white\/80 { color: var(--ink-2) !important; }
.text-brand-100, .text-brand-200 { color: var(--brand-ink) !important; }

/* Borders */
.border-white\/5  { border-color: var(--line-soft) !important; }
.border-white\/10 { border-color: var(--line) !important; }
.border-white\/20 { border-color: var(--line) !important; }
.bg-white\/5 { background: rgba(0,0,0,0.02) !important; }
.bg-white\/10 { background: rgba(0,0,0,0.04) !important; }

/* Brand alpha backgrounds — keep as brand tints */
.bg-brand\/5  { background: rgba(20,208,187,0.06) !important; }
.bg-brand\/10 { background: rgba(20,208,187,0.10) !important; }
.bg-brand\/15 { background: rgba(20,208,187,0.13) !important; }
.bg-brand\/20 { background: rgba(20,208,187,0.18) !important; }
.border-brand\/30 { border-color: rgba(20,208,187,0.40) !important; }
.border-brand\/40 { border-color: rgba(20,208,187,0.55) !important; }

/* Text-brand should always be readable brand-ink on white */
.text-brand { color: var(--brand-ink) !important; }
.hover\:text-brand:hover { color: var(--brand-ink) !important; }
.group:hover .group-hover\:text-brand { color: var(--brand-ink) !important; }

/* Brand pulse dot can stay vivid */
.bg-brand { background: var(--brand) !important; }

/* ========================================================================
   Nuke the visual noise — keep markup, neutralize effects
   ======================================================================== */
.grid-bg,
.radial-glow,
.radial-glow::before,
.noise,
.glow {
  display: none !important;
}
.ticker { animation: none !important; }
.marquee-mask { mask-image: none !important; -webkit-mask-image: none !important; }

/* ========================================================================
   Soft sections — alternating rhythm between bg and surface-alt
   ======================================================================== */
.section-soft { background: var(--surface-alt) !important; position: relative; }
.section-soft + .section-soft { border-top: 1px solid var(--line-soft); }

/* Faint dot pattern, barely visible, gives depth without noise */
.section-soft::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background-image: radial-gradient(rgba(15,20,22,0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  opacity:.5;
}
.section-soft > * { position: relative; }

/* ========================================================================
   Hero soft decorative blob — quiet ambient color
   ======================================================================== */
.hero-blob{
  position: absolute; pointer-events: none; z-index: 0;
  width: 38rem; height: 38rem; border-radius: 9999px;
  background: radial-gradient(closest-side, rgba(20,208,187,0.12), transparent 70%);
  filter: blur(40px);
  animation: drift-slow 22s ease-in-out infinite alternate;
}
.hero-blob.b2{
  width: 24rem; height: 24rem;
  background: radial-gradient(closest-side, rgba(15,20,22,0.06), transparent 70%);
  animation-duration: 28s;
  animation-direction: alternate-reverse;
}
@keyframes drift-slow{
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(40px, -30px, 0) scale(1.08); }
}

/* ========================================================================
   Reveal on scroll — soft fade + rise
   ======================================================================== */
.reveal { opacity:1; transform:none; transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.js-anim .reveal { opacity:0; transform: translateY(14px); }
.js-anim .reveal.in { opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){
  .js-anim .reveal { opacity:1; transform:none; transition:none; }
  .hero-blob, .ken-burns { animation: none !important; }
}

/* Hero entry — gentle one-time fade for the headline cluster */
.hero-rise { opacity: 0; transform: translateY(10px); animation: heroIn .9s cubic-bezier(.2,.7,.2,1) forwards; }
.hero-rise.d2 { animation-delay: .12s; }
.hero-rise.d3 { animation-delay: .22s; }
.hero-rise.d4 { animation-delay: .32s; }
@keyframes heroIn { to { opacity:1; transform:none; } }

/* Slow ambient zoom on hero image */
.ken-burns { transform-origin: center; animation: kb 18s ease-in-out infinite alternate; }
@keyframes kb { 0% { transform: scale(1); } 100% { transform: scale(1.045); } }

/* ========================================================================
   Buttons — default: brand teal on light surfaces
   ======================================================================== */
.btn-primary{
  display:inline-flex; align-items:center; gap:.5rem;
  background: var(--brand); color: #fff; font-weight:600;
  padding:.85rem 1.35rem; border-radius:9999px;
  border: 1px solid transparent;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn-primary:hover{
  background: #11B8A6; color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -10px rgba(20,208,187,0.55);
}

.btn-ghost{
  display:inline-flex; align-items:center; gap:.5rem;
  color: var(--ink); border:1px solid var(--line);
  padding:.85rem 1.35rem; border-radius:9999px;
  background: var(--surface);
  transition: border-color .2s ease, background .2s ease;
}
.btn-ghost:hover{ border-color: var(--ink); background: var(--surface-alt); }

.btn-primary.btn-lg, .btn-ghost.btn-lg{ padding:1.05rem 1.75rem; font-size:1rem; }

/* Hero capability pill */
.cap-pill{
  display:flex; align-items:center; gap:.6rem;
  padding:.85rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.cap-pill:hover{
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -16px rgba(15,20,22,0.18);
}
.cap-pill iconify-icon{ color: var(--brand-ink); }

/* ========================================================================
   Icon-panel — branded tile replacing decorative photos in cozumler cards
   ======================================================================== */
.icon-panel{
  position: relative;
  border-radius: 1.25rem;
  border: 1px solid rgba(20,208,187,0.25);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(20,208,187,0.16), transparent 60%),
    linear-gradient(180deg, rgba(20,208,187,0.06), rgba(20,208,187,0.02));
  display:grid; place-items:center;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.icon-panel::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background-image: radial-gradient(rgba(11,119,112,0.12) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000, transparent);
  opacity:.45;
}
.icon-panel iconify-icon{
  position: relative;
  color: var(--brand);
  filter: drop-shadow(0 8px 20px rgba(20,208,187,0.25));
}

/* ========================================================================
   Brand duotone — recolors any image to brand-teal gradient
   ======================================================================== */
.brand-duotone{ position: relative; overflow: hidden; }
.brand-duotone > img,
.brand-duotone > picture > img{
  filter: grayscale(1) contrast(1.08) brightness(0.92);
}
.brand-duotone::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(135deg, rgba(20,208,187,0.85) 0%, rgba(11,119,112,0.92) 100%);
  mix-blend-mode: multiply;
}

/* ========================================================================
   Hero bleed-image layout helpers — pressed to viewport edges
   ======================================================================== */
.hero-bleed-img-wrap{ position: relative; height: 60vh; }
@media (min-width: 1024px){
  .hero-bleed-img-wrap{
    position: absolute; inset: 0;
    height: 100svh; min-height: 100svh;
  }
}

/* ========================================================================
   Brand-coloured CTA section — dark text on teal, dark primary button
   ======================================================================== */
.section-brand{
  background: var(--brand) !important;
  color: var(--ink) !important;
  position: relative;
  overflow: hidden;
}
.section-brand::before{
  /* faint dot pattern still works on teal — adds depth */
  content:""; position:absolute; inset:0; pointer-events:none;
  background-image: radial-gradient(rgba(15,20,22,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  opacity:.55;
}
.section-brand > * { position: relative; }
.section-brand,
.section-brand h1, .section-brand h2, .section-brand h3 { color: #fff !important; }
.section-brand [class*="text-white"]{ color: #fff !important; }
.section-brand .text-white\/65,
.section-brand .text-white\/70,
.section-brand .text-white\/55{ color: rgba(255,255,255,0.88) !important; }
.section-brand .text-brand{ color: #fff !important; opacity:.85; }
.section-brand::before{ background-image: radial-gradient(rgba(255,255,255,0.18) 1px, transparent 1px); }

/* Buttons inside brand sections — primary dark, secondary white outline */
.section-brand .btn-primary{
  background: var(--ink); color: #fff;
}
.section-brand .btn-primary:hover{
  background: #000;
  box-shadow: 0 12px 28px -10px rgba(0,0,0,0.4);
}
.section-brand .btn-ghost{
  background: transparent; color: #fff;
  border-color: rgba(255,255,255,0.45);
}
.section-brand .btn-ghost:hover{
  background: #fff; color: var(--ink); border-color: #fff;
}

/* ========================================================================
   Modal — contact form popup
   ======================================================================== */
.modal-root{
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  background: rgba(15,20,22,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.modal-root.open{ opacity:1; pointer-events:auto; }

.modal-dialog{
  position: relative;
  width: 100%; max-width: 640px;
  margin: 4rem 0;
  background: var(--surface);
  border-radius: 1.5rem;
  border: 1px solid var(--line);
  padding: 1.75rem;
  box-shadow: 0 32px 80px -20px rgba(15,20,22,0.45);
  transform: translateY(14px) scale(0.985);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.modal-root.open .modal-dialog{ transform: none; }
@media (min-width:768px){ .modal-dialog{ padding: 2.5rem; } }

.modal-close{
  position: absolute; top: 1rem; right: 1rem;
  width: 36px; height: 36px;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--surface);
  display:grid; place-items:center;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.modal-close:hover{ border-color: var(--ink); background: var(--surface-alt); }

body.modal-open{ overflow: hidden; }

/* ========================================================================
   Service cards — clean white surfaces, no glow
   ======================================================================== */
.svc-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 1.75rem;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
@media (min-width:768px){ .svc-card { padding: 2.25rem; } }
.svc-card:hover {
  border-color: #cfd2cb;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px -12px rgba(15,20,22,0.10);
}

.svc-eyebrow {
  display:inline-flex; align-items:center; gap:.5rem;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--brand-ink);
  font-weight: 600;
}
.svc-eyebrow iconify-icon { color: var(--brand); }

.feature-row {
  display:flex; align-items:flex-start; gap:.55rem;
  font-size: .9rem; color: var(--ink-2);
  line-height: 1.45;
}
.feature-row iconify-icon { color: var(--brand-ink); flex-shrink:0; margin-top:.15em; }

.card-hover { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.card-hover:hover {
  transform: translateY(-2px);
  border-color: #cfd2cb;
  box-shadow: 0 8px 30px -12px rgba(15,20,22,0.10);
}

/* Industry photo cards — replace dark gradient with subtle dark overlay for readability */
.industry-card::after{
  content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(15,20,22,0) 35%, rgba(15,20,22,0.78) 100%);
}
.industry-card .relative.z-10 { color: #fff; }
.industry-card .relative.z-10 .text-white\/65 { color: rgba(255,255,255,0.85) !important; }
.industry-card .relative.z-10 iconify-icon { color: var(--brand) !important; }

/* Section eyebrow used as "// XYZ" — make it cleaner without slashes shouting */
.text-brand.tracking-\[0\.2em\],
.text-brand.tracking-\[0\.18em\]{
  color: var(--brand-ink) !important;
  font-weight: 600;
}

/* Eyebrow on dark industry cards stays white-ish */
.industry-card .text-brand { color: var(--brand) !important; }

/* Form fields */
input, textarea, select {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
input::placeholder, textarea::placeholder { color: var(--ink-4) !important; }
input:focus, textarea:focus, select:focus {
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px rgba(20,208,187,0.18) !important;
}

/* ========================================================================
   Header — light translucent
   ======================================================================== */
header { background: rgba(250,250,247,0.85) !important; backdrop-filter: blur(12px); border-bottom: 1px solid var(--line-soft) !important; }

/* Dropdown menu surfaces */
header .rounded-2xl.bg-ink-900\/95 { background: var(--surface) !important; border-color: var(--line) !important; box-shadow: 0 16px 40px -20px rgba(15,20,22,0.15); }

/* Footer */
footer { background: var(--surface-alt) !important; border-top: 1px solid var(--line) !important; }

/* Anchor scroll offset for fixed nav */
section[id], article[id]{ scroll-margin-top: 88px; }

/* ========================================================================
   Scrollbar — light-themed
   ======================================================================== */
::-webkit-scrollbar { width:10px; height:10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background:#d6d6d0; border-radius:8px; }
::-webkit-scrollbar-thumb:hover { background:#bcbcb6; }
