/* Florian Fire Protection — Professional Business Site
   Substantial presence, authority, and clarity while staying direct and professional.
*/

:root {
  /* Brand colors */
  --color-paper: #f8f7f4;
  --color-paper-2: #f0efea;
  --color-ink: #111;
  --color-text: #3a3a3a;
  --color-red: #c41f25;
  --color-border: #d8d5cd;
  --color-focus: #c41f25;

  /* Typography - more confident weight */
  --font-display: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* 4-point scale */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Type scale with more presence */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-display: clamp(2.4rem, 6.4vw, 3.4rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-short: 160ms;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;

  --max: 1080px;
  --gutter: clamp(1.5rem, 5vw, 2.75rem);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--color-ink);
  background: var(--color-paper);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 0.5em;
}

h1 { font-size: var(--text-display); font-weight: 900; }
h2 { font-size: 1.95rem; font-weight: 800; letter-spacing: -0.028em; }
h3 { font-size: 1.22rem; font-weight: 700; letter-spacing: -0.02em; }
h4 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.015em; }

/* Keep step and why item titles compact after promoting to h3 for accessibility */
.process .step h3,
.why .why-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.25rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  transform: translateY(-150%);
  background: var(--color-ink);
  color: var(--color-paper);
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  z-index: 100;
}
.skip-link:focus { transform: translateY(0); }

/* Masthead - more substantial */
.site-masthead {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-paper);
  position: sticky;
  top: 0;
  z-index: 50;
}
.masthead-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}
.brand strong { font-size: 1.1rem; letter-spacing: -0.01em; }
.brand small {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-text);
  text-transform: uppercase;
}

/* Hero — Confident Industrial Professional (Impeccable craft) */
.hero {
  padding: 4.5rem 0 4rem;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(to bottom, var(--color-paper), var(--color-paper-2));
}
.hero-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 3.5rem;
  align-items: center;
}
.hero-text { max-width: 640px; }
.hero-kicker {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9c181e; /* darker red for reliable WCAG AA contrast on light backgrounds */
  margin-bottom: 0.75rem;
}
.hero h1 {
  margin-bottom: 0.85rem;
  font-size: clamp(2.65rem, 6.8vw, 3.75rem);
  line-height: 1.05;
  font-weight: 800;
}
.hero-lede {
  font-size: 1.18rem;
  color: var(--color-text);
  max-width: 54ch;
  line-height: 1.5;
  margin-bottom: 1.75rem;
}
.hero-actions {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}
.hero-trust {
  font-size: 0.95rem;
  color: var(--color-text);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-logo {
  width: 100%;
  max-width: 380px;
  height: auto;
  filter: drop-shadow(0 25px 50px rgba(0,0,0,0.12));
  /* Make the logo the hero mark - crisp on all screens */
}

/* Trust bar — substantial authority (Impeccable) */
.trust-bar {
  background: var(--color-ink);
  color: var(--color-paper);
  border-bottom: 1px solid #222;
}
.trust-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.95rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2.25rem;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  list-style: none;
}

/* Services — premium professional cards (Impeccable craft) */
.services {
  padding: 4rem 0 3.75rem;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section-head {
  max-width: 680px;
  margin: 0 auto 2.25rem;
  text-align: center;
}
.section-head h2 {
  margin-bottom: 0.5rem;
  font-size: 1.95rem;
}
.section-head p {
  color: var(--color-text);
  font-size: 1.05rem;
  max-width: 58ch;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.65rem;
}
.service-card {
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.65rem 1.75rem;
  transition: transform 180ms var(--ease-out), 
              box-shadow 180ms var(--ease-out), 
              border-color 180ms var(--ease-out);
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--color-red);
  transform: scaleY(0);
  transition: transform 180ms var(--ease-out);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.08);
  border-color: #c9c5b9;
}
.service-card:hover::after {
  transform: scaleY(1);
}
.service-card h3 {
  margin: 0.9rem 0 0.55rem;
  font-size: 1.18rem;
  line-height: 1.25;
}
.service-icon-wrap {
  color: var(--color-red);
  margin-bottom: 0.35rem;
  transition: transform 180ms var(--ease-out);
}
.service-card:hover .service-icon-wrap {
  transform: scale(1.08);
}

/* Why Florian — substantial authority (Impeccable craft) */
.why {
  background: var(--color-paper-2);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
.why-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.25rem;
}
.why-item {
  border-left: 3px solid var(--color-red);
  padding-left: 1.25rem;
}
.why-item h4 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--color-ink);
}
.why-item p {
  color: var(--color-text);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
}

/* Process — clean steps with original number styling */
.process {
  padding: 4rem 0 3.75rem;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}
.step {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}
.step-number {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--color-red);
  flex-shrink: 0;
  width: 38px;
  line-height: 1;
}
.step h4 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--color-ink);
}
.step p {
  color: var(--color-text);
  font-size: 0.98rem;
  line-height: 1.5;
  margin: 0;
}

/* Contact — premium professional treatment (Impeccable) */
.contact {
  padding: 4.5rem 0;
  background: var(--color-ink);
  color: var(--color-paper);
}
.contact-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 3.25rem;
  align-items: center;
}
.contact-text h2 {
  color: var(--color-paper);
  font-size: 1.95rem;
  margin-bottom: 0.7rem;
  line-height: 1.2;
}
.contact-text p {
  color: #c9c7c0;
  font-size: 1.05rem;
  max-width: 42ch;
  line-height: 1.55;
}
.contact-cta .button-large {
  padding: 0.95rem 2rem;
  font-size: 1.08rem;
  min-height: 52px;
}

/* Make the primary CTA stand out clearly on the dark contact section */
.contact-cta .button-primary {
  background: var(--color-red);
  color: var(--color-paper);
  border-color: var(--color-red);
}
.contact-cta .button-primary:hover {
  background: #a0181d; /* slightly darker red for hover */
  border-color: #a0181d;
  color: var(--color-paper);
  transform: translateY(-1px);
}
.contact-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #a9a69e;
  line-height: 1.4;
}

/* Footer — more substantial professional presence (Impeccable) */
.site-footer {
  background: #0a0a0a;
  color: #e0ded6; /* high-contrast light gray for dark background */
  padding: 3.25rem 0 1.5rem;
  font-size: 0.9rem;
}
.footer-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #e8e6de; /* slightly brighter for brand name */
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.footer-tagline {
  margin: 0;
  font-size: 0.95rem;
  max-width: 28ch;
  color: #d1cfc6; /* ensure sufficient contrast */
}
.footer-contact a {
  color: #d1cfc6;
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}
.footer-contact a:hover {
  color: #e8e6de;
}
.footer-meta {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: #d1cfc6; /* high contrast on dark footer */
}
.footer-bottom {
  max-width: var(--max);
  margin: 2.5rem auto 0;
  padding: 1rem var(--gutter) 0;
  border-top: 1px solid #222;
  font-size: 0.8rem;
  color: #d1cfc6; /* high contrast on dark footer */
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Buttons — high-craft professional states (Impeccable) */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  border: 1.5px solid var(--color-ink);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-decoration: none;
  min-height: 48px;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out),
    border-color 160ms var(--ease-out), transform 160ms var(--ease-out);
  cursor: pointer;
}
.button-primary {
  background: var(--color-ink);
  color: var(--color-paper);
  border-color: var(--color-ink);
}
.button-primary:hover {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-paper);
  transform: translateY(-1px);
}
.button-primary:active {
  transform: translateY(0);
}
.button-secondary {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-border);
}
.button-secondary:hover {
  background: var(--color-paper-2);
  border-color: var(--color-ink);
  color: var(--color-ink);
}

/* Global focus (excellent accessibility + craft) */
a:focus-visible,
button:focus-visible {
  outline: 2.5px solid var(--color-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Premium micro-interactions for text links */
.site-footer a {
  position: relative;
  transition: color 120ms var(--ease-out);
}
.site-footer a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 160ms var(--ease-out);
}
.site-footer a:hover::after {
  width: 100%;
}

/* Responsive */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-visual {
    order: 2;
    max-width: 260px;
    margin: 0 auto;
  }
  .contact-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .hero-actions {
    flex-direction: column;
    gap: 1rem; /* larger vertical gap when stacked for reliable tap target separation */
  }
  .hero-actions .button {
    width: 100%;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* Sticky masthead: keep anchored sections visible on in-page jumps */
[id] {
  scroll-margin-top: 5.5rem;
}

/* Respect users who prefer minimal motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
