/* ==========================================================
   S.I Interiors: styles
   Edit the tokens below to change colours, fonts and spacing.
   ========================================================== */

:root {
  /* Colour: one neutral base, one accent */
  --base:        #f5f5f3;   /* page background */
  --surface:     #ffffff;   /* cards, form */
  --alt:         #eaebe8;   /* alternate section background */
  --text:        #1c2024;
  --muted:       #555c63;
  --line:        #d5d7d9;
  --accent:      #1f4e79;   /* [PLACEHOLDER] replace with the logo/van colour */
  --accent-dark: #163a5c;   /* darker shade for hover */
  --on-accent:   #ffffff;
  --footer-bg:   #1c2024;
  --hero-overlay: rgba(16, 22, 28, .62);   /* darkness over the hero photo */

  /* Type */
  --font-head: "Archivo", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* Layout */
  --max: 1120px;
  --gap: 1.5rem;
  --radius: 4px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;   /* 17px */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 100; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  min-height: 48px;
  padding: .75rem 1.5rem;
  background: var(--accent);
  color: var(--on-accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  font: 600 1rem var(--font-body);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--on-accent); }
.btn-outline { background: transparent; color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--on-accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: .5rem; min-height: 64px; }
.logo { text-decoration: none; color: var(--text); margin-right: auto; display: flex; flex-direction: column; line-height: 1.15; }
.logo-tag { display: none; font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.logo-text { font: 600 1.15rem var(--font-head); letter-spacing: -0.01em; white-space: nowrap; }
.header-phone {
  font-weight: 600; font-size: .85rem; text-decoration: none; white-space: nowrap;
  padding: .5rem .6rem; background: var(--accent); color: var(--on-accent); border-radius: var(--radius);
}
.header-phone:hover { background: var(--accent-dark); color: var(--on-accent); }
.nav-toggle {
  min-height: 44px; padding: .5rem .9rem;
  background: none; border: 2px solid var(--line); border-radius: var(--radius);
  font: 600 .95rem var(--font-body); color: var(--text); cursor: pointer;
}
/* Mobile nav: hidden until toggled */
.nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.nav.open { display: block; }
.nav a { display: block; padding: .9rem 1rem; color: var(--text); text-decoration: none; font-weight: 600; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; border-top: 1px solid var(--line); }
.nav a:hover { color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--alt); }
.section-intro { color: var(--muted); max-width: 60ch; margin-bottom: 2rem; }

/* ---------- Hero (full-bleed photo, text in front) ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(88vh, 720px);
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 4rem 0;
  background: #2a3036;
}
.hero-slides { position: absolute; inset: 0; z-index: -2; background: #2a3036; overflow: hidden; }
/* Slide starts slightly zoomed and blurred, then resolves to sharp/normal as it becomes active
   (and reverts the same way as it leaves) — a soft motion-blur-style transition rather than a plain crossfade. */
.hero-slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; filter: blur(18px); transform: scale(1.06);
  transition: opacity 1.1s ease, filter 1.1s ease, transform 1.5s ease;
}
.hero-slide.is-active { opacity: 1; filter: blur(0); transform: scale(1); }
.hero::after { content: ""; position: absolute; inset: 0; background: var(--hero-overlay); z-index: -1; }
.hero-content { max-width: 860px; }
.hero h1 { text-transform: uppercase; letter-spacing: .01em; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.eyebrow { font-weight: 600; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .75rem; font-size: .85rem; color: #fff; opacity: .9; }
.lead { font-size: 1.15rem; color: #eef0f1; max-width: 56ch; margin-inline: auto; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.75rem; }
.btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--text); border-color: #fff; }

/* ---------- Logo carousel ---------- */
.logos { background: var(--surface); border-bottom: 1px solid var(--line); padding: 1.75rem 0; }
.logos-title { text-align: center; margin: 0 0 1.25rem; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.logos-viewport { overflow: hidden; }
/* Fade the logos out at both edges (--logos-fade sets how wide the fade is) */
.logos-viewport.moving { --logos-fade: 12%; -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--logos-fade), #000 calc(100% - var(--logos-fade)), transparent); mask-image: linear-gradient(to right, transparent, #000 var(--logos-fade), #000 calc(100% - var(--logos-fade)), transparent); }
.logos-track { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 3rem; width: max-content; }
.logos-track li { flex: none; }
.logos-track img { height: 44px; width: auto; max-width: 160px; object-fit: contain; filter: grayscale(1); opacity: .7; transition: opacity .2s, filter .2s; }
.logos-track img:hover { filter: none; opacity: 1; }
/* No JS or reduced motion: static, wrapping row */
.logos-viewport:not(.moving) .logos-track { width: auto; flex-wrap: wrap; justify-content: center; gap: 1.5rem 2.5rem; padding: 0 1rem; }
/* Moving version (class added by js/main.js) */
.logos-viewport.moving .logos-track { animation: logos-scroll var(--logos-duration, 40s) linear infinite; }
.logos-viewport.moving:hover .logos-track { animation-play-state: paused; }
@keyframes logos-scroll { to { transform: translateX(calc(-1 * var(--logos-shift, 50%))); } }

/* ---------- Cards ---------- */
.cards { display: grid; gap: var(--gap); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 1.25rem; }
.card-body p:last-child { margin-bottom: 0; }
.meta { color: var(--accent); font-weight: 600; font-size: .95rem; margin-bottom: .5rem; }
dl { margin: 0; }
dt { font-weight: 600; margin-top: .9rem; }
dd { margin: 0; color: var(--muted); }

/* ---------- Service cards with icon slot ---------- */
.cards-icon .card { border-top: 4px solid var(--accent); }
.cards-icon .card-body { padding: 1.75rem; }
.card-icon { width: 64px; height: 64px; color: var(--accent); margin-bottom: 1rem; }
.card-icon svg { width: 100%; height: 100%; }

/* ---------- Accreditations ---------- */
.badges { list-style: none; padding: 0; margin: 1.5rem 0; display: flex; flex-wrap: wrap; gap: .75rem; }
.badges li { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: .75rem 1.1rem; font-weight: 600; border-radius: var(--radius); }
.note { color: var(--muted); }

/* ---------- About ---------- */
.about-grid { display: grid; gap: 2rem; align-items: center; }
.about-grid figure { margin: 0; }
.about-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 2rem; }
.big-contact { font: 600 1.4rem/1.6 var(--font-head); }
.big-contact a { text-decoration: none; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: grid; gap: 1rem; }
.form label { display: grid; gap: .3rem; font-weight: 600; font-size: .95rem; }
.form input, .form textarea {
  font: 400 1rem var(--font-body); color: var(--text);
  padding: .7rem .8rem; border: 1px solid #9aa0a6; border-radius: var(--radius); background: #fff; width: 100%;
}
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: #d9dcde; padding: 3rem 0 1.5rem; font-size: .95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 1.5rem; }
.footer-title { font: 600 1.05rem var(--font-head); color: #fff; margin-bottom: .4rem; }
.footer-base { border-top: 1px solid #3a4046; margin-top: 2rem; padding-top: 1rem; color: #9aa0a6; }
.footer-base p { margin: 0; }

/* ---------- Tablet and up ---------- */
@media (min-width: 640px) {
  .cards-2, .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 4.5rem 0; }
}

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .nav { display: flex; position: static; border: 0; background: none; gap: 1.25rem; }
  .nav a { border: 0; padding: .5rem 0; }
  .logo-tag { display: block; }
  .header-phone { order: 3; }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 3rem; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1.4fr; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
