/* Polyproject – Tesla-inspired layout */
:root {
  --ink: #171a20;
  --ink-2: #393c41;
  --muted: #5c5e62;
  --line: #e2e3e3;
  --bg: #ffffff;
  --bg-soft: #f4f4f4;
  --brand: #066cb5;
  --brand-dark: #05589a;
  --radius: 4px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; }

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 var(--gutter);
}
.site-header.solid { position: sticky; top: 0; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); }
.logo img { height: 26px; width: auto; }
.on-dark .logo img { filter: brightness(0) invert(1); }

.nav { display: flex; gap: 4px; }
.nav a, .menu-btn {
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius);
  color: var(--ink);
  transition: background .25s;
}
.nav a:hover, .menu-btn:hover { background: rgba(0,0,0,.06); }
.nav a[aria-current="page"] { background: rgba(0,0,0,.06); }
.on-dark .nav a, .on-dark .menu-btn { color: #fff; }
.on-dark .nav a:hover, .on-dark .menu-btn:hover, .on-dark .nav a[aria-current="page"] { background: rgba(255,255,255,.15); }

.menu-btn { display: none; background: none; border: 0; cursor: pointer; font-family: inherit; }

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0 0 0 auto;
  width: min(320px, 100%);
  background: #fff;
  z-index: 40;
  padding: 72px 24px 24px;
  transform: translateX(100%);
  transition: transform .3s ease;
}
.drawer a { display: block; padding: 10px 12px; border-radius: var(--radius); text-decoration: none; font-weight: 500; }
.drawer a:hover { background: var(--bg-soft); }
.drawer .close { position: absolute; top: 14px; right: 16px; background: none; border: 0; font-size: 28px; cursor: pointer; line-height: 1; color: var(--ink); }
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); backdrop-filter: blur(4px); z-index: 30; opacity: 0; pointer-events: none; transition: opacity .3s; }
body.menu-open .drawer { transform: none; }
body.menu-open .backdrop { opacity: 1; pointer-events: auto; }

@media (max-width: 860px) {
  .nav { display: none; }
  .menu-btn { display: inline-block; background: rgba(0,0,0,.06); }
  .on-dark .menu-btn { background: rgba(255,255,255,.15); }
}

/* ---------- Buttons ---------- */
.btns { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 220px; height: 40px; padding: 0 24px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 500;
  text-decoration: none; border: 0; cursor: pointer; font-family: inherit;
  transition: background .25s, box-shadow .25s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-light { background: rgba(244,244,244,.9); color: var(--ink); }
.btn-light:hover { background: #fff; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 3px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
@media (max-width: 520px) { .btns { flex-direction: column; width: 100%; } .btn { width: 100%; } }

/* ---------- Photos ----------
   Set the image with an inline background-image; it always covers its box. */
.photo { position: relative; overflow: hidden; background: #222 center / cover no-repeat; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; min-height: 560px; color: #fff; }
.hero .photo { position: absolute; inset: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,.2) 65%, rgba(0,0,0,.65) 100%);
}
.hero-inner {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  text-align: center; padding: 18vh var(--gutter) 64px;
}
.hero h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 500; letter-spacing: -.01em; line-height: 1.15; }
.hero p { margin-top: 8px; font-size: clamp(15px, 1.6vw, 18px); opacity: .92; }
.hero .scroll { margin-top: 24px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .8; text-decoration: none; }
.hero .scroll::after { content: ""; display: block; width: 10px; height: 10px; margin: 8px auto 0; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg); animation: bob 2s infinite; }
@keyframes bob { 50% { transform: translateY(5px) rotate(45deg); } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 120px) var(--gutter); }
.section.soft { background: var(--bg-soft); }
.section.dark { background: var(--ink); color: #fff; }
.container { max-width: var(--max); margin: 0 auto; }
.center { text-align: center; }
.eyebrow { font-size: 14px; font-weight: 500; color: var(--brand); margin-bottom: 12px; }
.dark .eyebrow { color: #7fb8e6; }
h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 500; letter-spacing: -.01em; line-height: 1.2; }
h3 { font-size: 20px; font-weight: 500; line-height: 1.3; }
.lead { font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); max-width: 680px; margin: 16px auto 0; }
.dark .lead { color: #c9cacc; }
.center .btns { margin-top: 32px; }
.center h2 { text-wrap: balance; }

/* Stats row */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 64px; }
.stat { text-align: center; }
.stat .num { font-size: clamp(36px, 5vw, 56px); font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.stat .num small { font-size: .45em; font-weight: 500; margin-left: 4px; }
.stat .label { margin-top: 10px; font-size: 14px; color: var(--muted); }
@media (max-width: 640px) { .stats { grid-template-columns: 1fr; gap: 40px; } }

/* Split media/text */
.split {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: clamp(32px, 4vw, 64px);
  max-width: calc(1440px + 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(24px, 4vw, 48px) var(--gutter);
}
.split .photo { aspect-ratio: 16 / 10; border-radius: 12px; }
.split .text { display: flex; flex-direction: column; justify-content: center; }
.split .text p { color: var(--muted); margin-top: 16px; max-width: 480px; }
.split.reverse { grid-template-columns: 1fr 1.15fr; }
.split.reverse .photo { order: 2; }
.split .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip { font-size: 13px; padding: 6px 12px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); }
.split .btns { justify-content: flex-start; margin-top: 32px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 28px; padding-bottom: 48px; }
  .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .photo { order: 0; }
  .split .photo { aspect-ratio: 4 / 3; }
}

/* Feature: heading + text with a wide image below */
.feature {
  max-width: calc(1440px + 2 * var(--gutter)); margin: 0 auto;
  padding: clamp(64px, 8vw, 104px) var(--gutter) clamp(24px, 4vw, 48px);
}
.feature p { margin-top: 20px; color: var(--ink-2); font-size: 15px; max-width: 1100px; }
.feature img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-top: 40px; background: #222; }
@media (max-width: 860px) { .feature img { aspect-ratio: 4 / 3; } }

/* Product grid */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 56px; text-align: left; }
.grid4 > div { background: #fff; padding: 32px 28px; }
.grid4 h3 { font-size: 17px; margin-bottom: 16px; }
.grid4 li { font-size: 14px; color: var(--muted); padding: 6px 0; border-top: 1px solid var(--line); }
@media (max-width: 960px) { .grid4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid4 { grid-template-columns: 1fr; } }

/* Full-bleed banner */
.banner {
  position: relative; height: 75vh; min-height: 480px; color: #fff; display: flex; align-items: flex-end;
  width: calc(100% - 2 * var(--gutter)); max-width: var(--max); margin: clamp(24px, 4vw, 48px) auto;
  border-radius: 12px; overflow: hidden;
}
.banner .photo { position: absolute; inset: 0; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.75), rgba(0,0,0,0) 60%); }
.banner .text { position: relative; z-index: 2; padding: 0 clamp(24px, 4vw, 56px) clamp(32px, 5vw, 56px); max-width: 720px; }
.banner p { margin-top: 12px; opacity: .9; }
.banner .btns { justify-content: flex-start; margin-top: 28px; }

/* FAQ */
.faq { max-width: 820px; margin: 48px auto 0; text-align: left; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; font-size: 17px; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 28px; width: 9px; height: 9px; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 32px; }
.faq details p { padding: 0 0 22px; color: var(--muted); }

/* ---------- Contact page ---------- */
.page-head { padding: clamp(56px, 9vw, 104px) var(--gutter) 24px; text-align: center; }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 500; letter-spacing: -.01em; }

.locations { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.location { border-radius: 8px; overflow: hidden; background: var(--bg-soft); }
.location .photo { aspect-ratio: 16 / 9; }
.location .body { padding: 28px; }
.location dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; margin-top: 16px; font-size: 15px; }
.location dt { color: var(--muted); }
.location dd a { text-decoration: none; }
.location dd a:hover { text-decoration: underline; }
.location .btns { justify-content: flex-start; margin-top: 24px; }
.location .btn { min-width: 0; }
@media (max-width: 760px) { .locations { grid-template-columns: 1fr; } }

.team-group { margin-top: 56px; }
.team-group h3 { font-size: 15px; color: var(--muted); font-weight: 500; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.team-group h3 b { color: var(--ink); font-weight: 500; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px 24px; margin-top: 24px; }
.person { display: flex; gap: 16px; align-items: center; }
.avatar { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: center 20%; background: #dfe7ef; color: var(--brand); display: grid; place-items: center; font-weight: 600; font-size: 20px; }
.person .name { font-weight: 500; }
.person .role { font-size: 13px; color: var(--muted); margin-top: 2px; }
.person a { display: block; font-size: 13px; text-decoration: none; color: var(--ink-2); margin-top: 2px; overflow-wrap: anywhere; }
.person a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- Footer ---------- */
.footer { padding: 40px var(--gutter) 32px; text-align: center; font-size: 12px; color: var(--muted); }
.footer ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin-bottom: 12px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }
