/* ===================================================================
   Smart Homes Aus - Design System
   Single stylesheet with CSS custom property tokens, reset, and base styles.
   =================================================================== */

/* === Font Face Declarations ========================================= */

@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/SpaceGrotesk-Variable.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* === Design Tokens ================================================= */

:root {
  /* Colors */
  --color-bg: #000000;
  --color-surface: #111111;
  --color-accent: #06f3ff;
  --color-text: #e0e0e0;
  --color-text-muted: #888888;

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;

  /* Breakpoints (documentation only - cannot be used in @media queries) */
  --bp-mobile: 375px;
  --bp-tablet: 768px;
  --bp-desktop: 1280px;
}

/* === CSS Reset ====================================================== */

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

* {
  margin: 0;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

/* === Base Styles ==================================================== */

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* === 404 Page Styles ================================================ */

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-md);
}

.error-container {
  background: var(--color-surface);
  padding: var(--space-lg);
  border-radius: 8px;
  max-width: 480px;
  width: 100%;
  margin: var(--space-xl) auto;
  text-align: center;
}

.error-logo {
  max-width: 200px;
  margin: 0 auto var(--space-md);
}

.error-heading {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.error-text {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

/* === Skip Link ===================================================== */

.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 200;
}

.skip-link:focus {
  position: fixed;
  top: var(--space-sm);
  left: var(--space-sm);
  width: auto;
  height: auto;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-accent);
  color: #000;
  font-weight: 700;
  z-index: 200;
}

/* === Header ======================================================== */

.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid #222;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.site-logo img {
  max-height: 40px;
  width: auto;
}

/* === Desktop Nav ==================================================== */

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a {
  color: var(--color-text);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.site-nav a.active {
  color: var(--color-accent);
}

/* === Hamburger ====================================================== */

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 10px;
  position: relative;
}

.hamburger-line,
.hamburger-line::before,
.hamburger-line::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-accent);
  position: absolute;
  left: 10px;
}

.hamburger-line {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-line::before {
  content: '';
  top: -8px;
  position: absolute;
}

.hamburger-line::after {
  content: '';
  top: 8px;
  position: absolute;
}

/* === Mobile Nav ===================================================== */

.mobile-nav {
  background: var(--color-surface);
  overflow: hidden;
  max-height: 0;
  transition: max-height 300ms ease-out;
}

.mobile-nav.is-open {
  max-height: 300px;
}

.mobile-nav a {
  display: block;
  padding: 0 var(--space-md);
  height: 48px;
  line-height: 48px;
  text-align: center;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 700;
}

.mobile-nav a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

/* === Container ====================================================== */

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* === Visually Hidden ================================================= */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Hero =========================================================== */

.hero {
  padding: var(--space-xl) 0;
  position: relative;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: stretch;
  width: 100%;
}

.hero-card {
  background: var(--color-surface);
  border: 1px solid #222;
  border-radius: 8px;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-card h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.hero-card p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  line-height: 1.5;
  flex: 1;
}

/* === Service Overview ================================================ */

.service-overview {
  padding: var(--space-xl) 0;
}

.service-overview h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  line-height: 1.5;
}

/* === CTA Button ==================================================== */

.btn-primary {
  display: inline-block;
  background: var(--color-accent);
  color: #000;
  font-weight: 700;
  font-size: 1rem;
  padding: 12px 24px;
  border-radius: 6px;
  border: none;
  text-decoration: none;
  transition: background-color 200ms ease;
  min-height: 44px;
  line-height: 1;
}

.btn-primary:hover {
  background: #05d4e0;
  text-decoration: none;
}

.btn-primary:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-primary:active {
  transform: scale(0.98);
}

/* === Card Grid ====================================================== */

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.service-card {
  background: var(--color-surface);
  border: 1px solid #222;
  border-radius: 8px;
  padding: var(--space-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 200ms ease;
}

.service-card:hover {
  border-color: var(--color-accent);
  text-decoration: none;
}

.service-card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}

.service-card p {
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* === Page Header ==================================================== */

.page-header {
  text-align: center;
  padding: var(--space-xl) 0;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.page-header p {
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.5;
}

/* === Service Sections =============================================== */

.service-section {
  padding: var(--space-xl) 0;
}

.service-section:nth-child(even) {
  background: var(--color-surface);
}

.service-section .container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.service-section h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.service-section p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  line-height: 1.5;
  max-width: 720px;
}

.service-section h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}

.service-list {
  list-style: disc;
  padding-left: var(--space-lg);
}

.service-list li {
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.service-list li::marker {
  color: var(--color-text-muted);
}

/* === CTA Banner ===================================================== */

.cta-banner {
  background: var(--color-surface);
  border-top: 2px solid var(--color-accent);
  padding: var(--space-xl) 0;
  text-align: center;
}

.cta-banner h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.2;
  margin-bottom: var(--space-lg);
}

/* === Contact Grid ==================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-lg);
  padding: var(--space-xl) 0 var(--space-lg);
}

/* === Contact Card ==================================================== */

.contact-card {
  background: var(--color-surface);
  border: 1px solid #222;
  border-radius: 8px;
  padding: var(--space-lg);
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 200ms ease;
}

a.contact-card:hover {
  border-color: var(--color-accent);
  text-decoration: none;
}

a.contact-card:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.contact-card-icon {
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.contact-card-icon svg {
  display: inline-block;
}

.contact-card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: var(--space-sm);
}

.contact-card p {
  color: var(--color-accent);
  line-height: 1.5;
}

/* === Contact Info ==================================================== */

.contact-info {
  text-align: center;
  padding: var(--space-lg) 0;
}

.contact-info p {
  color: var(--color-text-muted);
}

/* === Privacy Content ================================================= */

.privacy-content {
  padding: var(--space-xl) 0;
}

.privacy-content .container {
  max-width: 720px;
}

.privacy-content h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.2;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-md);
}

.privacy-content h2:first-child {
  margin-top: 0;
}

.privacy-content p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

.privacy-content ul {
  list-style: disc;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.privacy-content li {
  margin-bottom: var(--space-sm);
  color: var(--color-text-muted);
}

/* === Footer ========================================================= */

.site-footer {
  background: var(--color-surface);
  border-top: 1px solid #222;
  padding: var(--space-xl) 0;
}

.site-footer .container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

.footer-info {
  flex: 1;
}

.footer-info .footer-tagline {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  color: var(--color-text);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--color-accent);
  text-decoration: none;
}

.footer-copyright {
  color: var(--color-text-muted);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid #222;
  text-align: center;
}

/* === Responsive (Mobile First) ====================================== */

@media (max-width: 767px) {
  .hamburger {
    display: block;
  }

  .site-nav {
    display: none;
  }

  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-card h2,
  .page-header h1 {
    font-size: 2rem;
  }

  .service-section h2,
  .cta-banner h2 {
    font-size: 1.5rem;
  }

  .service-card h3,
  .service-section h3 {
    font-size: 1.125rem;
  }

  .container {
    padding: 0 var(--space-md);
  }
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none !important;
  }

  .site-header .container {
    padding: 0 var(--space-lg);
  }

  .container {
    padding: 0 var(--space-lg);
  }
}

@media (min-width: 1280px) {
  .hero {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
  }
}

/* === Reduced Motion ================================================= */

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