/* ==========================================================================
   KeyBox — static rebuild
   Hand-written CSS replacing the Tailwind/React build. Design tokens (colors,
   fonts, radius) are pulled straight from the captured site's :root variables
   so the visual result matches the original.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700;800;900&display=swap');

:root {
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --background: #ffffff;
  --foreground: #17181b;          /* 220 15% 10% */
  --primary: #292c33;             /* 220 12% 18% */
  --primary-foreground: #fafafa;
  --secondary: #f1f2f4;           /* 220 10% 95% */
  --secondary-foreground: #292c33;
  --muted: #f3f4f6;               /* 220 10% 96% */
  --muted-foreground: #767b85;    /* 220 8% 46% */
  --accent: #eba82e;              /* 38 90% 55% */
  --accent-foreground: #1c1a12;
  --border: #e4e5e8;              /* 220 10% 90% */
  --radius: 0.625rem;

  --max-width: 72rem; /* 6xl */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.5;
}

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

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* -------------------------------------------------- Buttons -------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 3rem;
  padding: 0 2rem;
  border-radius: 0.5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.btn-primary:hover { background: rgba(41,44,51,0.9); }

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--foreground);
  font-weight: 500;
}
.btn-outline:hover { background: var(--secondary); }

/* -------------------------------------------------- Navbar -------------------------------------------------- */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(228,229,232,0.5);
}

.navbar .container {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .logo img { height: 2.5rem; width: auto; }

.navbar .nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}
.navbar .nav-links a {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
}
.navbar .nav-links a:hover { color: var(--foreground); }

.navbar .cart-btn {
  position: relative;
  padding: 0.5rem;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
}
.navbar .cart-btn:hover { background: var(--secondary); }
.navbar .cart-btn svg { width: 1.25rem; height: 1.25rem; color: var(--foreground); }

@media (min-width: 768px) {
  .navbar .nav-links { display: flex; }
}

/* -------------------------------------------------- Hero -------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 4rem;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom right, rgba(241,242,244,0.6), var(--background), var(--background));
}

.hero::after {
  content: "";
  position: absolute;
  top: 5rem;
  right: 0;
  width: 500px;
  height: 500px;
  background: rgba(235,168,46,0.05);
  border-radius: 9999px;
  filter: blur(64px);
}

.hero .container {
  position: relative;
  padding-top: 5rem;
  padding-bottom: 5rem;
  width: 100%;
}

.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 0.85fr 1.15fr; gap: 3rem; }
}

.hero-eyebrow {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--foreground);
}
.hero h1 .accent { color: var(--accent); }

@media (min-width: 768px) { .hero h1 { font-size: 3.75rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: 4.5rem; } }

.hero p.lede {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 28rem;
  line-height: 1.625;
}

.hero-actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 640px) { .hero-actions { flex-direction: row; } }

.hero-image { display: flex; justify-content: center; }
.hero-image img { width: 100%; max-width: 40rem; border-radius: 1rem; }

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@media (min-width: 1024px) { .scroll-cue { display: flex; } }

/* -------------------------------------------------- Section heading -------------------------------------------------- */

.section-heading { text-align: center; margin-bottom: 3.5rem; }
.section-heading .eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.section-heading h2 {
  margin: 0.75rem 0 0;
  font-family: var(--font-heading);
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
@media (min-width: 768px) { .section-heading h2 { font-size: 2.25rem; } }
.section-heading p {
  margin-top: 1rem;
  font-size: 1.125rem;
  color: var(--muted-foreground);
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

/* -------------------------------------------------- Smart Keyboxes (model tabs) -------------------------------------------------- */

.smart-section { padding: 6rem 0; background: var(--background); }

.model-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
}
.model-tabs label {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 1;
  min-width: 0;
  text-align: center;
  line-height: 1.25rem;
}
.model-tabs label:hover { border-color: rgba(41,44,51,0.4); }

.model-panels { position: relative; min-height: 300px; }
.model-panel {
  display: none;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}
@media (min-width: 1024px) { .model-panel { grid-template-columns: 1fr 1fr; gap: 5rem; } }

.model-figure img {
  width: 100%;
  border-radius: 0.75rem;
}

.model-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  background: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.125rem 0.625rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.model-panel h3 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
@media (min-width: 768px) { .model-panel h3 { font-size: 3rem; } }

.model-panel .desc {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--muted-foreground);
  line-height: 1.625;
}

.spec-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.spec {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(241,242,244,0.5);
}
.spec .icon {
  width: 2.25rem; height: 2.25rem;
  border-radius: 0.5rem;
  background: rgba(235,168,46,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.spec .icon svg { width: 1rem; height: 1rem; }
.spec span { font-size: 0.875rem; font-weight: 500; }

.model-panel .cta { margin-top: 2.5rem; }

.tab-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  text-align: center;
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
}

/* radio-driven, JS-free tab switching */
#tab-smart:checked ~ .model-panels #panel-smart,
#tab-keypad:checked ~ .model-panels #panel-keypad,
#tab-keytracker:checked ~ .model-panels #panel-keytracker,
#tab-pushbutton:checked ~ .model-panels #panel-pushbutton,
#tab-pushbutton12:checked ~ .model-panels #panel-pushbutton12 {
  display: grid;
}
#tab-smart:checked ~ .model-tabs label[for="tab-smart"],
#tab-keypad:checked ~ .model-tabs label[for="tab-keypad"],
#tab-keytracker:checked ~ .model-tabs label[for="tab-keytracker"],
#tab-pushbutton:checked ~ .model-tabs label[for="tab-pushbutton"],
#tab-pushbutton12:checked ~ .model-tabs label[for="tab-pushbutton12"] {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

/* -------------------------------------------------- Features -------------------------------------------------- */

.features-section { padding: 6rem 0; background: rgba(241,242,244,0.3); }

.features-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }

.feature-card {
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--background);
  border: 1px solid rgba(228,229,232,0.6);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
  border-color: rgba(235,168,46,0.3);
  box-shadow: 0 10px 15px -3px rgba(235,168,46,0.05);
}
.feature-card .icon {
  width: 3rem; height: 3rem;
  border-radius: 0.75rem;
  background: rgba(235,168,46,0.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}
.feature-card .icon svg { width: 1.375rem; height: 1.375rem; }
.feature-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
}
.feature-card p { margin: 0; font-size: 0.875rem; color: var(--muted-foreground); line-height: 1.625; }

/* -------------------------------------------------- Base Lockbox -------------------------------------------------- */

.lockbox-section { padding: 6rem 0; background: rgba(241,242,244,0.3); }
.lockbox-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 1024px) { .lockbox-grid { grid-template-columns: 1fr 1fr; gap: 5rem; } }

.lockbox-figure {
  position: relative;
  background: var(--background);
  border-radius: 1.5rem;
  padding: 2rem;
  order: 2;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
@media (min-width: 1024px) { .lockbox-figure { order: 1; padding: 3rem; } }
.lockbox-figure img {
  position: absolute;
  inset: 2rem;
  width: calc(100% - 4rem);
  height: calc(100% - 4rem);
  object-fit: contain;
  border-radius: 0.75rem;
}
@media (min-width: 1024px) {
  .lockbox-figure img { inset: 3rem; width: calc(100% - 6rem); height: calc(100% - 6rem); }
}

/* Car-window-attachment preview: checkbox-driven, no JS required. */
.lockbox-figure .lockbox-img-attachment { display: none; }
#car-window-toggle:checked ~ .lockbox-grid .lockbox-img-default { display: none; }
#car-window-toggle:checked ~ .lockbox-grid .lockbox-img-attachment { display: block; }

.lockbox-content { order: 1; }
@media (min-width: 1024px) { .lockbox-content { order: 2; } }

.lockbox-content h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}
@media (min-width: 768px) { .lockbox-content h2 { font-size: 3rem; } }

.lockbox-content .desc { margin-top: 1.5rem; font-size: 1.125rem; color: var(--muted-foreground); line-height: 1.625; }

.lockbox-specs { margin-top: 2rem; display: flex; flex-direction: column; gap: 0.75rem; }
.lockbox-specs .spec { background: var(--background); }

.addon-toggle {
  margin-top: 1.5rem;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 2px solid var(--border);
  background: var(--background);
  text-align: left;
  cursor: default;
}
.addon-toggle {
  cursor: pointer;
}
.addon-toggle .check {
  position: relative;
  width: 1.25rem; height: 1.25rem;
  border-radius: 0.25rem;
  border: 2px solid var(--muted-foreground);
  margin-top: 0.125rem;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.addon-toggle .title { display: block; font-weight: 600; font-size: 0.875rem; }
.addon-toggle .subtitle { display: block; font-size: 0.75rem; color: var(--muted-foreground); margin-top: 0.125rem; }

#car-window-toggle:checked ~ .lockbox-grid .addon-toggle {
  border-color: var(--primary);
  background: rgba(41,44,51,0.03);
}
#car-window-toggle:checked ~ .lockbox-grid .addon-toggle .check {
  background: var(--primary);
  border-color: var(--primary);
}
#car-window-toggle:checked ~ .lockbox-grid .addon-toggle .check::after {
  content: "";
  position: absolute;
  left: 0.3125rem;
  top: 0.125rem;
  width: 0.3125rem;
  height: 0.625rem;
  border: solid var(--primary-foreground);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.coming-soon {
  margin-top: 2rem;
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--border);
}

/* -------------------------------------------------- Footer -------------------------------------------------- */

.site-footer { background: var(--background); border-top: 1px solid var(--border); padding: 3.5rem 0; }
.footer-grid { display: grid; gap: 2.5rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }

.footer-grid img { height: 2.25rem; width: auto; }
.footer-grid .about-text { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); max-width: 20rem; line-height: 1.625; }

.footer-grid h4 {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.footer-links { display: flex; flex-direction: column; gap: 0.625rem; }
.footer-links a { font-size: 0.875rem; color: rgba(23,24,27,0.7); transition: color 0.15s ease; }
.footer-links a:hover { color: var(--foreground); }

.footer-contact { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-contact a, .footer-contact span {
  display: flex; align-items: flex-start; gap: 0.625rem;
  font-size: 0.875rem; color: rgba(23,24,27,0.7);
}
.footer-contact a:hover { color: var(--foreground); }
.footer-contact svg { width: 1rem; height: 1rem; margin-top: 0.125rem; flex-shrink: 0; }

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-bottom p { margin: 0; font-size: 0.75rem; color: var(--muted-foreground); }
.footer-bottom button {
  margin-top: 0.5rem;
  background: none; border: none; cursor: pointer;
  font-size: 0.75rem; color: var(--muted-foreground);
  text-decoration: underline; text-underline-offset: 2px;
}

/* -------------------------------------------------- Register interest page -------------------------------------------------- */

.form-page { padding: 8rem 1.5rem 5rem; max-width: 32rem; margin: 0 auto; }
.form-page h1 { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 0.5rem; }
.form-page .product-name { color: var(--accent); font-weight: 600; }
.form-page form { margin-top: 2rem; display: flex; flex-direction: column; gap: 1.25rem; }
.form-page label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.375rem; }
.form-page input, .form-page textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 1rem;
}
.form-page input:focus, .form-page textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.form-page .btn { margin-top: 0.5rem; }
.form-success {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: rgba(235,168,46,0.1);
  color: var(--accent-foreground);
  font-size: 0.9375rem;
}
.form-error {
  margin-top: 1.5rem;
  padding: 1rem;
  border-radius: 0.5rem;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.9375rem;
}
.form-page .field-error {
  display: block;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: #b91c1c;
}
.form-page input.invalid, .form-page textarea.invalid {
  border-color: #b91c1c;
}
.form-page .back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: none;
}
.form-page .back-link:hover { text-decoration: underline; }
.form-page .required { color: #b91c1c; }
