/* CrewCam Roofing — bright, friendly, transparency-focused ("watch us work") theme */

:root {
  --ink: #1c2b33;
  --sky: #2f8fc4;
  --sky-dark: #23719d;
  --orange: #ff8f1f;
  --yellow: #ffd23f;
  --white: #ffffff;
  --cream: #fef9f0;
  --line: #ece2cd;
  --muted: #5c6873;
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
}

h1, h2, h3 { font-family: 'Fredoka', 'Nunito', sans-serif; font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; }

a { color: inherit; }
.eyebrow { display: block; color: var(--sky-dark); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85rem; margin-bottom: 0.4rem; }
.section-sub { color: var(--muted); max-width: 520px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem; border-radius: 999px; background: var(--orange); color: #fff;
  text-decoration: none; font-weight: 700; border: none; cursor: pointer; font-size: 1rem;
  box-shadow: 0 8px 20px -8px rgba(255,143,31,0.6); transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { background: #e87d10; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border: 2px solid var(--ink); box-shadow: none; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-sky { background: var(--sky); box-shadow: 0 8px 20px -8px rgba(47,143,196,0.6); }
.btn-sky:hover { background: var(--sky-dark); }
.btn-lg { padding: 1.05rem 2.25rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header { background: #fff; border-bottom: 3px solid var(--yellow); position: sticky; top: 0; z-index: 50; }
.header-inner { max-width: 1180px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.logo-text { font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.3rem; color: var(--ink); }
.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.92rem; }
.main-nav a:hover { color: var(--sky-dark); }
.header-actions { display: flex; align-items: center; gap: 1.25rem; }
.phone-link { display: flex; align-items: center; gap: 0.5rem; color: var(--ink); text-decoration: none; font-weight: 700; }

.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: 3px; width: 100%; background: var(--ink); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { padding: 4.5rem 0 3rem; position: relative; overflow: hidden; }
.hero-inner { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.pill-tag { display: inline-block; background: var(--yellow); color: var(--ink); font-weight: 700; padding: 0.4rem 1rem; border-radius: 999px; font-size: 0.9rem; }
.hero h1 { font-size: 2.9rem; margin-top: 1rem; }
.hero h1 .hl { color: var(--sky); }
.hero-sub { color: var(--muted); font-size: 1.1rem; margin-top: 1rem; max-width: 460px; }
.hero-ctas { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-photo-wrap { position: relative; }
.hero-photo { width: 100%; border-radius: var(--radius); box-shadow: 0 24px 50px -16px rgba(28,43,51,0.3); display: block; }
.hero-sticker {
  position: absolute; bottom: -18px; right: -18px; width: 92px; height: 92px; border-radius: 50%;
  background: var(--sky); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 0.8rem; border: 3px solid #fff;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,0.35); text-align: center; line-height: 1.15;
  animation: obtStickerPop 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.4s both;
}
@keyframes obtStickerPop { from { transform: scale(0.4) rotate(-15deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }

/* floating polaroid decorations */
.polaroid {
  position: absolute; width: 88px; background: #fff; padding: 7px 7px 20px; border-radius: 8px;
  box-shadow: 0 14px 30px -10px rgba(28,43,51,0.35); z-index: 3;
  transform: rotate(var(--rot, -8deg));
  animation: obtPolaroidFloat 5.5s ease-in-out infinite;
}
.polaroid .swatch { width: 100%; height: 62px; border-radius: 4px; display: block; }
.polaroid .caption { display: block; text-align: center; font-family: 'Fredoka', sans-serif; font-size: 0.62rem; margin-top: 5px; color: var(--ink); }
@keyframes obtPolaroidFloat {
  0%, 100% { transform: rotate(var(--rot, -8deg)) translateY(0); }
  50% { transform: rotate(var(--rot, -8deg)) translateY(-10px); }
}

/* ---------- how it works ---------- */
.how { background: #fff; padding: 5rem 0; }
.section-inner { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.section-title { font-size: 2rem; text-align: center; }
.how-steps { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-top: 2.75rem; flex-wrap: wrap; }
.how-step { flex: 1; min-width: 220px; text-align: center; background: var(--cream); border-radius: var(--radius); padding: 2rem 1.5rem; }
.how-badge {
  width: 3rem; height: 3rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: 'Fredoka', sans-serif; font-weight: 600; font-size: 1.3rem; color: #fff; margin: 0 auto 1rem;
}
.how-badge-sky { background: var(--sky); }
.how-badge-orange { background: var(--orange); }
.how-badge-yellow { background: var(--yellow); color: var(--ink); }
.how-arrow { color: var(--line); flex-shrink: 0; }
.how-step p { color: var(--muted); font-size: 0.94rem; margin: 0; }

/* ---------- services ---------- */
.services { padding: 5rem 0; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.75rem; }
.service-tile { border-radius: var(--radius); padding: 1.75rem; background: #fff; border: 2px solid var(--line); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.service-tile:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -14px rgba(28,43,51,0.25); }
.tile-sky { border-color: var(--sky); }
.tile-orange { border-color: var(--orange); }
.tile-yellow { border-color: var(--yellow); }
.tile-icon { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.tile-sky .tile-icon { background: var(--sky); }
.tile-orange .tile-icon { background: var(--orange); }
.tile-yellow .tile-icon { background: var(--yellow); }
.service-tile:hover .tile-icon { animation: obtIconWiggle 0.5s ease; }
@keyframes obtIconWiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-12deg) scale(1.08); }
  75% { transform: rotate(12deg) scale(1.08); }
}
.service-tile h3 { font-size: 1.1rem; }
.service-tile p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ---------- transparency features ---------- */
.transparency { background: var(--sky); color: #fff; padding: 5rem 0; }
.transparency .section-title { color: #fff; }
.transparency .section-sub { color: rgba(255,255,255,0.85); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 2.75rem; }
.feature-card { background: rgba(255,255,255,0.12); border-radius: var(--radius); padding: 1.5rem; text-align: center; }
.feature-card svg { margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 1rem; color: #fff; }
.feature-card p { color: rgba(255,255,255,0.85); font-size: 0.88rem; margin: 0; }

/* ---------- gallery ---------- */
.gallery { padding: 5rem 0; background: #fff; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-top: 2.75rem; }
.gallery-item { border-radius: var(--radius); overflow: hidden; }
.gallery-item img { width: 100%; height: 220px; object-fit: cover; display: block; }
.gallery-item figcaption { padding: 0.75rem 0.9rem; background: var(--cream); font-weight: 700; font-size: 0.85rem; }

/* ---------- quote ---------- */
.quote { padding: 5rem 0; }
.quote-form { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 2rem; max-width: 640px; margin: 2.75rem auto 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.form-field { margin-bottom: 0; }
label { display: block; font-weight: 700; margin-bottom: 0.4rem; font-size: 0.9rem; }
input[type=text], input[type=tel], input[type=email], select, textarea {
  width: 100%; padding: 0.7rem 0.85rem; border: 2px solid var(--line); border-radius: 10px;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky); }
.checkbox-legend { display: block; font-weight: 700; margin-bottom: 0.5rem; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.checkbox-pill { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; font-size: 0.9rem; background: var(--cream); border-radius: 999px; padding: 0.5rem 0.9rem; }

/* ---------- find us ---------- */
.find-us { background: #fff; border-top: 1px solid var(--line); padding: 4rem 0; }
.find-us-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.text-link { color: var(--sky-dark); text-decoration: none; font-weight: 700; }
.map-wrap { border-radius: var(--radius); overflow: hidden; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 3rem 0 1.5rem; text-align: center; }
.footer-inner { max-width: 700px; margin: 0 auto; }
.footer-inner .logo { justify-content: center; margin-bottom: 0.75rem; }
.footer-inner .logo-text { color: #fff; }
.footer-tag { margin-bottom: 1rem; }
.footer-nav { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.footer-nav a { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer-nav a:hover { color: #fff; }
.footer-fine { font-size: 0.85rem; }

/* ---------- responsive ---------- */
.nav-close { display: none; }
.nav-backdrop { display: none; }
@media (max-width: 900px) {
  .hero-inner, .find-us-inner { grid-template-columns: 1fr; }
  .services-grid, .gallery-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .hamburger { display: flex; }

  /* Header row on mobile has to fit logo + phone + CTA + hamburger — trim it down */
  .header-actions { gap: 0.6rem; }
  .phone-link span { display: none; }
  .header-actions .btn { padding: 0.6rem 1.1rem; font-size: 0.88rem; }

  .main-nav.open {
    display: flex; position: fixed; top: 0; right: 0; height: 100vh; width: 78%; max-width: 320px;
    background: #fff; flex-direction: column; align-items: flex-start; padding: 5rem 2rem 2rem; gap: 1.25rem; z-index: 70;
  }

  .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(--cream); border: none; color: var(--ink);
    font-size: 1.5rem; line-height: 1; cursor: pointer;
  }
  .nav-close:hover { background: var(--line); }

  .nav-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(28,43,51,0.5);
    z-index: 65; opacity: 0; visibility: hidden; transition: opacity 0.25s ease;
  }
  .nav-backdrop.open { opacity: 1; visibility: visible; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 2.1rem; }
  .services-grid, .gallery-grid, .feature-grid { grid-template-columns: 1fr; }
  .form-row, .checkbox-grid { grid-template-columns: 1fr; }
  .logo-text { font-size: 1.1rem; }
}
@media (max-width: 480px) {
  /* Smallest phones: logo + phone icon + hamburger only, drop the CTA button to avoid crowding */
  .header-actions .btn { display: none; }
}
@media (max-width: 900px) {
  .polaroid { display: none; }
}

/* ---------- bouncy scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px) scale(0.96); }
.reveal.is-visible {
  animation: obtBounceReveal 0.65s cubic-bezier(0.34,1.56,0.64,1) forwards;
  animation-delay: var(--reveal-delay, 0s);
}
@keyframes obtBounceReveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-sticker { animation: none; }
  .polaroid { animation: none; }
  .service-tile:hover .tile-icon { animation: none; }
  .reveal { opacity: 1; transform: none; }
}

/* Editor mode: keep the sticky header (and mobile nav drawer) clear of the fixed toolbar above it. */
body.is-editable .site-header { top: 44px; }
body.is-editable .main-nav.open { top: 44px; }
body.is-editable .service-tile { position: relative; padding-top: 2.5rem; }
body.is-editable .obt-service-toggle { position: absolute; top: 0.85rem; right: 0.85rem; z-index: 2; }
