/* ============================================================
   JN ROOFING CONTRACTORS — Shared styles
   Design system: deep slate/charcoal + confident brick red + white
   Type: Archivo (display) · Hanken Grotesk (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;700;800;900&family=Hanken+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* Palette */
  --ink:        #131417;
  --slate-900:  #1A2128;
  --slate-800:  #232C34;
  --slate-700:  #36414B;
  --slate-500:  #5C6772;
  --slate-400:  #8B949D;
  --slate-300:  #B9C0C7;
  --line:       #E5E8EB;
  --line-soft:  #EEF0F2;
  --paper:      #F7F8F9;
  --white:      #FFFFFF;

  --accent:       #F4CE3A;   /* brand yellow */
  --accent-dark:  #E6BC28;   /* deeper gold (hover) */
  --accent-soft:  #FCF4D6;   /* pale yellow tint */
  --accent-ink:   #1A1710;   /* text/icons that sit ON yellow */
  --blue:         #A6C5E0;   /* logo window blue (secondary) */
  --error:        #D64545;   /* form validation only */
  --error-soft:   #FBE9E9;

  /* Type */
  --display: 'Archivo', system-ui, sans-serif;
  --body:    'Hanken Grotesk', system-ui, sans-serif;

  /* Spacing / shape */
  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(20,25,31,.06), 0 2px 8px rgba(20,25,31,.05);
  --shadow:    0 4px 14px rgba(20,25,31,.08), 0 12px 32px rgba(20,25,31,.07);
  --shadow-lg: 0 18px 50px rgba(20,25,31,.16);
  --container: 1200px;
  --nav-h: 78px;

  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--slate-800);
  background: var(--white);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 28px; }

.section { padding: 104px 0; }
.section--tight { padding: 72px 0; }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink); color: var(--slate-300); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--accent); display: inline-block;
}
.section--ink .eyebrow { color: var(--accent); }

.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head h2 {
  font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem);
  font-weight: 800;
}
.section-head p {
  margin-top: 20px; font-size: 1.18rem; color: var(--slate-500); line-height: 1.6;
}
.section--ink .section-head h2 { color: #fff; }
.section--ink .section-head p { color: var(--slate-300); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--accent); --fg: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: .01em;
  background: var(--bg); color: var(--fg);
  border: none; cursor: pointer;
  padding: 16px 28px; border-radius: 999px;
  transition: transform .25s var(--ease), background .2s var(--ease), box-shadow .25s var(--ease);
  box-shadow: 0 8px 22px rgba(230,188,40,.34);
  white-space: nowrap;
}
.btn:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(230,188,40,.42); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  --bg: transparent; --fg: var(--ink);
  border: 1.5px solid var(--line); box-shadow: none;
}
.btn--ghost:hover { --bg: var(--ink); --fg: #fff; background: var(--ink); border-color: var(--ink); box-shadow: var(--shadow); }

.btn--light {
  --bg: #fff; --fg: var(--ink); box-shadow: var(--shadow-sm);
}
.btn--light:hover { background: var(--paper); }

.btn--on-dark-ghost {
  --bg: transparent; --fg: #fff; border: 1.5px solid rgba(255,255,255,.32); box-shadow: none;
}
.btn--on-dark-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); transform: translateY(-2px); }

.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   NAVBAR
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

/* transparent over hero */
.nav--transparent { background: linear-gradient(to bottom, rgba(20,25,31,.55), rgba(20,25,31,0)); }
.nav--transparent .nav-link, .nav--transparent .brand-name { color: #fff; }
.nav--transparent .brand-sub { color: rgba(255,255,255,.7); }
.nav--transparent .nav-toggle span { background: #fff; }

/* scrolled / solid */
.nav--solid { background: rgba(255,255,255,.92); backdrop-filter: blur(12px); box-shadow: var(--shadow-sm); border-color: var(--line); }

.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark {
  width: 42px; height: 42px; flex: none; position: relative;
  display: grid; place-items: center;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-logo {
  height: 48px; width: auto; flex: none; display: block;
  background: #000; border-radius: 11px; padding: 4px 8px;
  box-shadow: 0 2px 10px rgba(20,25,31,.12);
}
.nav--transparent .brand-logo { box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.footer .brand-logo { height: 56px; border-radius: 13px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--display); font-weight: 900; font-size: 1.18rem; letter-spacing: -.01em; color: var(--ink);
}
.brand-name b { color: inherit; }
.brand-sub {
  font-family: var(--display); font-weight: 600; font-size: .62rem; letter-spacing: .28em;
  text-transform: uppercase; color: var(--slate-400); margin-top: 3px;
}

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  font-family: var(--display); font-weight: 600; font-size: .98rem; color: var(--slate-700);
  padding: 9px 15px; border-radius: 999px; position: relative;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-link:hover { color: var(--ink); background: rgba(20,25,31,.05); }
.nav--transparent .nav-link:hover { background: rgba(255,255,255,.14); color: #fff; }
.nav-link.is-active { color: var(--ink); }
.nav--transparent .nav-link.is-active { color: #fff; }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 15px; right: 15px; bottom: 2px; height: 3px;
  background: var(--accent); border-radius: 2px;
}
.nav--transparent .nav-link.is-active::after { background: #fff; }

.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-phone {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-weight: 700; font-size: .98rem; color: var(--ink);
}
.nav--transparent .nav-phone { color: #fff; }
.nav-phone svg { width: 17px; height: 17px; color: var(--ink); }
.nav--transparent .nav-phone svg { color: #fff; }
.nav .btn { padding: 12px 22px; }

/* hamburger */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer;
  padding: 8px; margin: -8px; z-index: 120;
}
.nav-toggle span { width: 26px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .3s var(--ease), opacity .2s var(--ease); }
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); background: #fff; }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); background: #fff; }

/* mobile drawer */
.mobile-menu {
  position: fixed; inset: 0; z-index: 110; background: var(--ink);
  display: flex; flex-direction: column; justify-content: center; gap: 6px;
  padding: 0 32px;
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a.m-link {
  font-family: var(--display); font-weight: 800; font-size: 2.2rem; color: #fff;
  padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); letter-spacing: -.02em;
  display: flex; align-items: center; justify-content: space-between;
}
.mobile-menu a.m-link .num { font-size: .9rem; color: var(--slate-500); font-weight: 600; }
.mobile-menu .m-foot { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.mobile-menu .m-foot .btn { width: 100%; padding: 18px; font-size: 1.1rem; }
.mobile-menu .m-contact { color: var(--slate-300); font-weight: 600; }
.mobile-menu .m-contact a { color: #fff; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--ink); color: var(--slate-300); padding: 80px 0 32px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 48px;
  padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer .brand-name { color: #fff; }
.footer .brand-sub { color: var(--slate-500); }
.footer-about { color: var(--slate-400); font-size: 1rem; margin-top: 22px; max-width: 34ch; }
.footer h4 {
  font-family: var(--display); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
  color: #fff; margin-bottom: 22px; font-weight: 700;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.footer-col a { color: var(--slate-300); font-size: 1rem; transition: color .2s; }
.footer-col a:hover { color: var(--accent); }
.footer-contact-item { display: flex; gap: 12px; margin-bottom: 18px; align-items: flex-start; }
.footer-contact-item svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 3px; }
.footer-contact-item .label { font-size: .78rem; color: var(--slate-500); text-transform: uppercase; letter-spacing: .1em; font-family: var(--display); font-weight: 600; }
.footer-contact-item a, .footer-contact-item span { color: #fff; font-weight: 600; }
.footer-contact-item a:hover { color: var(--accent); }
.socials { display: flex; gap: 12px; margin-top: 6px; }
.social-btn {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(255,255,255,.07); color: #fff; transition: background .2s var(--ease), transform .2s var(--ease);
}
.social-btn:hover { background: var(--accent); color: var(--accent-ink); transform: translateY(-3px); }
.social-btn svg { width: 20px; height: 20px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding-top: 28px; flex-wrap: wrap;
}
.footer-bottom p { color: var(--slate-500); font-size: .92rem; }
.footer-bottom .prompt { color: var(--slate-300); }
.footer-bottom .prompt a { color: var(--accent); font-weight: 700; }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 980px) {
  .nav-links, .nav-phone { display: none; }
  .nav-toggle { display: flex; }
  .nav .btn { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .section { padding: 76px 0; }
}
@media (max-width: 620px) {
  body { font-size: 17px; }
  .container { padding-inline: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .mobile-menu a.m-link { font-size: 1.8rem; }
}
