/* =========================================================
   styles/main.css — shared styles for all pages
   ========================================================= */

/* Reset & base */
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0;
  font-family:"Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", sans-serif;
  line-height:1.6;
  color:var(--text);
  background:var(--bg);
  transition:background .25s ease, color .25s ease;
  padding-top:var(--header-h);
}
img,svg,video,canvas{ max-width:100%; height:auto; display:block; }
a{ color:inherit; text-decoration:none; }
.container{ max-width:1200px; margin-inline:auto; padding-inline:1rem; }

/* Theme tokens (light) */
:root{
  --primary:#005bbb;
  --secondary:#00aaff;

  --bg:#f7f8fa;
  --text:#1e1f23;
  --muted:#5b6270;

  --surface:#ffffff;
  --surface-2:#f2f4f7;
  --tint:#eef7ff;

  --border:rgba(0,0,0,.10);
  --border-soft:rgba(0,0,0,.06);
  --shadow:0 12px 30px rgba(0,0,0,.06);

  --focus:rgba(0,91,187,.35);

  --radius:10px; --radius-sm:8px; --radius-lg:16px;
  --transition:.25s ease;

  --header-h:72px;
}

/* Dark mode */
body.dark{
  --bg:#0f1115;
  --text:#f2f3f5;
  --muted:#b6bdc7;

  --surface:#15181d;
  --surface-2:#0f1318;
  --tint:#102030;

  --border:rgba(255,255,255,.14);
  --border-soft:rgba(255,255,255,.08);
  --shadow:0 16px 36px rgba(0,0,0,.54);

  --focus:rgba(0,170,255,.35);
}

/* Focus ring */
:focus-visible{ outline:3px solid var(--focus); outline-offset:2px; border-radius:6px; }

/* Header / Nav */
.site-header{
  position:fixed; inset:0 0 auto 0; height:var(--header-h); z-index:1000;
  border-bottom:1px solid var(--border-soft); background:transparent; isolation:isolate;
  box-shadow:0 6px 20px rgba(0,0,0,.06);
}
.site-header::before{
  content:""; position:absolute; inset:0; z-index:-1;
  background:rgba(255,255,255,.55);
  -webkit-backdrop-filter:saturate(160%) blur(12px);
  backdrop-filter:saturate(160%) blur(12px);
  transition:background var(--transition);
}
.site-header.is-scrolled::before{ background:rgba(255,255,255,.7); }
body.dark .site-header::before{ background:rgba(17,17,17,.55); }
body.dark .site-header.is-scrolled::before{ background:rgba(17,17,17,.7); }

.nav{ height:100%; display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.brand{ display:inline-flex; align-items:center; gap:.6rem; font-weight:800; font-size:1.2rem; color:var(--text); }
.brand .logo{ height:42px; width:auto; }

.primary-nav{ display:flex; align-items:center; gap:1rem; }
.primary-nav a,.primary-nav button{
  font-weight:700; font-size:.95rem; background:none; border:0; color:var(--text);
  padding:.4rem .6rem; border-radius:8px; cursor:pointer;
  transition: background var(--transition), color var(--transition);
}
.primary-nav a:hover,.primary-nav button:hover{
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}

.nav-toggle{ display:none; font-size:1.8rem; background:none; border:0; color:var(--text); cursor:pointer; line-height:1; }

@media (max-width:768px){
  .nav-toggle{ display:block; }
  .primary-nav{
    position:fixed; top:0; right:-100%; height:100%; width:72%; max-width:300px;
    display:flex; flex-direction:column; align-items:flex-start; gap:1rem;
    padding:4rem 1.25rem; background:var(--surface);
    -webkit-backdrop-filter:saturate(160%) blur(12px); backdrop-filter:saturate(160%) blur(12px);
    border-left:1px solid var(--border-soft); box-shadow:-12px 0 28px rgba(0,0,0,.18);
    transition:right .25s ease;
  }
  .primary-nav.open{ right:0; }
  .primary-nav a,.primary-nav button{ width:100%; text-align:left; padding:.75rem 0; border-radius:0; }
}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  padding:.7rem 1.05rem; border-radius:10px; font-weight:800;
  background:var(--surface); color:var(--primary); border:1px solid var(--border-soft);
  transition:transform .2s ease, background .2s ease, box-shadow .2s ease;
  box-shadow:0 1px 0 var(--border-soft);
}
.btn:hover{ background:var(--surface-2); transform:translateY(-2px); }
.btn-primary{
  background:linear-gradient(135deg, var(--primary), var(--secondary));
  color:#fff; border:none; box-shadow:0 6px 16px rgba(0,91,187,.25);
}
.btn-primary:hover{ transform:translateY(-2px); opacity:.96; }
.btn-outline{ background:transparent; color:var(--primary)!important; border:2px solid var(--primary); }
.btn-outline:hover{ background:var(--primary); color:#fff!important; }

/* Layout */
main{ margin:2rem auto; }
.hero.hero--simple{
  display:grid; grid-template-columns:1.2fr .8fr; gap:1rem; align-items:center;
}
.hero.hero--simple .visual{
  border-radius:16px; overflow:hidden; background:#eef3f9; border:1px solid var(--border-soft);
}
.hero.hero--simple .visual img{ width:100%; height:100%; object-fit:cover; aspect-ratio:16/9; }
@media (max-width:900px){ .hero.hero--simple{ grid-template-columns:1fr; } }

/* Card */
.card{
  background:linear-gradient(180deg, var(--surface), #fbfbfb);
  border:1px solid var(--border-soft);
  border-radius:20px; box-shadow:var(--shadow); overflow:hidden;
}
.card .head{
  display:flex; gap:.75rem; align-items:center; padding:1rem 1.25rem;
  border-bottom:1px solid var(--border-soft);
  background: radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--primary) 8%, transparent), transparent);
}
.card .body{ padding:1.25rem; }
.pill{
  display:inline-flex; align-items:center; gap:.5rem;
  background:linear-gradient(135deg, var(--primary), var(--secondary));
  color:#fff; font-weight:800; letter-spacing:.3px; padding:.45rem .8rem; border-radius:999px;
}
.lead{ font-size:1.1rem; margin:.25rem 0 1rem; color:#444; }
body.dark .lead{ color:var(--muted); }

/* Form */
form.news{
  margin-top:1rem; display:grid; grid-template-columns:1fr 1fr; gap:1rem;
}
.field{ display:flex; flex-direction:column; gap:.35rem; }
.field--full{ grid-column:1 / -1; }

label{ font-weight:700; }
input[type="text"], input[type="email"], input[type="range"]{
  padding:.8rem .9rem; border:1px solid rgba(0,0,0,.12); border-radius:12px;
  background:#fff; outline:none; transition:border .2s ease, box-shadow .2s ease;
}
input[type="text"]:focus, input[type="email"]:focus{
  border-color:var(--primary); box-shadow:0 0 0 3px rgba(0,91,187,.15);
}
.consent{
  grid-column:1/-1; display:flex; gap:.6rem; align-items:flex-start;
  background:#f7fafc; border:1px solid var(--border-soft); padding:.75rem .9rem; border-radius:12px;
}
.actions{ grid-column:1/-1; display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; }
.hint{ font-size:.9rem; color:#555; }
.muted{ color:#666; }
.hp{ display:none; }

.inline-error{ color:#b00020; font-size:.9rem; }
.is-invalid{ border-color:#b00020 !important; box-shadow:0 0 0 3px rgba(176,0,32,.12) !important; }
.success,.error{ grid-column:1/-1; padding:.8rem 1rem; border-radius:12px; display:none; }
.success{ background:#e8f6ee; border:1px solid #bde5c8; }
.error{ background:#fdeaea; border:1px solid #f5c2c2; }

@media (max-width:720px){
  form.news{ grid-template-columns:1fr; }
}

/* Slider (slide-to-confirm) */
.slider-wrap{ grid-column:1 / -1; }
.slider-track{
  position:relative;
  background:linear-gradient(90deg, rgba(0,91,187,.15) var(--fill,0%), rgba(0,0,0,.06) var(--fill,0%));
  height:48px; border-radius:999px; padding:6px; border:1px solid rgba(0,0,0,.12);
  display:flex; align-items:center; gap:.6rem;
}
.slider-thumb{
  position:absolute; left:6px; top:6px; height:36px; width:36px; border-radius:50%;
  background:#fff; border:2px solid var(--primary); display:grid; place-items:center;
  font-weight:800; user-select:none; touch-action:none; transition:box-shadow .15s ease;
}
.slider-label{ width:100%; text-align:center; font-weight:700; color:#275a8f; pointer-events:none; }
.slider-verified{ color:#0a7a34; font-weight:800; }
.slider-disabled{ opacity:.6; }

/* Testimonial */
.testimonial{
  background:var(--surface-2); border:1px solid var(--border-soft);
  padding:1rem; border-radius:12px; margin-top:1.25rem;
}
.testimonial .quote{ font-style:italic; }

/* Footer */
.site-footer{
  margin-top:4rem; background:var(--surface); border-top:1px solid var(--border-soft);
  position:relative; isolation:isolate;
}
.site-footer::before{
  content:""; position:absolute; inset:0; z-index:-1;
  background:
    radial-gradient(120% 80% at 10% 0%, color-mix(in srgb, var(--primary) 6%, transparent), transparent 60%),
    radial-gradient(120% 80% at 90% 100%, color-mix(in srgb, var(--secondary) 6%, transparent), transparent 60%);
}
.footer-inner{
  padding:2.5rem 0;
  display:grid; gap:2rem; grid-template-columns: 1.3fr repeat(3, 1fr);
}
.footer-brand{ display:flex; align-items:flex-start; gap:.75rem; }
.footer-brand img{ width:42px; height:auto; }
.footer-brand strong{ display:block; font-size:1.05rem; }
.footer-brand p{ margin:.25rem 0 0; color:var(--muted); font-size:.95rem; }

.footer-group h3{ margin:0 0 .75rem; font-size:1rem; font-weight:700; color:var(--text); }
.footer-links{ list-style:none; margin:0; padding:0; display:grid; gap:.5rem; }
.footer-links a{
  text-decoration:none; color:var(--text); font-weight:700;
  padding:.25rem 0; border-radius:6px;
  transition: color var(--transition), background var(--transition);
}
.footer-links a:hover{ color:var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }

.footer-contact a{ color:var(--text); text-decoration:none; }
.footer-contact a:hover{ color:var(--primary); text-decoration:underline; }

.footer-social{ display:flex; gap:.5rem; margin-top:.75rem; }
.footer-social a{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px; border-radius:50%;
  background:var(--surface-2); border:1px solid var(--border-soft);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.footer-social a:hover{ transform: translateY(-2px); box-shadow:0 6px 16px rgba(0,0,0,.08); }
.footer-social svg{ width:18px; height:18px; fill:var(--text); }

.builder-credit{ text-align:center; padding:1rem 0; }
.builder-credit .builder-logo{ width:250px; height:auto; display:inline-block; vertical-align:middle; }

.subfooter{
  border-top:1px solid var(--border-soft);
  padding:.9rem 0; background:var(--surface);
}
.subfooter-inner{
  display:flex; gap:1rem; align-items:center; justify-content:space-between; flex-wrap:wrap;
}
.subfooter small{ color:var(--muted); }
.subfooter-nav{ display:flex; gap:1rem; align-items:center; flex-wrap:wrap; }
.subfooter-nav a{ text-decoration:none; color:var(--text); font-weight:700; }
.subfooter-nav a:hover{ color:var(--primary); text-decoration:underline; }

.footer-lang{
  display:inline-flex; align-items:center; gap:.5rem;
  border:1px solid var(--border); border-radius:8px; padding:.35rem .5rem; background:var(--surface);
}
.footer-lang select{ border:none; background:transparent; font-weight:700; color:var(--text); outline:none; }

/* Footer responsive */
@media (max-width:900px){ .footer-inner{ grid-template-columns:1fr 1fr; } }
@media (max-width:560px){ .footer-inner{ grid-template-columns:1fr; } }

/* Back-to-top FAB */
.back-to-top{
  position:fixed; right:1rem; bottom:1rem; z-index:1000;
  width:44px; height:44px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color:#fff; border:none; cursor:pointer;
  box-shadow:0 10px 24px rgba(0,91,187,.35);
  transform: translateY(16px); opacity:0; pointer-events:none;
  transition: transform .25s ease, opacity .25s ease, box-shadow .2s ease;
}
.back-to-top.visible{ transform: translateY(0); opacity:1; pointer-events:auto; }
.back-to-top:hover{ box-shadow:0 14px 28px rgba(0,91,187,.45); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; scroll-behavior:auto !important; }
  .back-to-top{ transition:none; }
}
