/* ── Google Fonts: Nunito Sans + Pinyon Script (accent) ───────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700;800&family=Pacifico&family=Inter:wght@300;400;500&display=swap');

/* ── Self-hosted Playfair Display fallback (legacy, kept for safety) ──────── */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/playfair-display-700-normal.woff2') format('woff2');
}

/* ══════════════════════════════════════════════════════════════════════════════
   DESIGN SYSTEM — "Ignite & Clean"  (generated by Google Labs Stitch)
   Dark theme  = :root  (default)
   Light theme = body.theme-light overrides
   ══════════════════════════════════════════════════════════════════════════════ */
:root {
  /* ── Palette: dark ─────────────────────────────────────────────────────── */
  --bg:               #0f0f0f;
  --surface:          rgba(255, 255, 255, 0.12);  /* clear, milky white tint */
  --surface-border:   rgba(255, 255, 255, 0.35);  /* brighter white edge */
  --text-main:        #fadcd4;
  --text-muted:       rgba(250, 220, 212, 0.55);
  --accent:           #FF5722;          /* Fiery Orange   */
  --accent-2:         #FFA726;          /* Amber          */
  --accent-gradient:  linear-gradient(135deg, #FF7043 0%, #F4511E 100%);
  --btn-text:         #000000;

  /* ── Typography ────────────────────────────────────────────────────────── */
  --font-sans:    'Nunito Sans', sans-serif;
  --font-display: 'Pacifico', cursive;
  --font-script:  'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* ── Radii ─────────────────────────────────────────────────────────────── */
  --radius-sm:   0.5rem;
  --radius-md:   1rem;   /* Reduced radius */
  --radius-full: 9999px;

  /* ── Backdrop blur ─────────────────────────────────────────────────────── */
  --blur: 6px;
}

/* ── Light theme overrides ─────────────────────────────────────────────────── */
body.theme-light {
  --bg:               #f8f8f8;
  --surface:          rgba(255, 255, 255, 0.26);  /* more opaque white glass */
  --surface-border:   rgba(255, 255, 255, 0.85);  /* bright white reflective edge */
  --text-main:        #000000;
  --text-muted:       rgba(0, 0, 0, 0.65);
  --accent:           #E64A19;
  --accent-2:         #FF8F00;
  --accent-gradient:  linear-gradient(135deg, #E64A19 0%, #FF8F00 100%);
  --btn-text:         #ffffff;
  --blur: 4px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

/* ══════════════════════════════════════════════════════════════════════════════
   FULL-BLEED BACKGROUND (photo will be set via JS / inline style when uploaded)
   ══════════════════════════════════════════════════════════════════════════════ */
.hero-bg {
  position: fixed;
  inset: 0;
  background: var(--bg);
  background-size: cover;
  background-position: center;
  z-index: -2;
  transition: background 0.4s ease;
}

/* Dark theme: grill-dark.webp */
body:not(.theme-light) .hero-bg {
  background-image:
    linear-gradient(rgba(0,0,0,0.30), rgba(0,0,0,0.22)),
    url('assets/grill-dark.webp');
}

/* Light theme: grill-light.webp */
body.theme-light .hero-bg {
  background-image:
    linear-gradient(rgba(248,248,248,0.15), rgba(248,248,248,0.05)),
    url('assets/grill-light.webp');
  background-position: left center;
}

/* ══════════════════════════════════════════════════════════════════════════════
   WEBGL SMOKE CANVAS  (preserved — sits between bg and content)
   ══════════════════════════════════════════════════════════════════════════════ */
#smoke-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 1.0;
  filter: blur(2px) contrast(1.05);
  z-index: -1;
}

body.theme-light #smoke-canvas {
  mix-blend-mode: normal;
}

/* ══════════════════════════════════════════════════════════════════════════════
   THEME TOGGLE — Apple liquid glass segmented pill, top-right
   ══════════════════════════════════════════════════════════════════════════════ */
#themeToggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  display: flex;
  align-items: center;
  padding: 4px;
  gap: 0;
  border-radius: 9999px;
  /* Liquid glass pill */
  background:
    radial-gradient(ellipse at 40% 25%, rgba(255,255,255,0.42) 0%, transparent 65%),
    rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.50),
    inset 0 -1px 1px rgba(0,0,0,0.06),
    0 8px 32px rgba(0,0,0,0.20),
    0 2px 8px rgba(0,0,0,0.12);
  user-select: none;
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* Sliding indicator — the frosted "selected" bubble */
#themeToggle .toggle-indicator {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.70) 0%, transparent 60%),
    rgba(255, 255, 255, 0.30);
  box-shadow:
    inset 0 1px 2px rgba(255,255,255,0.80),
    0 2px 8px rgba(0,0,0,0.14);
  border: 1px solid rgba(255,255,255,0.50);
  /* Default: dark mode → indicator on the right (moon side) */
  left: 4px;
  transform: translateX(24px);
  transition: transform 0.32s cubic-bezier(0.34, 1.38, 0.64, 1);
  pointer-events: none;
}

/* Light mode → indicator slides to the left (sun side) */
body.theme-light #themeToggle .toggle-indicator {
  transform: translateX(0px);
}

/* Icon buttons inside the pill */
.toggle-opt {
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.25s ease;
}

/* Dark mode: sun = outline (inactive), moon = filled (active) */
/* Sun button */
#toggleLight .t-filled  { display: none;  }
#toggleLight .t-outline { display: block; color: rgba(255,255,255,0.55); }
/* Moon button */
#toggleDark  .t-filled  { display: block; color: rgba(255,255,255,0.92); }
#toggleDark  .t-outline { display: none;  }

/* Light mode: sun = filled (active), moon = outline (inactive) */
body.theme-light #toggleLight .t-filled  { display: block; color: rgba(20,20,20,0.88); }
body.theme-light #toggleLight .t-outline { display: none;  }
body.theme-light #toggleDark  .t-filled  { display: none;  }
body.theme-light #toggleDark  .t-outline { display: block; color: rgba(20,20,20,0.45); }

/* Light mode: darken the outer pill */
body.theme-light #themeToggle {
  background:
    radial-gradient(ellipse at 40% 25%, rgba(255,255,255,0.65) 0%, transparent 65%),
    rgba(210, 210, 210, 0.22);
  border-color: rgba(0,0,0,0.11);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.75),
    inset 0 -1px 1px rgba(0,0,0,0.04),
    0 8px 32px rgba(0,0,0,0.08),
    0 2px 8px rgba(0,0,0,0.06);
}

body.theme-light #themeToggle .toggle-indicator {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.90) 0%, transparent 60%),
    rgba(255,255,255,0.55);
  border-color: rgba(255,255,255,0.70);
}

/* ══════════════════════════════════════════════════════════════════════════════
   PAGE WRAPPER
   ══════════════════════════════════════════════════════════════════════════════ */
.page-wrapper {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  padding: 5rem 4rem 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

/* ══════════════════════════════════════════════════════════════════════════════
   HERO / HEADER  (left column)
   ══════════════════════════════════════════════════════════════════════════════ */
.header {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 580px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 400; /* Pacifico is single-weight, no bold needed */
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--text-main);
  margin-bottom: 1.25rem;
  transition: color 0.4s ease, text-shadow 0.4s ease;
}

.subtitle {
  font-family: var(--font-script);
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

/* ── Separator ─────────────────────────────────────────────────────────────── */
.separator {
  width: 48px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  margin: 1rem 0 1.75rem;
  opacity: 0.9;
}

/* ── Service bullets ───────────────────────────────────────────────────────── */
.small-caps-subtitle {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.small-caps-subtitle h2 {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.small-caps-subtitle h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-main);
  display: block;
}

.closing-script {
  font-family: var(--font-script);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-main);
  margin-top: 1.75rem;
  line-height: 1.5;
  text-transform: uppercase;
  transition: color 0.4s ease, text-shadow 0.4s ease;
}

/* ── Phone CTA ─────────────────────────────────────────────────────────────── */
.phone-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0.65rem 1.15rem;
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-full);
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.phone-cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--btn-text);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(230, 74, 25, 0.4);
}

.phone-cta .phone-icon {
  width: 18px;
  height: 18px;
  opacity: 0.9;
}

/* ── Light theme text overrides (outside rectangles) ───────────────────────── */
body.theme-light h1,
body.theme-light .subtitle,
body.theme-light .small-caps-subtitle h2,
body.theme-light .small-caps-subtitle h3,
body.theme-light .closing-script,
body.theme-light .phone-cta,
body.theme-light .footer {
  color: #f7f7f7;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 2px 4px rgba(0, 0, 0, 0.8);
}

body.theme-light .form-title {
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

body.theme-light input::placeholder {
  color: rgba(0, 0, 0, 0.9);
  font-weight: 800;
}

/* ── Text pill backdrop (visible on mobile only) ───────────────────────────── */
.text-pill {
  /* Desktop: no background, layout unchanged */
  background: transparent;
  border-radius: var(--radius-md);
  padding: 0;
  transition: background 0.35s ease, border-color 0.35s ease;
  position: relative;
}

/* ══════════════════════════════════════════════════════════════════════════════
   FORM CARD  (right column — Glassmorphism)
   ══════════════════════════════════════════════════════════════════════════════ */
.form-container {
  flex-shrink: 0;
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 2.75rem 2.5rem;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 20px 60px rgba(0,0,0,0.35);
  transition: background 0.4s ease, border-color 0.4s ease;
  position: relative;
}

.form-container::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.2) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 10;
}

.form-title {
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-main);
  margin-bottom: 1.75rem;
}

/* ── Form layout ───────────────────────────────────────────────────────────── */
form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: flex;
  gap: 1.25rem;
}

.input-group {
  flex: 1;
}

.input-group.full-width {
  width: 100%;
}

/* ── Inputs: underline only ────────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255,87,34,0.35);
  color: var(--text-main);
  padding: 12px 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: border-color 0.25s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 2px 0 0 var(--accent);
}

input::placeholder {
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.12em;
}

/* ── CTA Button ────────────────────────────────────────────────────────────── */
.actions {
  margin-top: 0.75rem;
}

button[type="submit"] {
  width: 100%;
  height: 56px;
  background: var(--accent-gradient);
  color: var(--btn-text);
  border: none;
  border-radius: var(--radius-full);
  padding: 0 2rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(255,87,34,0.35);
}

button[type="submit"]:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,87,34,0.45);
}

button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ══════════════════════════════════════════════════════════════════════════════
   SUCCESS MESSAGE
   ══════════════════════════════════════════════════════════════════════════════ */
.success-message {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem 0;
  gap: 0.75rem;
}

.success-message.visible {
  display: flex;
}

.success-message h2 {
  font-family: var(--font-script);
  font-size: 2.75rem;
  color: var(--accent);
  line-height: 1.1;
}

.success-message p {
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-main);
  max-width: 320px;
}

.success-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  justify-content: center;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--surface-border);
  padding: 0.55rem 1.1rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
  border-radius: var(--radius-full);
  width: auto;
}

.action-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.icon-only-btn {
  padding: 0.55rem;
  border: none;
  border-radius: 50%;
  opacity: 0.75;
}

.icon-only-btn:hover {
  opacity: 1;
  background: rgba(255,255,255,0.07);
}

/* ══════════════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════════════ */
.footer {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  pointer-events: none;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .page-wrapper {
    flex-direction: column;
    padding: 5rem 1.75rem 4rem;
    align-items: center;
    text-align: center;
    gap: 2.5rem;
  }
  .header {
    align-items: center;
    max-width: 100%;
  }
  .small-caps-subtitle {
    align-items: center;
  }
  h1 { font-size: clamp(2.4rem, 8vw, 3.5rem); }

  .phone-cta {
    font-size: 0.82rem;
    padding: 0.6rem 1rem;
    white-space: nowrap;
  }

  /* — What We Do pill: matches form card glass — */
  .text-pill {
    background: var(--surface);
    backdrop-filter: blur(var(--blur));
    -webkit-backdrop-filter: blur(var(--blur));
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem 1.25rem;
    width: 100%;
    max-width: 420px;
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.3), 0 20px 60px rgba(0,0,0,0.35);
    transition: background 0.4s ease, border-color 0.4s ease;
  }
  
  .text-pill::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.2) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
    z-index: 10;
  }

  /* — Subtitle: single row, smaller — */
  .subtitle {
    font-size: clamp(0.95rem, 3.8vw, 1.2rem);
    white-space: nowrap;
    margin-bottom: 1rem;
  }
  .subtitle br { display: none; }

  /* — Increase What We Do label + service items — */
  .small-caps-subtitle h2 {
    font-size: 0.82rem;
    letter-spacing: 0.16em;
  }
  .small-caps-subtitle h3 {
    font-size: 1.1rem;
    letter-spacing: 0.01em;
  }

  /* — Closing tagline: keep on one line — */
  .closing-script {
    font-size: 0.85rem;
    white-space: nowrap;
  }

  /* Shrink the pill toggle on mobile */
  #themeToggle {
    padding: 3px;
  }
  .toggle-opt {
    width: 20px;
    height: 20px;
  }
  #themeToggle .toggle-indicator {
    width: 20px;
    height: 20px;
    transform: translateX(20px); /* dark mode default on mobile */
  }
  body.theme-light #themeToggle .toggle-indicator {
    transform: translateX(0px);
  }
}

@media (max-width: 640px) {
  .page-wrapper {
    padding-top: 4.5rem;
    justify-content: flex-start;
    gap: 0;
  }
  .form-container {
    margin-top: 2rem;
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius-md);
    border-left: none;
    border-right: none;
    padding: 2rem 1.25rem;
  }
  .form-row {
    flex-direction: column;
    gap: 1.25rem;
  }
}
