/* SmartHomes — Apple + Control4 Aesthetic */
:root {
  /* Light sections */
  --white: #ffffff;
  --off-white: #fafafa;
  --light-gray: #f5f5f7;
  --text-dark: #1d1d1f;
  --text-gray: #6e6e73;
  --text-light-secondary: #86868b;
  
  /* Dark sections */
  --black: #000000;
  --near-black: #101010;
  --dark-gray: #1d1d1f;
  --text-white: #f5f5f7;
  --text-dark-secondary: #a1a1a6;
  
  /* Accent */
  --accent: #c9943e;
  --accent-hover: #daa94e;
  --accent-subtle: rgba(201, 148, 62, 0.1);
  
  /* System */
  --max-width: 1080px;
  --max-width-wide: 1440px;
  --transition: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  --transition-slow: 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── TYPOGRAPHY (Apple-scale) ── */
.headline-xl {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.headline-lg {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
}
.headline-md {
  font-size: clamp(1.6rem, 3.5vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
}
.headline-sm {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.body-lg {
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.6;
  font-weight: 400;
}
.body-md {
  font-size: 1.05rem;
  line-height: 1.6;
}
.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: var(--max-width-wide); margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 48px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.nav-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-logo {
  font-size: 1.1rem; font-weight: 600; color: var(--text-white);
  display: flex; align-items: center; gap: 8px;
  letter-spacing: -0.01em;
}
.nav-logo-icon {
  color: var(--accent); font-size: 1.2rem;
}
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  color: var(--text-dark-secondary); font-size: 0.8rem; font-weight: 400;
  transition: color var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-white); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 18px; height: 1.5px; background: var(--text-white);
  margin: 5px 0; transition: var(--transition);
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; flex-direction: column; position: absolute;
    top: 48px; left: 0; right: 0;
    background: rgba(0, 0, 0, 0.97);
    padding: 20px 24px 28px; gap: 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 0.95rem; }
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 1.05rem; font-weight: 400;
  transition: all var(--transition); cursor: pointer;
  border: none; background: none;
}
.btn-link {
  color: var(--accent);
}
.btn-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.btn-link::after { content: ' ›'; font-size: 1.3em; line-height: 1; }

.btn-pill {
  padding: 12px 28px; border-radius: 980px;
  font-size: 1rem; font-weight: 400;
}
.btn-pill-filled {
  background: var(--accent); color: var(--black);
}
.btn-pill-filled:hover { background: var(--accent-hover); }
.btn-pill-outline {
  border: 1px solid var(--accent); color: var(--accent);
}
.btn-pill-outline:hover { background: var(--accent); color: var(--black); }
.btn-pill-white {
  background: rgba(255,255,255,0.9); color: var(--black);
}
.btn-pill-white:hover { background: var(--white); }

.btn-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── HERO ── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--black);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0.55;
  transition: opacity 1s ease;
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center; padding: 120px 24px 80px;
  max-width: 900px;
}
.hero-content .eyebrow {
  color: var(--accent); margin-bottom: 20px;
}
.hero-content .headline-xl {
  color: var(--text-white); margin-bottom: 20px;
}
.hero-content .body-lg {
  color: var(--text-dark-secondary); max-width: 600px; margin: 0 auto 40px;
}

/* ── SECTIONS ── */
.section { padding: 120px 0; }
.section-dark { background: var(--black); color: var(--text-white); }
.section-dark .text-secondary { color: var(--text-dark-secondary); }
.section-light { background: var(--light-gray); color: var(--text-dark); }
.section-light .text-secondary { color: var(--text-gray); }
.section-white { background: var(--white); color: var(--text-dark); }
.section-white .text-secondary { color: var(--text-gray); }

.section-header { margin-bottom: 64px; }
.section-header .eyebrow { margin-bottom: 12px; color: var(--accent); }
.section-header .body-lg { max-width: 600px; margin: 16px auto 0; }
.section-header .body-lg.text-secondary { opacity: 0.8; }

/* ── LIFESTYLE IMAGE PANELS (Apple style) ── */
.image-panel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 20px;
}
.image-panel img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--transition-slow);
}
.image-panel:hover img { transform: scale(1.02); }

.image-panel-tall { height: clamp(400px, 60vw, 680px); }
.image-panel-wide { height: clamp(300px, 40vw, 500px); }
.image-panel-square { aspect-ratio: 1; }

.image-panel-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 48px; 
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}
.image-panel-overlay .eyebrow { color: var(--accent); margin-bottom: 8px; }
.image-panel-overlay h3 { color: var(--white); margin-bottom: 8px; }
.image-panel-overlay p { color: rgba(255,255,255,0.7); max-width: 460px; }

/* ── SERVICE FEATURE GRID (Control4 style) ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.feature-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 480px;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform var(--transition);
}
.feature-card:hover { transform: translateY(-4px); }
.feature-card-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform var(--transition-slow);
}
.feature-card:hover .feature-card-bg { transform: scale(1.03); }
.feature-card-content {
  position: relative; z-index: 2;
  padding: 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.15) 60%, transparent 100%);
}
.feature-card-content .eyebrow { color: var(--accent); margin-bottom: 8px; }
.feature-card-content h3 {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 600; color: var(--white);
  margin-bottom: 10px; letter-spacing: -0.01em;
}
.feature-card-content p { color: rgba(255,255,255,0.7); font-size: 0.95rem; max-width: 380px; }
.feature-card-content .btn-link { color: var(--accent); font-size: 0.95rem; margin-top: 16px; display: inline-flex; }

.feature-card-full {
  grid-column: 1 / -1;
  min-height: 560px;
}

@media (max-width: 768px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 380px; }
  .feature-card-full { min-height: 420px; }
}

/* ── SPLIT SECTIONS (text + image, Apple product style) ── */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
  padding: 100px 0;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }
.split-text .eyebrow { color: var(--accent); margin-bottom: 16px; }
.split-text .headline-md { margin-bottom: 20px; }
.split-text .body-lg { margin-bottom: 32px; }
.split-text .body-lg.text-secondary { opacity: 0.8; }
.split-image {
  border-radius: 20px; overflow: hidden;
  height: clamp(320px, 40vw, 520px);
}
.split-image img {
  width: 100%; height: 100%; object-fit: cover;
}

.feature-list { list-style: none; margin-top: 24px; }
.feature-list li {
  padding: 10px 0; font-size: 1rem;
  display: flex; align-items: center; gap: 12px;
}
.feature-list li::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}
.section-dark .feature-list li { color: var(--text-dark-secondary); }
.section-light .feature-list li, .section-white .feature-list li { color: var(--text-gray); }

@media (max-width: 768px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split.reverse { direction: ltr; }
  .split-image { height: 300px; }
}

/* ── WHY / STATS ROW ── */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 48px; text-align: center; padding: 48px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.stat-number {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700; color: var(--accent);
  letter-spacing: -0.02em; margin-bottom: 4px;
}
.stat-label { font-size: 0.9rem; color: var(--text-dark-secondary); }

@media (max-width: 768px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 32px; }
}

/* ── CTA SECTION ── */
.cta-section {
  padding: 140px 24px; text-align: center;
}
.cta-section .headline-lg { margin-bottom: 16px; }
.cta-section .body-lg { max-width: 520px; margin: 0 auto 36px; }

/* ── ABOUT PAGE ── */
.about-hero-image {
  width: 100%; height: clamp(300px, 50vw, 600px);
  border-radius: 20px; overflow: hidden; margin-top: 48px;
}
.about-hero-image img { width: 100%; height: 100%; object-fit: cover; }

.values-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 48px; margin-top: 64px;
}
.value-item .headline-sm { margin-bottom: 12px; }
.value-item p { font-size: 1rem; }

@media (max-width: 768px) {
  .values-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ── CONTACT PAGE ── */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: start;
}
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group label {
  display: block; font-size: 0.85rem; font-weight: 500;
  margin-bottom: 8px; color: var(--text-gray);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 14px 16px;
  background: var(--white);
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  color: var(--text-dark); font-size: 1rem; font-family: inherit;
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}
.form-group textarea { min-height: 140px; resize: vertical; }

.contact-info { padding-top: 8px; }
.contact-item {
  padding: 24px 0;
  border-bottom: 1px solid #d2d2d7;
}
.contact-item:first-child { padding-top: 0; }
.contact-item:last-child { border-bottom: none; }
.contact-item h4 { font-size: 0.85rem; color: var(--text-gray); font-weight: 500; margin-bottom: 6px; }
.contact-item p { font-size: 1.1rem; font-weight: 500; }
.contact-item a { color: var(--accent); }
.contact-item a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
}

/* ── LEGAL PAGES ── */
.legal-content {
  max-width: 720px; margin: 0 auto; padding: 40px 0 100px;
}
.legal-content h1 { font-size: 2.4rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.legal-content .effective-date { color: var(--text-gray); margin-bottom: 40px; font-size: 1rem; }
.legal-content h2 { font-size: 1.2rem; font-weight: 600; margin-top: 40px; margin-bottom: 12px; }
.legal-content p { color: var(--text-gray); margin-bottom: 14px; font-size: 1rem; line-height: 1.65; }

/* ── PAGE HEADER (inner pages) ── */
.page-header {
  padding: 100px 0 60px;
  text-align: center;
}
.page-header .eyebrow { color: var(--accent); margin-bottom: 12px; }
.page-header .headline-lg { margin-bottom: 16px; }
.page-header .body-lg { max-width: 560px; margin: 0 auto; }

/* ── FOOTER ── */
.footer {
  background: var(--light-gray);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 48px;
}
.footer-brand { max-width: 280px; }
.footer-brand .nav-logo { margin-bottom: 12px; }
.footer-brand p { color: var(--text-gray); font-size: 0.85rem; line-height: 1.5; }
.footer-links { display: flex; gap: 48px; }
.footer-col h4 {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-light-secondary); margin-bottom: 12px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--text-gray); font-size: 0.85rem; }
.footer-col a:hover { color: var(--text-dark); }
.footer-bottom {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid #d2d2d7;
  color: var(--text-light-secondary); font-size: 0.8rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

@media (max-width: 768px) {
  .footer-inner { flex-direction: column; }
  .footer-links { flex-direction: column; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section { padding: 80px 0; }
  .cta-section { padding: 100px 24px; }
}

/* ── ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1),
              transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
