/* ══════════════════════════════════════════════════════════════
   Clearay Exterior Care — shared stylesheet
   Used by index.html and booking.html.

   COLOUR RULE (from the brand handoff):
   --accent (#3127F5) is reserved for important, CLICKABLE things only.
   Never use it for body text, section backgrounds, or decoration.
   Its power is scarcity — keep it rare so it always reads "click here".
   ══════════════════════════════════════════════════════════════ */

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

:root {
  --accent:       #3127F5;
  --accent-dark:  #2419C9;

  --ink:          #16161A;   /* headings — near-black, not pure black */
  --body:         #3A3A40;   /* body copy — charcoal */
  --muted:        #6E6E76;
  --line:         #E7E7EA;
  --band:         #FAFAFB;   /* the one gentle tonal band */
  --white:        #FFFFFF;
  --error:        #C0322B;

  --display: 'Archivo', system-ui, -apple-system, sans-serif;
  --text:    'Public Sans', system-ui, -apple-system, sans-serif;

  --maxw: 1120px;
  --ease: 200ms cubic-bezier(.2,.7,.3,1);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--body);
  background: var(--white);
  -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.12;
  letter-spacing: -0.022em;
  font-weight: 800;
}

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

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0;
  font-weight: 700;
}
.skip:focus { left: 0; }

/* ══ Accent button — the one loud element ══ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 18px 34px;
  border: none; border-radius: 8px;
  cursor: pointer;
  line-height: 1.1;
  text-align: center;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  box-shadow: 0 2px 10px rgba(49,39,245,0.22);
}
.btn:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(49,39,245,0.28); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.btn svg { flex: none; }

/* Accent text link — key actions only */
.alink {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--accent);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.98rem;
  background: none; border: none; padding: 0; cursor: pointer;
  transition: gap var(--ease);
}
.alink:hover { gap: 12px; }
.alink svg { flex: none; transition: transform var(--ease); }

/* ══ Header ══ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }

.brand { display: flex; align-items: center; gap: 11px; flex: none; }
/* PLACEHOLDER: when the real logo lands in Images/, swap the .brand-mark span
   for <img src="Images/logo.png" alt="Clearay Exterior Care" /> */
.brand img { height: 38px; width: auto; }
/* Charcoal, not accent — a blue square up here would compete with the CTA and
   dilute the accent's scarcity. Goes away entirely once the real logo lands. */
.brand-mark { width: 34px; height: 34px; border-radius: 8px; flex: none; background: var(--ink); display: grid; place-items: center; }
.brand-name {
  font-family: var(--display); font-weight: 800; font-size: 1.06rem;
  color: var(--ink); letter-spacing: -0.02em; line-height: 1.15;
}
.brand-name span { display: block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted); }

.nav-links { display: flex; align-items: center; gap: 34px; list-style: none; }
.nav-links a {
  font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: var(--body);
  padding: 6px 0; position: relative; transition: color var(--ease);
}
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--ink); transition: width var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.nav-phone {
  display: inline-flex; align-items: center; gap: 9px; flex: none;
  font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--ink);
  white-space: nowrap;
}
.nav-phone svg { color: var(--accent); flex: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 10px; margin-right: -10px; }
.nav-toggle span { display: block; width: 24px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform var(--ease), opacity var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══ Hero ══ */
.hero { padding: 86px 0 92px; }
.hero-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); letter-spacing: -0.035em; line-height: 1.02; margin-bottom: 26px; }
.hero p.sub { font-size: 1.15rem; line-height: 1.65; color: var(--body); max-width: 34em; margin-bottom: 36px; }
.hero p.sub em { font-style: italic; color: var(--ink); }

.trust {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  margin-top: 26px; font-size: 0.9rem; color: var(--muted);
  font-family: var(--display); font-weight: 600; letter-spacing: 0.01em;
}
.trust li { list-style: none; display: inline-flex; align-items: center; gap: 7px; }
.trust svg { color: var(--ink); opacity: .55; flex: none; }

.hero-media { position: relative; }
.hero-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }

.tagline {
  font-family: var(--display); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 20px;
}

/* ══ Section shell ══ */
.section { padding: 88px 0; }
.section.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 40rem; margin-bottom: 52px; }
.eyebrow {
  display: block; font-family: var(--display); font-weight: 700;
  font-size: 0.76rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
}
.section-head h2 { font-size: clamp(1.85rem, 3.6vw, 2.6rem); }
.section-head p { margin-top: 16px; font-size: 1.08rem; color: var(--body); }

/* ══ Service cards ══ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 32px 28px 28px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.card:hover { border-color: #D4D4DA; box-shadow: 0 6px 26px rgba(22,22,26,0.06); }
.card .ico { color: var(--ink); margin-bottom: 20px; display: block; }
.card h3 { font-size: 1.28rem; margin-bottom: 10px; letter-spacing: -0.02em; }
.card > p { color: var(--body); font-size: 1rem; margin-bottom: 20px; }
.card.open { border-color: var(--ink); }

/* Expand-in-place detail — breaks out to the full row width so the copy
   gets a readable measure instead of a narrow one-third ribbon. */
.panel {
  grid-column: 1 / -1;
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 300ms cubic-bezier(.2,.7,.3,1);
}
.panel > div { overflow: hidden; visibility: hidden; transition: visibility 0s 300ms; }
.panel.open { grid-template-rows: 1fr; }
.panel.open > div { visibility: visible; transition-delay: 0s; }
.panel-inner {
  background: var(--white); border: 1px solid var(--ink); border-radius: 14px;
  padding: 32px 34px 34px;
  display: grid; grid-template-columns: 1fr 1.45fr; gap: 20px 44px; align-items: start;
}
.panel-lead {
  font-family: var(--display); font-weight: 700; font-size: 1.18rem;
  line-height: 1.35; letter-spacing: -0.018em; color: var(--ink);
}
.panel-body p { font-size: 1rem; color: var(--body); }
.panel-body .alink { margin-top: 20px; }
.toggle-ico { transition: transform var(--ease); }
.card.open .toggle-ico { transform: rotate(180deg); }

/* ══ Why it matters ══ */
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.reason h3 { font-size: 1.14rem; margin-bottom: 12px; letter-spacing: -0.015em; }
.reason p { font-size: 1rem; color: var(--body); }
.reason .rule { width: 34px; height: 3px; border-radius: 2px; background: var(--ink); opacity: .18; margin-bottom: 18px; }
.choose { margin-top: 48px; }

/* ══ Why us ══ */
.whyus { max-width: 46rem; }
.whyus p {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem); line-height: 1.5; color: var(--ink);
  font-family: var(--display); font-weight: 600; letter-spacing: -0.015em;
}

/* ══ Closing CTA ══ */
.closing { padding: 96px 0 104px; text-align: center; border-top: 1px solid var(--line); }
.closing h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); max-width: 18em; margin: 0 auto 30px; }

/* ══ Booking page ══ */
.booking { padding: 68px 0 92px; }
.booking-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 66px; align-items: start; }
.booking h1 { font-size: clamp(2.1rem, 4.6vw, 3.1rem); letter-spacing: -0.032em; margin-bottom: 20px; }
.booking .reassure { font-size: 1.13rem; color: var(--body); max-width: 30em; }

.assurances { list-style: none; margin-top: 34px; display: flex; flex-direction: column; gap: 15px; }
.assurances li { display: flex; align-items: flex-start; gap: 12px; font-size: 1rem; color: var(--body); }
.assurances svg { color: var(--ink); opacity: .5; flex: none; margin-top: 4px; }

.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 36px 34px 34px; }

.field { margin-bottom: 22px; }
.field label, .fieldset-label {
  display: block; font-family: var(--display); font-weight: 700; font-size: 0.9rem;
  color: var(--ink); margin-bottom: 9px; letter-spacing: -0.005em;
}
.field .hint { font-weight: 400; color: var(--muted); font-family: var(--text); }

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field textarea {
  width: 100%; padding: 14px 15px;
  font-family: var(--text); font-size: 1rem; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 9px;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.field textarea { min-height: 116px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #A6A6AE; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(22,22,26,0.07);
}

/* Service checkboxes */
.services-choice { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border: none; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 10px 8px;
  border: 1.5px solid var(--line); border-radius: 9px;
  font-family: var(--display); font-weight: 600; font-size: 0.94rem; color: var(--body);
  cursor: pointer; transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.choice span:hover { border-color: #C9C9D1; }
.choice input:checked + span { border-color: var(--ink); color: var(--ink); background: var(--band); }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.form-error { display: none; color: var(--error); font-size: 0.87rem; margin-top: 7px; }
.field.has-error input,
.field.has-error textarea { border-color: var(--error); }
.field.has-error .form-error { display: block; }

.form-submit { margin-top: 28px; }
.form-submit .btn { width: 100%; }
.form-foot { margin-top: 18px; font-size: 0.92rem; color: var(--muted); text-align: center; }

.form-success { display: none; text-align: center; padding: 34px 8px; }
/* Charcoal, not accent — this tick isn't clickable, so it must not read as "click here". */
.form-success .tick { width: 54px; height: 54px; margin: 0 auto 18px; color: var(--ink); }
.form-success h2 { font-size: 1.5rem; margin-bottom: 10px; }
.form-success p { color: var(--body); }

/* ══ Footer ══ */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; background: var(--band); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer .brand-name { font-size: 1.02rem; }
.footer-about { margin-top: 16px; font-size: 0.97rem; color: var(--muted); max-width: 28em; }
.footer-col h4 {
  font-family: var(--display); font-size: 0.78rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; font-size: 0.98rem; }
.footer-col a { color: var(--body); transition: color var(--ease); }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  font-size: 0.88rem; color: var(--muted);
}

/* ══ Responsive ══ */
@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-media { order: -1; }
  .hero-media img { aspect-ratio: 16 / 10; }
  .cards, .reasons { grid-template-columns: 1fr; }
  .reasons { gap: 34px; }
  /* Single column: pull each detail panel back up under its own card. */
  .c-1 { order: 1; } .p-1 { order: 2; }
  .c-2 { order: 3; } .p-2 { order: 4; }
  .c-3 { order: 5; } .p-3 { order: 6; }
  .panel-inner { grid-template-columns: 1fr; gap: 16px; padding: 26px 24px 28px; }
  .booking-grid { grid-template-columns: 1fr; gap: 42px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height 260ms ease;
    box-shadow: 0 12px 28px rgba(22,22,26,.07);
  }
  .nav-links.open { max-height: 320px; }
  .nav-links a { display: block; padding: 17px 22px; border-top: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .nav-phone span { display: none; }   /* icon-only tap target on small screens */

  .hero { padding: 56px 0 64px; }
  .section { padding: 62px 0; }
  .closing { padding: 68px 0 76px; }
  .booking { padding: 48px 0 68px; }
  .btn { width: 100%; }
  .form-card { padding: 28px 22px 26px; }
  .services-choice { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
}
