/* --------------
   Tokens
   -------------- */
:root {
  /* Theme-layer tokens (added) */
  --surface-0: var(--ink);
  --surface-1: rgba(255,255,255,.03);
  --surface-2: rgba(255,255,255,.06);
  --surface-3: rgba(255,255,255,.10);
  --border: rgba(255,255,255,.12);
  --border-strong: rgba(255,255,255,.18);
  --header-bg: rgba(10,12,14,.70);

  --ink: #0B0D0E;
  --ink-2: #151A1E;
  --text: #E9EDF2;
  --muted: #B6C2CF;
  --blue-1: #9AD9FF;
  --blue-2: #46B2FF;
  --blue-3: #0E7ED6;
  --blue-4: #0053A6;
  --green-1: #34dab2;
  --green-2: #00A653;    
  --radius: 16px;
  --shadow-sm: 0 2px 10px rgba(0,0,0,.15);
  --container: 1200px;
}

[data-theme="sky"] {
  /* Light sky theme tokens */
  --ink: #EAF6FF;
  --ink-2: #D6EBFF;
  --text: #0B0D0E;
  --muted: #2C3E4B;

  /* Flip layer tokens for light */
  --surface-1: rgba(0,0,0,.03);
  --surface-2: rgba(0,0,0,.06);
  --surface-3: rgba(0,0,0,.10);
  --border:   rgba(0,0,0,.12);
  --border-strong: rgba(0,0,0,.18);
  --header-bg: rgba(255,255,255,.75);
}

/* Sky theme readability tweaks */
[data-theme="sky"] .lead { color: #2C3E4B; }
[data-theme="sky"] input::placeholder { color: #4A5B66; }
[data-theme="sky"] .footer-grid h4 { color: #2C3E4B; }





/* --------------
   Base
   -------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans";
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.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; }

/* --------------
   Header/Nav
   -------------- */
header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(6px); border-bottom: 1px solid var(--surface-2); }
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; gap: 14px; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-img { width: 44px; height: 44px; }
.wordmark span { color: var(--muted); margin-left: 6px; }

.menu { display: flex; gap: 22px; align-items: center; }
.menu a { color: var(--text); opacity: .9; font-weight: 500; }
.menu a[aria-current="page"] { color: var(--blue-1); }

.cta-group { display: flex; gap: 10px; }
.btn { border: 1px solid var(--border); color: var(--text); padding: 10px 14px; border-radius: 12px; background: transparent; cursor: pointer; font-weight: 600; }
.btn:hover { border-color: rgba(255,255,255,.26); }
.btn-primary { background: linear-gradient(135deg, var(--blue-2), var(--blue-4)); border: none; color: white; box-shadow: var(--shadow-sm); }
.btn-cta { background: linear-gradient(135deg, var(--green-1), var(--green-2)); border: none; color: white; box-shadow: var(--shadow-sm); }
.btn-outline { background: rgba(180,240,236,.26); }
.btn-services { background: rgba(255,140,26,.26); }

.burger { display: none; background: transparent; border: 0; color: var(--text); font-size: 28px; }
@media (max-width: 900px) {
  .menu { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--ink-2); padding: 12px 20px; border-bottom: 1px solid var(--border); }
  .menu.open { display: grid; gap: 16px; }
  .burger { display: block; }
}

/* --------------
   Hero
   -------------- */
.hero { position: relative; padding: 96px 0 56px; overflow: clip; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.kicker { color: var(--muted); letter-spacing: .2em; font-size: 1.8rem; }
h1 { font-size: clamp(2rem, 3.5vw, 3.4rem); line-height: 1.1; margin: 10px 0 14px; }
.lead { font-size: clamp(1rem, 1.4vw, 1.2rem); color: #DCE4EC; }
.hero-cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero-cta.center { justify-content: center; }
.hero-bg { position: absolute; inset: -10% -10% auto -10%; height: 60%; z-index: -1;
  background: radial-gradient(55% 60% at 25% 40%, rgba(70,178,255,.29) 0%, transparent 60%),
              radial-gradient(55% 60% at 75% 20%, rgba(255,140,26,.29) 0%, transparent 60%);
  filter: blur(70px);
}
.hero-logo-img { width: min(420px, 60vw); height: auto; }

@media (max-width: 900px) {
  .hero { padding-top: 72px; }
  .hero-grid { grid-template-columns: 1fr; }
}

/* --------------
   Sections & grid
   -------------- */
section { padding: 56px 0; }
.section-title { font-size: clamp(1.4rem, 2.3vw, 2rem); margin: 0 0 10px; }
.section-lead { color: var(--muted); margin: 0 0 24px; }

.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 900px) { .grid.cols-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.cols-3 { grid-template-columns: 1fr; } }

.card { background: linear-gradient(180deg, var(--surface-1), var(--surface-1)); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); transition: transform .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.card h3 { margin: 6px 0 4px; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }

.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-1); font-size: .85rem; color: var(--text); }

/* --------------
   Forms
   -------------- */
.form { display: grid; gap: 14px; }
.form-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
label { font-weight: 600; }
input, textarea, select {
  width: min(560px, 100%);
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,.15);
  color: var(--text);
  border-radius: 10px;
}
input::placeholder { color: #b8c4d0; }
textarea { resize: vertical; }
.form-actions { display: flex; gap: 10px; }

/* Dark theme: contact form card gradient to echo hero (blue/orange) */
[data-theme="dark"] #contact form.card,
[data-theme="dark"] #contact .card.form {
  background: linear-gradient(135deg, rgba(14,126,214,.24), rgba(255,140,26,.20));
  border: 1px solid rgba(14,126,214,.30);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}

/* Light theme: mirror contact form gradient (subtle like hero) */
[data-theme="sky"] #contact form.card,
[data-theme="sky"] #contact .card.form {
  background: linear-gradient(135deg, rgba(14,126,214,.17), rgba(255,140,26,.15));
  border: 1px solid rgba(14,126,214,.18);
  box-shadow: 0 8px 18px rgba(0,0,0,.08);
}

/* --- Contact form: 2-column layout (Message fills right half) --- */
#contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "name    message"
    "email   message"
    "phone   message"
    "actions message";
  gap: 16px 20px;
  align-items: start; /* left column rows size the tracks; message will stretch via align-self below */
}

/* Map rows to grid areas */
#contact-form .form-row:nth-of-type(1) { grid-area: name;  }
#contact-form .form-row:nth-of-type(2) { grid-area: email; }
#contact-form .form-row:nth-of-type(3) { grid-area: phone; }
#contact-form .form-row:nth-of-type(4) { grid-area: message; }
#contact-form .form-actions             { grid-area: actions; }

/* Ensure inputs take the column width */
#contact-form input,
#contact-form textarea,
#contact-form select { width: 100%; max-width: 100%; }

/* --- Message column: label on top, textarea fills full column height --- */
#contact-form .form-row:nth-of-type(4) {
  /* Stack label and textarea */
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;     /* label takes its natural height, textarea gets the rest */
  align-self: stretch;               /* IMPORTANT: fill the full grid area height */
  height: 100%;
  padding-right: 12px;               /* breathing room from card edge */
}

#contact-form .form-row:nth-of-type(4) > label {
  display: block;
  margin: 0 0 6px 0;
  text-align: left;
}

#contact-form .form-row:nth-of-type(4) > textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 100%;     /* take the 1fr row */
  min-height: 0;    /* allow the grid to control height */
  resize: vertical;
  align-self: stretch;
  justify-self: stretch;
}

/* Mobile: stack all fields */
@media (max-width: 800px) {
  #contact-form {
    grid-template-columns: 1fr;
    grid-template-areas:
      "name"
      "email"
      "phone"
      "message"
      "actions";
  }
  #contact-form .form-row:nth-of-type(4) {
    height: auto;
    padding-right: 0;
    grid-template-rows: auto auto;  /* natural height when stacked */
  }
  #contact-form .form-row:nth-of-type(4) > textarea {
    height: auto;
    min-height: 0;
  }
}


/* --------------
   Footer
   -------------- */
footer { border-top: 1px solid var(--border); background: var(--surface-1); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; padding: 28px 0; }
.footer-grid h4 { margin: 0 0 10px; font-size: 1rem; color: #D7DEE6; }
.footer-grid a { color: var(--muted); }
.copyright { padding: 14px 0 32px; color: var(--muted); font-size: .9rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
\n/* Footer group styling */
.footer-brand { padding: 8px 0; }
.footer-group { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.footer-group ul { margin: 0; padding-left: 18px; }
.fg-products { background: linear-gradient(45deg, rgba(255,255,255,.1), rgba(14,126,214,.06)); }
.fg-company  { background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(10,10,10,.53)); }
.fg-services  { background: linear-gradient(225deg, rgba(255,255,255,.1), rgba(255,140,26,.06)); }


/* Footer grid: brand + two groups */
.footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; } }


/* Product icon badges */
.icon-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--border-strong);
  margin-bottom: 8px;
}
.icon-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* align icon + title nicely */
#property-cards .card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

/* --- Navbar spacing tweak --- */
@media (min-width: 901px) {
  .nav { justify-content: flex-start; }
  .cta-group { margin-left: auto; }
  .menu { display: contents; }
  .menu > a:first-of-type { margin-left: clamp(32px, 6vw, 120px); }
  .menu > a { margin-right: 22px; }
  .menu > a:last-of-type { margin-right: 0; }
  #themeToggle { margin-left: auto; margin-right: clamp(16px, 4vw, 56px); }
}

/* --- Mobile hero logo --- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; position: relative; }
  .hero .center { position: absolute; top: -92px; right: 16px; pointer-events: none; }
  .hero .hero-logo-img { width: clamp(96px, 27vw, 180px); height: auto; }
  .hero { padding-top: 140px; }
  .hero .kicker { padding-right: clamp(120px, 28vw, 220px); }
}

/* === CTA centering === */
a.btn-cta,
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}
@media (max-width: 420px) {
  a.btn-cta,
  .btn-cta { white-space: normal; text-align: center; }
}

/* === Footer comfy spacing on mobile === */
@media (max-width: 900px) {
  .footer-grid { padding: 28px 16px; }
  .footer-group { padding: 20px; margin-left: 4px; margin-right: 4px; }
}

#services, #products, #contact {
scroll-margin-top: 20px;
}