/* ==========================================================================
   Crystal Cleaning 305 — styles
   Mobile-first. Breakpoints: 640px, 768px, 860px, 960px
   ========================================================================== */

:root {
  /* Miami neon-glass palette, pulled from the Crystal Cleaning 305 logo */
  --color-navy: #071a3a;
  --color-navy-deep: #050f24;
  --color-blue-bright: #00c2ff;
  --color-blue-deep: #0a5cff;
  --color-blue-highlight: #e8f9ff;
  --color-pink: #ff4d8d;
  --color-magenta: #c026d3;
  --color-sunset-orange: #ff7a45;
  --color-sunset-purple: #7c3aed;

  --gradient-primary: linear-gradient(135deg, var(--color-blue-bright), var(--color-blue-deep));
  --gradient-accent: linear-gradient(135deg, var(--color-pink), var(--color-magenta));
  --gradient-sunset: linear-gradient(120deg, var(--color-sunset-orange), var(--color-pink), var(--color-sunset-purple));
  --gradient-navy: linear-gradient(180deg, var(--color-navy), var(--color-navy-deep));

  --color-ink: #0b1930;
  --color-ink-soft: #45536e;
  --color-white: #ffffff;
  --color-off-white: #f5f5f7;
  --color-bg-alt: #f3f6fd;
  --color-border: #dfe6f5;

  --font-heading: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 6rem;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 2px 8px rgba(7, 26, 58, 0.08);
  --shadow-md: 0 12px 32px rgba(7, 26, 58, 0.12);
  --shadow-lg: 0 20px 48px rgba(7, 26, 58, 0.18);
  --shadow-glow-blue: 0 8px 28px rgba(0, 194, 255, 0.35);
  --shadow-glow-accent: 0 8px 28px rgba(255, 77, 141, 0.4);

  --max-width: 1160px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--space-2);
  color: var(--color-ink);
}

p { margin: 0 0 var(--space-2); color: var(--color-ink-soft); }

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

a { color: var(--color-blue-deep); }

:focus-visible { outline: 3px solid var(--color-blue-bright); outline-offset: 2px; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gradient-primary);
  color: #fff;
  padding: var(--space-1) var(--space-2);
  z-index: 200;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-magenta);
  margin: 0 0 var(--space-1);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.9rem 1.6rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: var(--shadow-glow-accent);
}
.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(255, 77, 141, 0.5);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(232, 249, 255, 0.7);
  backdrop-filter: blur(2px);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  background: rgba(232, 249, 255, 0.95);
  color: var(--color-blue-deep);
  border-color: #fff;
}
.btn-block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 15, 36, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(0, 194, 255, 0.16);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: var(--space-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-off-white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
}
.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.brand-text strong { color: var(--color-blue-bright); }

.main-nav {
  display: none;
  align-items: center;
  gap: var(--space-4);
}
.main-nav a {
  text-decoration: none;
  color: var(--color-off-white);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.main-nav a:hover { color: var(--color-blue-bright); border-color: var(--color-blue-bright); }
.main-nav a.nav-cta {
  background: var(--gradient-accent);
  color: #fff;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border-bottom: none;
  box-shadow: var(--shadow-glow-accent);
}
.main-nav a.nav-cta:hover { color: #fff; border-color: transparent; filter: brightness(1.08); }

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid rgba(232, 249, 255, 0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-off-white);
  transition: transform 0.2s ease, opacity 0.2s 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); }

/* mobile dropdown panel */
@media (max-width: 767px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--color-navy);
    padding: var(--space-2) var(--space-3) var(--space-3);
    border-bottom: 1px solid rgba(0, 194, 255, 0.16);
    box-shadow: var(--shadow-md);
    gap: var(--space-1);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 0.7rem 0.2rem; border-bottom: 1px solid rgba(232, 249, 255, 0.12); }
  .main-nav a.nav-cta { text-align: center; border-bottom: none; margin-top: var(--space-1); }
}

@media (min-width: 768px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(7, 26, 58, 0.4) 0%, rgba(7, 26, 58, 0.45) 40%, rgba(5, 15, 36, 0.88) 100%);
}
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(60% 45% at 85% 100%, rgba(255, 122, 69, 0.28) 0%, rgba(255, 77, 141, 0.16) 45%, rgba(124, 58, 237, 0) 75%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.hero-content {
  color: #fff;
  padding-block: var(--space-6) var(--space-6);
}
.hero .eyebrow { color: var(--color-blue-highlight); }
.hero h1 {
  color: #fff;
  font-size: clamp(2.4rem, 8vw, 4rem);
  margin-bottom: var(--space-2);
  text-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.hero-tagline {
  color: #f2f7f6;
  font-size: 1.1rem;
  max-width: 42ch;
  margin-bottom: var(--space-4);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (min-width: 640px) {
  .hero { min-height: 92vh; }
}

/* ---------- Sections ---------- */
.section {
  padding-block: var(--space-6);
}
.section-alt { background: var(--color-bg-alt); }

.section-heading {
  max-width: 640px;
  margin: 0 auto var(--space-5);
  text-align: center;
}
.section-heading h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.section-sub { font-size: 1.05rem; }

/* ---------- Split layout (About / Results) ---------- */
.split-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: center;
}
.split-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.split-text h2 { font-size: clamp(1.7rem, 4vw, 2.2rem); }

@media (min-width: 860px) {
  .split-layout { grid-template-columns: 1fr 1.1fr; gap: var(--space-6); }
  .split-layout.reverse .split-media { order: 2; }
  .split-layout.reverse .split-text { order: 1; }
}

.results { background: var(--color-white); }

/* ---------- Services grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow-blue); }
.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border-radius: 50%;
  background: rgba(0, 194, 255, 0.12);
  margin-bottom: var(--space-2);
}
.card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.card p { margin: 0; font-size: 0.95rem; }

/* ---------- Trust / Why us ---------- */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  max-width: 640px;
  margin-inline: auto;
}
@media (min-width: 640px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}
.trust-card {
  text-align: center;
  padding: var(--space-3);
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.trust-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow-blue); }
.trust-icon {
  font-size: 1.8rem;
  margin-bottom: var(--space-1);
}
.trust-card h3 { font-size: 1.05rem; }
.trust-card p { font-size: 0.9rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-section { background: linear-gradient(180deg, var(--color-bg-alt), #fff 60%); }
.contact-wrap {
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 560px) {
  .contact-form { grid-template-columns: 1fr 1fr; }
  .form-row-full { grid-column: 1 / -1; }
}

.form-row { display: flex; flex-direction: column; gap: 0.4rem; }
.form-row label { font-weight: 600; font-size: 0.92rem; color: var(--color-ink); }
.req { color: var(--color-magenta); }
.optional { color: var(--color-ink-soft); font-weight: 400; font-size: 0.85rem; }

input, select, textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fbfdfd;
  color: var(--color-ink);
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--color-blue-bright);
  box-shadow: 0 0 0 3px rgba(0, 194, 255, 0.18);
}
textarea { resize: vertical; min-height: 100px; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-success {
  text-align: center;
  padding: var(--space-4) var(--space-2);
}
.form-success-icon { font-size: 2.4rem; margin-bottom: var(--space-1); }
.form-success h3 { margin-bottom: 0.4rem; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: var(--gradient-navy);
  color: var(--color-off-white);
  padding-block: var(--space-5);
  overflow: hidden;
}
/* Thin sunset gradient line marking the transition into the footer */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-sunset);
}
/* Low-opacity palm frond silhouette, echoing the logo's skyline motif */
.site-footer::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='150' viewBox='0 0 240 150'%3E%3Cg fill='%23e8f9ff'%3E%3Cg transform='translate(55,150)'%3E%3Cpath d='M0,0 C-3,-40 4,-70 10,-95 C11,-80 9,-55 6,-30 C4,-15 2,-5 0,0 Z'/%3E%3Cg transform='translate(10,-95)'%3E%3Cpath d='M0,0 C-18,-6 -34,-2 -46,8 C-32,2 -16,1 0,4 Z'/%3E%3Cpath d='M0,0 C-14,-16 -28,-24 -44,-26 C-30,-16 -16,-8 0,4 Z'/%3E%3Cpath d='M0,0 C-4,-20 -10,-34 -22,-46 C-14,-32 -8,-16 0,4 Z'/%3E%3Cpath d='M0,0 C6,-20 6,-36 0,-50 C-4,-34 -4,-18 0,4 Z'/%3E%3Cpath d='M0,0 C14,-14 26,-24 42,-28 C28,-16 16,-6 0,4 Z'/%3E%3Cpath d='M0,0 C18,-4 32,0 44,10 C30,2 16,0 0,4 Z'/%3E%3C/g%3E%3C/g%3E%3Cg transform='translate(165,150) scale(0.7)'%3E%3Cpath d='M0,0 C-3,-40 4,-70 10,-95 C11,-80 9,-55 6,-30 C4,-15 2,-5 0,0 Z'/%3E%3Cg transform='translate(10,-95)'%3E%3Cpath d='M0,0 C-18,-6 -34,-2 -46,8 C-32,2 -16,1 0,4 Z'/%3E%3Cpath d='M0,0 C-14,-16 -28,-24 -44,-26 C-30,-16 -16,-8 0,4 Z'/%3E%3Cpath d='M0,0 C-4,-20 -10,-34 -22,-46 C-14,-32 -8,-16 0,4 Z'/%3E%3Cpath d='M0,0 C6,-20 6,-36 0,-50 C-4,-34 -4,-18 0,4 Z'/%3E%3Cpath d='M0,0 C14,-14 26,-24 42,-28 C28,-16 16,-6 0,4 Z'/%3E%3Cpath d='M0,0 C18,-4 32,0 44,10 C30,2 16,0 0,4 Z'/%3E%3C/g%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: bottom;
  background-size: 240px 150px;
}
.footer-inner { position: relative; z-index: 1; text-align: center; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: var(--space-2);
}
.footer-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.site-footer p { color: #b7c4e0; font-size: 0.9rem; max-width: 60ch; margin-inline: auto; }
.footer-contact {
  font-weight: 600;
  margin-block: var(--space-2);
}
.footer-contact a { color: var(--color-blue-bright); }
.footer-legal { margin-top: var(--space-3); font-size: 0.8rem; color: #7c8bb0; }
.footer-legal a { color: var(--color-blue-bright); }

/* ---------- Scroll fade-in ----------
   Content is visible by default so it never depends on JS running.
   Only once we know JS executed (html.js, set by an inline script in <head>)
   do we hide .fade-in elements pending their IntersectionObserver reveal. */
.fade-in {
  transition: opacity 0.6s ease, transform 0.6s ease;
}
html.js .fade-in:not(.is-visible) {
  opacity: 0;
  transform: translateY(16px);
}
.fade-in.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  background: var(--gradient-navy);
  color: var(--color-off-white);
  border-top: 1px solid rgba(0, 194, 255, 0.25);
  box-shadow: 0 -8px 24px rgba(5, 15, 36, 0.35);
  padding: var(--space-3);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.cookie-banner p {
  color: var(--color-off-white);
  margin: 0;
  font-size: 0.9rem;
  max-width: 62ch;
}
.cookie-banner a { color: var(--color-blue-bright); }
.cookie-banner-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}
.cookie-banner .btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .cookie-banner-actions { justify-content: center; }
}
