/*
  Ready24 — Global Styles (v1.1)
  Goal: fast, clean, high-contrast, RTL/LTR-aware, with gentle motion.
*/

/* =========================
   0) Root & Resets
   ========================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:root {
  /* Brand palette */
  --navy: #0B3A53;
  --mint: #2DD4BF;
  --charcoal: #1F2937;
  --offwhite: #F7F8F8;
  --ink: #0F172A;    /* deep text */
  --sky: #E6FFFB;    /* mint tint */
  --smoke: #EEF2F6;  /* section alt bg */
  --shadow: 0 10px 30px rgba(2, 8, 23, .08);

  /* Semantic tokens */
  --color-bg: var(--offwhite);
  --color-card: #FFFFFF;
  --color-text: var(--ink);
  --color-muted: #5B6472;
  --color-brand: var(--mint);
  --color-brand-ink: #0B3A53;

  /* Layout */
  --container: 1440px; /* desktop base; can be narrowed per lang below */
  --radius-lg: 16px;
  --radius-xl: 24px;
  --gap: 20px;
  --section-y: clamp(48px, 8vw, 96px);

  /* Typography scale */
  --fs-900: clamp(28px, 5vw, 44px);
  --fs-800: clamp(22px, 3.4vw, 32px);
  --fs-700: clamp(18px, 2.6vw, 26px);
  --fs-600: 18px;
  --fs-500: 16px;
  --fs-400: 14px;
}

/* EN pages: slightly narrower container on large screens */
@media (min-width: 1100px){
  html[lang="en"] { --container: 1320px; }
}

/* Media elements */
img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Accessibility helpers */
:focus-visible {
  outline: 3px dashed var(--color-brand);
  outline-offset: 3px;
}
.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;
}
[hidden] { display: none !important; }

/* =========================
   1) Typography
   ========================= */
h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 .5em;
}
h1 { font-size: var(--fs-900); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-800); }
h3 { font-size: var(--fs-700); }
p { margin: 0 0 1em; }
.lead { font-size: clamp(18px, 2.2vw, 20px); color: var(--color-text); }
.muted { color: var(--color-muted); }
.fine { color: var(--color-muted); font-size: var(--fs-400); }

/* =========================
   2) Layout primitives
   ========================= */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 28px);
}
.section { padding-block: var(--section-y); }
.alt-band { background: var(--smoke); }

/* Grid: 1 → 2 → 3 columns */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}
@media (min-width: 640px){
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px){
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Cards */
.card {
  background: var(--color-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 28px);
}

/* Hero split */
.hero {
  display: grid;
  gap: var(--gap);
  align-items: center;
  padding-block: clamp(36px, 7vw, 80px);
}
@media (min-width: 960px) {
  .hero { grid-template-columns: 1.2fr 1fr; }
  .hero .only-hero-media { order: 2; }
}
.hero img { border-radius: var(--radius-xl); }

/* Badge */
.badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--sky), #fff);
  border: 1px solid rgba(11,58,83,.12);
  color: var(--color-brand-ink);
  padding: 6px 10px;
  border-radius: 999px;
  margin-block-end: 10px;
}

/* CTA block */
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block: 16px 6px;
}

/* Notes */
.note {
  font-size: var(--fs-400);
  color: var(--color-muted);
  margin-block-start: 8px;
}

/* =========================
   3) Header / Nav
   ========================= */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(8px);
  transition: background-color .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.nav-wrap {
  border-block-end: 1px solid rgba(2,8,23,.04);
  background: color-mix(in oklab, var(--offwhite) 60%, white);
}
.site-header.trans { background: transparent; border-color: transparent; }
.site-header.scrolled .nav-wrap {
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow);
}

/* expand container slightly in header */
.nav-wrap .container {
  padding-inline: clamp(12px, 2.6vw, 22px);
}

/* Header bar: brand pinned, links centered, lang at corner */
.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;  /* center nav links */
  gap: 12px;
  padding-block: 12px;
}

.brand {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: clamp(12px, 2.6vw, 24px);
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  min-width: 180px;
}

/* Logo */
.logo {
  height: 58px !important;
  width: auto;
  image-rendering: -webkit-optimize-contrast;
}

/* Smaller logo on mobile */
@media (max-width: 640px){
  .brand { min-width: 140px; }
  .logo  { height: 36px !important; }
}

/* Nav links centered with padding to leave room for brand/lang buttons */
.nav-links{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  justify-content: center;
  padding-inline: clamp(96px, 12vw, 180px);
}

/* Language pill pinned to inline-end */
.btn-lang{
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: clamp(12px, 2.6vw, 24px);
  transform: translateY(-50%);
  margin: 0 !important;
  padding: 10px 14px;
  border-radius: 999px;
  z-index: 2;
}

/* Nav pills */
.pill {
  --_pad: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: var(--_pad);
  font-size: 14px;
  text-decoration: none;
  color: var(--charcoal);
  background: #fff;
  border: 1px solid rgba(2,8,23,.08);
  border-radius: 999px;
  transition: background .2s ease, color .2s ease, transform .08s ease;
}
.pill:hover { background: var(--smoke); }
.pill:active { transform: translateY(1px); }

.pill[aria-current="page"]{
  font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(16,24,40,.12);
}

/* Minor CTA pill */
.pill.cta-minor {
  background: var(--color-brand);
  color: #00323B;
  border-color: transparent;
}
.pill.cta-minor:hover {
  background: color-mix(in oklab, var(--color-brand) 86%, white);
}

/* Language pill visual styling */
.btn-lang {
  background: #101828;
  color: #fff;
  border-color: #101828;
}
.btn-lang:hover {
  background: #0B3A53;
  border-color: #0B3A53;
}

/* Mobile: reduce padding around links */
@media (max-width: 700px){
  .nav-links{ padding-inline: clamp(72px, 10vw, 120px); }
}

/* EN pages: tweak header padding a bit more if needed */
@media (min-width: 1100px){
  html[lang="en"] .nav-links {
    padding-inline: clamp(96px, 10vw, 200px);
  }
}

/* =========================
   4) Buttons
   ========================= */
.btn {
  --_bg: var(--color-brand);
  --_ink: #00323B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--_bg);
  color: var(--_ink);
  border: 0;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(45, 212, 191, .25);
  transition: transform .08s ease, box-shadow .25s ease, filter .25s ease;
}
.btn:hover {
  filter: saturate(120%);
  box-shadow: 0 10px 26px rgba(45, 212, 191, .33);
}
.btn:active { transform: translateY(1px); }

.btn.alt {
  --_bg: #0B3A53;
  --_ink: #fff;
  background: var(--_bg);
  color: var(--_ink);
  box-shadow: 0 6px 20px rgba(11,58,83,.18);
}
.btn.alt:hover {
  box-shadow: 0 10px 26px rgba(11,58,83,.28);
}

/* Ghost button */
.btn.ghost {
  background: transparent;
  border: 1px solid rgba(2,8,23,.12);
  color: var(--charcoal);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(2,8,23,.04); }

/* =========================
   5) Lists & Tiles
   ========================= */
.tile {
  background: #fff;
  border: 1px solid rgba(2,8,23,.06);
  border-radius: var(--radius-lg);
  padding: clamp(14px, 2.3vw, 22px);
  box-shadow: 0 1px 0 rgba(2,8,23,.04);
}
.tile ul {
  padding: 0;
  list-style: none;
  margin: .5em 0 0;
}
.tile li {
  padding-block: 6px;
  border-block-end: 1px dashed rgba(2,8,23,.06);
}
.tile li:last-child { border: 0; }

/* =========================
   6) Media & Images
   ========================= */
img.round { border-radius: 999px; }
.cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

/* Hero media fallback background if image fails */
.only-hero-media {
  min-height: 220px;
  background: #E6FFFB;
}
.only-hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================
   7) Footer
   ========================= */
footer {
  background: #fff;
  border-top: 1px solid rgba(2,8,23,.06);
}
footer .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 18px;
  gap: 16px;
}
@media (max-width: 640px){
  footer .foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================
   8) Reveal-on-scroll
   ========================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger */
.reveal [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible [data-reveal] {
  opacity: 1;
  transform: translateY(0);
}
.reveal.is-visible [data-reveal="1"] { transition-delay: .04s; }
.reveal.is-visible [data-reveal="2"] { transition-delay: .10s; }
.reveal.is-visible [data-reveal="3"] { transition-delay: .16s; }
.reveal.is-visible [data-reveal="4"] { transition-delay: .22s; }

/* Parallax helper */
.parallax { will-change: transform; }

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
  .reveal,
  .reveal [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* =========================
   9) Tables
   ========================= */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
  border: 1px solid rgba(2,8,23,.08);
  border-radius: 12px;
  overflow: hidden;
}
.table th,
.table td {
  padding: 12px 14px;
  text-align: start;
  border-bottom: 1px solid rgba(2,8,23,.06);
}
.table th {
  background: #FAFAFB;
  color: #0B3A53;
  font-weight: 700;
}
.table tr:last-child td { border-bottom: 0; }

/* =========================
   10) Forms
   ========================= */
.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid rgba(2,8,23,.12);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
}
.input:focus,
.textarea:focus,
.select:focus {
  outline: 3px solid color-mix(in oklab, var(--color-brand) 70%, white);
  border-color: transparent;
}
.label {
  display: block;
  font-weight: 600;
  margin-block-end: 8px;
}
.help {
  font-size: 12px;
  color: var(--color-muted);
}

/* =========================
   11) Utilities
   ========================= */
.center { text-align: center; }
.stack-sm > * + * { margin-block-start: 6px; }
.stack-md > * + * { margin-block-start: 12px; }
.stack-lg > * + * { margin-block-start: 18px; }
.hidden { display: none !important; }

.mt-0 { margin-block-start: 0 !important; }
.mb-0 { margin-block-end: 0 !important; }
.mt-1 { margin-block-start: 8px !important; }
.mb-1 { margin-block-end: 8px !important; }
.mt-2 { margin-block-start: 14px !important; }
.mb-2 { margin-block-end: 14px !important; }
.mt-3 { margin-block-start: 20px !important; }
.mb-3 { margin-block-end: 20px !important; }

/* =========================
   12) Direction-aware tweaks
   ========================= */
html[dir="rtl"] .pill,
html[dir="rtl"] .btn {
  letter-spacing: 0;
}
html[dir="rtl"] .badge { letter-spacing: 0; }
html[dir="rtl"] .tile li { padding-inline-start: 0; }

/* =========================
   13) Page-specific nuances
   ========================= */
/* Sticky floating WhatsApp */
.floating-wa {
  position: fixed;
  inset-block-end: 20px;
  inset-inline-end: 20px;
  z-index: 60;
  filter: drop-shadow(0 6px 14px rgba(16,24,40,.18));
}
.floating-wa .btn {
  border-radius: 999px;
  padding: 14px 18px;
}

/* Intake / Contact hero image sizing */
#location .card img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* =========================
   14) Print
   ========================= */
@media print {
  .site-header,
  .btn,
  .pill,
  .floating-wa,
  footer {
    display: none !important;
  }
  .card,
  .tile,
  .table {
    box-shadow: none !important;
    border-color: #aaa !important;
  }
  a {
    text-decoration: underline;
    color: #000;
  }
}
