/* ==========================================================================
   FMM General Contractors — base styles
   Tailwind (via CDN) handles layout/utilities. This file covers fonts,
   design tokens, motion, focus states and a few components Tailwind's
   CDN build can't express with @apply.
   ========================================================================== */

:root {
  --ink: #16181d;
  --ink-800: #22252e;
  --ink-700: #2e3340;
  --brand: #e67721;
  --brand-600: #c15e12;
  --brand-50: #fdf3ea;
  --sand: #f5f3ef;
  --line: #e5e2db;
  --white: #ffffff;

  --container: 1200px;
  --header-h: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -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(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: "Archivo", system-ui, sans-serif;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { text-wrap: pretty; }

img { max-width: 100%; height: auto; display: block; }

/* --- Utility bar language toggle ------------------------------------------ */
.lang-toggle {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  overflow: hidden;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  padding: 4px 10px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lang-toggle button[aria-pressed="true"] {
  background: var(--brand);
  color: #fff;
}
.lang-toggle button:hover:not([aria-pressed="true"]) {
  color: #fff;
}

/* --- Header scroll state ------------------------------------------------- */
.site-header {
  transition: background-color 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header[data-scrolled="true"] {
  background: rgba(22, 24, 29, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 30px -12px rgba(0, 0, 0, 0.5);
}

/* --- Hero ---------------------------------------------------------------- */
.hero-overlay {
  background:
    linear-gradient(180deg, rgba(22, 24, 29, 0.55) 0%, rgba(22, 24, 29, 0.4) 40%, rgba(22, 24, 29, 0.9) 100%),
    linear-gradient(90deg, rgba(22, 24, 29, 0.8) 0%, rgba(22, 24, 29, 0.15) 70%);
}

/* --- Section eyebrow --------------------------------------------------- */
.eyebrow {
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-600);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--brand);
  display: inline-block;
}
.eyebrow--light { color: var(--brand); }

/* --- Cards ------------------------------------------------------------- */
.svc-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 40px -24px rgba(22, 24, 29, 0.35);
  border-color: var(--brand);
}

/* --- Service image carousel ---------------------------------------- */
.svc-carousel { position: relative; height: 100%; }
.svc-carousel .track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.svc-carousel .track::-webkit-scrollbar { display: none; }
.svc-carousel .track > img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: center;
}
.svc-carousel .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(22, 24, 29, 0.55);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}
.svc-carousel:hover .nav,
.svc-carousel:focus-within .nav { opacity: 1; }
.svc-carousel .nav:hover { background: var(--brand); }
.svc-carousel .nav.prev { left: 8px; }
.svc-carousel .nav.next { right: 8px; }
@media (hover: none) {
  .svc-carousel .nav { opacity: 1; background: rgba(22, 24, 29, 0.45); }
}
.svc-carousel .dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 9px;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.svc-carousel .dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: background-color 0.2s ease, width 0.2s ease;
}
.svc-carousel .dots button[aria-current="true"] {
  background: #fff;
  width: 18px;
}

/* --- Scroll reveal --------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal[data-reveal-delay="1"] { transition-delay: 0.08s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.16s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.24s; }

/* --- Focus visibility (never remove) -------------------------------- */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 2px;
}
.on-dark :focus-visible,
.site-header :focus-visible,
.hero :focus-visible {
  outline-color: #fff;
}

/* --- Form ----------------------------------------------------------- */
.field {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field:hover { border-color: #cfccc3; }
.field:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-50);
}
.field::placeholder { color: #9a978d; }
select.field {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2316181d' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Buttons ------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 14px 24px;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.18s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-outline { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-outline--light { color: #fff; }
.btn-outline--light:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* --- Mobile menu ------------------------------------------------- */
.mobile-menu { animation: menu-in 0.18s ease-out; }
.mobile-menu[hidden] { display: none; }
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}
body.menu-open { overflow: hidden; }

/* --- Marquee trust strip -------------------------------------------- */
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 32s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }

/* --- Reduced motion ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .svc-carousel .track { scroll-behavior: auto; }
  .ticker-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .svc-card:hover { transform: none; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* --- Print -------------------------------------------------------- */
@media print {
  .site-header, .mobile-menu, .utility-bar, #to-top { display: none !important; }
}
