/* ==========================================================================
   Nepcor Refrigeration & General — shared stylesheet
   Palette (design-language.md): arctic cyan + warm coral on white / dark slate.
   Type: Space Grotesk (headings), Inter (body).
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------- */
:root {
  /* Brand hues */
  --cyan: #0E9CC4;
  --cyan-strong: #0B7E9E;
  --coral: #EF6351;
  --coral-strong: #D94B39;

  /* Ink & ground (light, default) */
  --ink: #1E2A30;
  --ink-soft: #40525B;
  --muted: #6B7A80;
  --ground: #FFFFFF;
  --ground-alt: #EEF3F5;
  --surface: #FFFFFF;          /* card / panel fill — flips dark in dark mode */
  --surface-alt: #F5F9FA;
  --hairline: #D9E2E6;

  /* Text that sits ON a saturated brand colour (hero, footer, buttons, nav
     bar). This must stay light in BOTH themes — separate token, one job. */
  --on-brand: #FFFFFF;
  --on-brand-soft: rgba(255, 255, 255, 0.82);

  /* Accents mapped to roles */
  --accent: var(--cyan);
  --accent-ink: var(--cyan-strong);
  --cta: var(--coral);
  --cta-hover: var(--coral-strong);

  /* Effects */
  --shadow: 0 1px 2px rgba(30, 42, 48, 0.06), 0 8px 24px rgba(30, 42, 48, 0.08);
  --shadow-sm: 0 1px 3px rgba(30, 42, 48, 0.10);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1140px;
  --gap: clamp(1rem, 2.5vw, 2rem);

  --header-bg: #10333E;        /* deep cyan-slate header, same in both themes */
  --header-ink: #FFFFFF;
  --star: #F5A623;
}

[data-theme="dark"] {
  --cyan: #38B8DB;
  --cyan-strong: #5EC8E6;
  --coral: #F1745F;
  --coral-strong: #F58C79;

  --ink: #EAF1F3;
  --ink-soft: #C2D0D6;
  --muted: #93A6AD;
  --ground: #141C21;
  --ground-alt: #1A252B;
  --surface: #1E2A30;          /* card fill flips dark */
  --surface-alt: #24313A;
  --hairline: #33434C;

  /* on-brand text stays light — brand backgrounds don't swap with the page */
  --on-brand: #FFFFFF;
  --on-brand-soft: rgba(255, 255, 255, 0.82);

  --accent: var(--cyan);
  --accent-ink: var(--cyan-strong);
  --cta: var(--coral);
  --cta-hover: var(--coral-strong);

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);

  --header-bg: #0E2730;
  --star: #F5B948;
}

/* --- Reset / base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--ground);
  line-height: 1.6;
  font-size: 17px;
  transition: background-color .25s ease, color .25s ease;
}
h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Archivo", system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { margin: 0 0 1rem; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--cta); }
img { max-width: 100%; display: block; height: auto; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
li { margin-bottom: .3rem; }

/* --- Layout helpers ------------------------------------------------------ */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section--alt { background: var(--ground-alt); }
.center { text-align: center; }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 60ch; }
.center .lede { margin-inline: auto; }
.eyebrow {
  display: inline-block; font-family: "Space Grotesk", sans-serif; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; font-size: .8rem;
  color: var(--accent-ink); margin-bottom: .5rem;
}
.visually-hidden {
  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 {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--cta); color: var(--on-brand); padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1rem;
  padding: .8rem 1.4rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1.1;
  transition: transform .08s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
  min-height: 48px;
}
.btn:active { transform: translateY(1px); }
.btn--cta { background: var(--cta); color: var(--on-brand); }
.btn--cta:hover { background: var(--cta-hover); color: var(--on-brand); }
.btn--call { background: var(--accent); color: var(--on-brand); }
.btn--call:hover { background: var(--accent-ink); color: var(--on-brand); }
.btn--wa { background: #25D366; color: #08331A; }
.btn--wa:hover { background: #1FB959; color: #08331A; }
.btn--ghost { background: transparent; color: var(--accent-ink); border-color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: var(--on-brand); }
/* Tertiary button used on the cyan CTA gradient — a translucent dark fill keeps
   the white label above AA contrast across the whole gradient, not just its
   darker end. */
.btn--on-dark { background: rgba(0,0,0,.22); border-color: rgba(255,255,255,.65); color: var(--on-brand); }
.btn--on-dark:hover { background: rgba(0,0,0,.34); color: var(--on-brand); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }
.center .btn-row { justify-content: center; }

/* --- Header / nav -------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg); color: var(--header-ink);
  box-shadow: var(--shadow-sm);
}
.header-inner { display: flex; align-items: center; gap: 1rem; padding-block: .6rem; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--header-ink); margin-right: auto; }
.brand:hover { color: var(--header-ink); }
.brand__mark { flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand__sub { font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; color: var(--on-brand-soft); }

.nav { display: flex; align-items: center; gap: .25rem; }
.nav a {
  color: var(--header-ink); text-decoration: none; font-weight: 600; font-size: .96rem;
  padding: .5rem .7rem; border-radius: 8px;
}
.nav a:hover { background: rgba(255,255,255,.12); color: var(--header-ink); }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--coral); }

.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-call {
  display: inline-flex; align-items: center; gap: .4rem; font-weight: 700;
  color: var(--header-ink); text-decoration: none; font-family: "Space Grotesk", sans-serif;
  padding: .45rem .8rem; border-radius: 999px; background: var(--cta); font-size: .95rem;
}
.header-call:hover { background: var(--cta-hover); color: var(--on-brand); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: var(--header-ink);
}
.theme-toggle:hover { background: rgba(255,255,255,.22); }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); color: var(--header-ink);
  align-items: center; justify-content: center;
}

/* --- Hero ---------------------------------------------------------------- */
.hero { position: relative; color: var(--on-brand); background: #0d2b34; overflow: hidden; }
.hero__img { position: absolute; inset: 0; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(9,32,40,.92) 0%, rgba(9,32,40,.72) 45%, rgba(14,156,196,.42) 100%);
}
.hero__inner { position: relative; padding-block: clamp(3rem, 8vw, 5.5rem); max-width: 46rem; }
.hero h1 { color: var(--on-brand); }
.hero p { color: var(--on-brand-soft); font-size: 1.2rem; }
.hero .btn--ghost { color: var(--on-brand); border-color: rgba(255,255,255,.7); }
.hero .btn--ghost:hover { background: rgba(255,255,255,.15); color: var(--on-brand); }

/* --- Trust strip --------------------------------------------------------- */
.trust {
  background: var(--surface); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.trust__row {
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: center; align-items: center;
  padding-block: 1rem; text-align: center;
}
.trust__item { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--ink-soft); font-size: .98rem; }
.trust__item strong { color: var(--ink); }
.stars { color: var(--star); letter-spacing: 1px; }

/* --- Cards --------------------------------------------------------------- */
.grid { display: grid; gap: var(--gap); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card h3 { margin-top: .4rem; }
.card__icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--cyan) 15%, transparent); color: var(--accent-ink); margin-bottom: .4rem;
}
.card--link { text-decoration: none; color: inherit; transition: transform .12s ease, box-shadow .2s ease; }
.card--link:hover { transform: translateY(-3px); color: inherit; box-shadow: 0 10px 30px rgba(30,42,48,.14); }
.card--service img { border-radius: var(--radius-sm); margin-bottom: 1rem; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.card .btn { margin-top: auto; align-self: flex-start; }

/* Feature / media split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; object-fit: cover; }
.split--reverse .split__media { order: -1; }

/* CTA banner */
.cta-band {
  background: linear-gradient(120deg, var(--cyan-strong), var(--cyan)); color: var(--on-brand);
  border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.6rem); text-align: center;
}
.cta-band h2 { color: var(--on-brand); }
.cta-band p { color: var(--on-brand-soft); }
.cta-band .btn-row { justify-content: center; margin-top: 1rem; }

/* Buy-old-fridge strip */
.buy-strip {
  background: color-mix(in srgb, var(--coral) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--coral) 35%, var(--hairline));
  border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2rem);
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; justify-content: space-between;
}
.buy-strip h3 { margin: 0; }
.buy-strip p { margin: .2rem 0 0; color: var(--ink-soft); }

/* --- Reviews ------------------------------------------------------------- */
.quote {
  background: var(--surface); border: 1px solid var(--hairline); border-left: 4px solid var(--cyan);
  border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.quote blockquote { margin: 0 0 1rem; font-size: 1.05rem; color: var(--ink); }
.quote figcaption { color: var(--muted); font-size: .9rem; }
.quote figcaption strong { color: var(--ink); }
.rating-big { font-size: clamp(2.6rem, 7vw, 3.6rem); font-family: "Space Grotesk", sans-serif; font-weight: 700; color: var(--accent-ink); line-height: 1; }

/* --- Service detail blocks ---------------------------------------------- */
.svc-block { border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--surface); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.svc-block h3 { color: var(--accent-ink); }
.note-band {
  background: color-mix(in srgb, var(--cyan) 10%, var(--surface));
  border: 1px dashed color-mix(in srgb, var(--cyan) 45%, var(--hairline));
  border-radius: var(--radius); padding: 1.2rem 1.4rem;
}

/* --- Price table --------------------------------------------------------- */
.price-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.price-table th, .price-table td { text-align: left; padding: .85rem 1.1rem; border-bottom: 1px solid var(--hairline); }
.price-table thead th { background: var(--ground-alt); font-family: "Space Grotesk", sans-serif; }
.price-table tbody tr:last-child td { border-bottom: 0; }
.price-table td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }

/* --- Form ---------------------------------------------------------------- */
.form { display: grid; gap: 1rem; }
.form .field { display: flex; flex-direction: column; gap: .35rem; }
.form label { font-weight: 600; font-size: .95rem; }
.form .req { color: var(--cta); }
.form input, .form select, .form textarea {
  font: inherit; padding: .7rem .8rem; border-radius: var(--radius-sm);
  border: 1px solid var(--hairline); background: var(--ground); color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.form textarea { min-height: 120px; resize: vertical; }
.form .row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-note { font-size: .9rem; color: var(--muted); }

/* --- Contact info list --------------------------------------------------- */
.info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.info-list li { display: flex; gap: .8rem; align-items: flex-start; }
.info-list .ico { flex: none; color: var(--accent-ink); margin-top: .15rem; }
.info-list a { font-weight: 600; text-decoration: none; }

.map-embed { border: 0; width: 100%; height: 340px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* --- Footer -------------------------------------------------------------- */
.site-footer { background: var(--header-bg); color: var(--on-brand-soft); margin-top: 2rem; }
.site-footer a { color: var(--on-brand); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--on-brand); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; padding-block: clamp(2rem, 5vw, 3rem); }
.site-footer h4 { color: var(--on-brand); font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding-block: 1rem; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.footer-brand__name { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--on-brand); }

/* --- Sticky mobile call/WhatsApp bar ------------------------------------ */
.mobile-bar { display: none; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px);
    background: var(--header-bg); flex-direction: column; align-items: stretch;
    padding: 5rem 1.2rem 2rem; gap: .3rem; transform: translateX(100%);
    transition: transform .25s ease; box-shadow: -8px 0 30px rgba(0,0,0,.3);
  }
  .nav[data-open="true"] { transform: translateX(0); }
  .nav a { font-size: 1.1rem; padding: .8rem .9rem; }
  .nav-toggle { display: inline-flex; }
  .header-call span.long { display: none; }
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .footer-grid { grid-template-columns: 1fr; }

  body { padding-bottom: 64px; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  }
  .mobile-bar a {
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    padding: .9rem; font-family: "Space Grotesk", sans-serif; font-weight: 700; text-decoration: none;
    color: #fff; min-height: 56px;
  }
  .mobile-bar .mb-call { background: var(--cta); }
  .mobile-bar .mb-wa { background: #1FB959; color: #06301A; }
}

@media (max-width: 420px) {
  .brand__sub { display: none; }
}

/* Scrim behind open nav */
.nav-scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 95; }
.nav-scrim[data-open="true"] { display: block; }
@media (min-width: 861px) { .nav-scrim { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
