/* Strata Roofing — free abstract/agency-style theme */

:root {
  --ink: #17181b;
  --amber: #ff7a1a;
  --amber-dark: #d96400;
  --steel: #4a5560;
  --paper: #f4f2ee;
  --card: #ffffff;
  --line: #e3e1db;
  --muted: #63636a;
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}

h1, h2, h3 { font-family: 'Syne', 'Inter', sans-serif; font-weight: 700; line-height: 1.05; margin: 0 0 0.5em; letter-spacing: -0.01em; }

a { color: inherit; }
.section-inner { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.center-head { text-align: center; max-width: 640px; margin: 0 auto 3rem; }
.eyebrow { display: block; color: var(--amber); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.78rem; margin-bottom: 0.75rem; }
.section-title { font-size: 2.6rem; }
.section-sub { color: var(--muted); margin-top: 0.75rem; font-size: 1.02rem; }

/* ---------- custom cursor ---------- */
.cursor-dot, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor-dot { width: 8px; height: 8px; background: var(--amber); transition: opacity 0.2s ease; }
.cursor-ring { width: 38px; height: 38px; border: 1.5px solid var(--amber); transition: transform 0.15s ease, opacity 0.2s ease, width 0.2s ease, height 0.2s ease; opacity: 0.6; }
.cursor-ring.grow { width: 60px; height: 60px; opacity: 0.9; background: rgba(255,122,26,0.1); }
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
  .reveal, .reveal-up, .hero h1 .word, .work-item img { opacity: 1 !important; transform: none !important; animation: none !important; clip-path: none !important; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.9rem 2rem; border-radius: 999px; background: var(--ink); color: #fff;
  text-decoration: none; font-weight: 700; border: none; cursor: pointer; font-size: 0.96rem;
  transition: background 0.15s ease, transform 0.2s ease;
}
.btn:hover { background: var(--amber-dark); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-lg { padding: 1.1rem 2.4rem; font-size: 1.02rem; }
.btn-full { width: 100%; }
.magnetic { position: relative; will-change: transform; }

/* ---------- header ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 1.25rem 0; transition: background 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease; }
.site-header.is-scrolled { background: rgba(244,242,238,0.92); backdrop-filter: blur(10px); padding: 0.85rem 0; box-shadow: 0 8px 30px -18px rgba(23,24,27,0.3); }
.header-inner { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.logo-mark { width: 14px; height: 14px; border-radius: 3px; background: var(--amber); transform: rotate(45deg); }
.logo-text { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.main-nav { display: flex; align-items: center; gap: 2.25rem; }
.main-nav ul { list-style: none; display: flex; gap: 1.85rem; margin: 0; padding: 0; }
.main-nav ul a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.main-nav ul a:hover { color: var(--amber); }
.nav-cta-row { display: flex; align-items: center; gap: 1.5rem; }
.phone-link { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.9rem; }

.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; background: none; border: none; cursor: pointer; padding: 0; }
.hamburger span { display: block; height: 2px; width: 100%; background: var(--ink); transition: transform 0.2s ease, opacity 0.2s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 9rem 0 4rem; overflow: hidden; }
.hero-inner { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 2; }
.hero .eyebrow { opacity: 0; }
.hero h1 { font-size: clamp(2.8rem, 8vw, 5.5rem); max-width: 900px; }
.hero h1 .word { display: inline-block; opacity: 0; transform: translateY(100%) rotate(3deg); animation: obtWordIn 0.7s cubic-bezier(0.22,1,0.36,1) forwards; }
@keyframes obtWordIn { to { opacity: 1; transform: translateY(0) rotate(0); } }
.hero-sub { font-size: 1.1rem; color: var(--muted); max-width: 480px; margin-top: 1.5rem; opacity: 0; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2.25rem; flex-wrap: wrap; opacity: 0; }
.reveal-up { animation: obtRevealUp 0.7s ease forwards; animation-delay: var(--d, 0s); }
@keyframes obtRevealUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* scroll-triggered reveal (below-the-fold content — IntersectionObserver adds is-visible) */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.is-visible { animation: obtReveal 0.6s ease forwards; animation-delay: var(--reveal-delay, 0s); }
@keyframes obtReveal { to { opacity: 1; transform: none; } }

.hero-media { position: relative; z-index: 1; margin: 3.5rem -1.5rem -4rem; border-radius: 28px 28px 0 0; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(23,24,27,0.4); }
.hero-media img { width: 100%; display: block; height: 56vw; max-height: 560px; object-fit: cover; }

.blob { position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.5; z-index: 0; pointer-events: none; }
.blob-1 { width: 420px; height: 420px; background: radial-gradient(circle, var(--amber), transparent 70%); top: -120px; right: -100px; }
.blob-2 { width: 320px; height: 320px; background: radial-gradient(circle, var(--steel), transparent 70%); bottom: 40px; left: -80px; opacity: 0.35; }
.grain { position: absolute; inset: 0; pointer-events: none; opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- marquee ---------- */
.marquee { background: var(--ink); color: var(--paper); padding: 1rem 0; overflow: hidden; white-space: nowrap; position: relative; z-index: 3; }
.marquee-track { display: inline-flex; gap: 2rem; animation: obtMarquee 22s linear infinite; }
.marquee-track span { font-family: 'Syne', sans-serif; font-size: 0.9rem; font-weight: 600; letter-spacing: 0.04em; color: var(--amber); }
.marquee-track span:nth-child(odd) { color: var(--paper); }
@keyframes obtMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- services (sticky + list) ---------- */
.services { padding: 6.5rem 0; }
.services-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 3rem; }
.services-sticky { align-self: start; position: sticky; top: 7rem; }
.services-list { display: flex; flex-direction: column; }
.service-row { display: flex; gap: 1.5rem; padding: 1.75rem 0; border-bottom: 1px solid var(--line); align-items: baseline; transition: padding-left 0.25s ease; }
.service-row:hover { padding-left: 0.75rem; }
.service-index { font-family: 'Syne', sans-serif; color: var(--amber); font-size: 0.95rem; flex-shrink: 0; width: 2.25rem; }
.service-row h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.service-row p { color: var(--muted); font-size: 0.92rem; margin: 0; max-width: 480px; }

/* ---------- stats ---------- */
.stats { background: var(--ink); color: #fff; padding: 5rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: center; }
.stat-number { display: block; font-family: 'Syne', sans-serif; font-size: 3.2rem; font-weight: 700; color: var(--amber); }
.stat-label { color: rgba(255,255,255,0.65); font-size: 0.9rem; }

/* ---------- work / clip-reveal gallery ---------- */
.work { padding: 6.5rem 0; }
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.work-item { margin: 0; border-radius: var(--radius); overflow: hidden; }
.work-item img { width: 100%; height: 340px; object-fit: cover; display: block; transition: transform 0.6s ease, clip-path 0.9s cubic-bezier(0.22,1,0.36,1); clip-path: inset(0 0 100% 0); }
.work-item.is-revealed img { clip-path: inset(0 0 0 0); }
.work-item:hover img { transform: scale(1.06); }

/* ---------- quote ---------- */
.quote { padding: 6.5rem 0; }
.quote-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.quote-sub { color: var(--muted); }
.quote-contact-cards { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1.5rem; }
.contact-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.85rem 1.05rem; text-decoration: none; color: var(--ink); font-weight: 700; }
.map-frame { margin-top: 1.5rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }

.quote-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.form-row { margin-bottom: 1.25rem; }
.form-row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: block; font-weight: 700; margin-bottom: 0.4rem; font-size: 0.88rem; }
input[type=text], input[type=tel], input[type=email], select, textarea {
  width: 100%; padding: 0.7rem 0.85rem; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--amber); }
fieldset { border: none; padding: 0; margin: 0; }
legend { font-weight: 700; margin-bottom: 0.5rem; padding: 0; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.checkbox-item { font-weight: 400; display: flex; align-items: center; gap: 0.5rem; font-size: 0.92rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.7); padding-top: 0; }
.marquee-footer { background: transparent; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; padding: 3.5rem 1.5rem 2rem; border-bottom: 1px solid rgba(255,255,255,0.12); }
.footer-brand .logo-text { color: #fff; }
.footer-col h4 { color: #fff; font-family: 'Syne', sans-serif; font-size: 0.95rem; margin-bottom: 0.75rem; }
.footer-col p { margin: 0 0 0.5rem; }
.footer-col a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-col a:hover { color: var(--amber); }
.footer-bottom { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.5rem; font-size: 0.85rem; text-align: center; }

/* ---------- responsive ---------- */
.nav-close { display: none; }
.nav-backdrop { display: none; }
@media (max-width: 900px) {
  .services-layout, .quote-inner { grid-template-columns: 1fr; }
  .services-sticky { position: static; margin-bottom: 2rem; }
  .work-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .main-nav ul, .nav-cta-row .phone-link { display: none; }
  .hamburger { display: flex; }
  .main-nav {
    position: fixed; top: 0; right: -100%; height: 100vh; width: 78%; max-width: 320px;
    background: var(--paper); flex-direction: column; align-items: flex-start; padding: 5rem 2rem 2rem;
    transition: right 0.25s ease; z-index: 170; overflow-y: auto;
  }
  .main-nav.open { right: 0; }
  .main-nav.open ul { display: flex; flex-direction: column; gap: 1.25rem; }

  .nav-close {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 1.25rem; right: 1.25rem;
    width: 2.25rem; height: 2.25rem; border-radius: 50%;
    background: var(--line); border: none; color: var(--ink);
    font-size: 1.5rem; line-height: 1; cursor: pointer;
  }
  .nav-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(23,24,27,0.5);
    z-index: 165; opacity: 0; visibility: hidden; transition: opacity 0.25s ease;
  }
  .nav-backdrop.open { opacity: 1; visibility: visible; }
}
@media (max-width: 600px) {
  .hero { padding: 7.5rem 0 3rem; }
  .hero-media { margin: 2.5rem -1.5rem -3rem; }
  .hero-media img { height: 60vw; }
  .form-row--split, .checkbox-grid { grid-template-columns: 1fr; }
}

/* Editor mode: keep the fixed header and mobile nav drawer clear of the fixed toolbar. */
body.is-editable .site-header { top: 44px; }
body.is-editable .main-nav.open { top: 44px; }
body.is-editable .service-row { position: relative; padding-right: 5.5rem; }
body.is-editable .obt-service-toggle { position: absolute; top: 50%; right: 1rem; transform: translateY(-50%); }
