/* ============================================================
   OFFROAD ENERGY — modern static site
   No frameworks. Custom properties + grid/flex + clamp().
   ============================================================ */

@font-face { font-family: 'Rubik'; src: url('../../fonts/regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Rubik'; src: url('../../fonts/500.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Rubik'; src: url('../../fonts/700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Rubik'; src: url('../../fonts/900.ttf') format('truetype'); font-weight: 900; font-display: swap; }

:root {
  --blue: #27aae0;
  --blue-deep: #149dcc;
  --bg: #0b0d0f;
  --bg-panel: #14181c;
  --bg-card: #1a2026;
  --line: #2a3239;
  --text: #e8edf1;
  --text-dim: #9fb0bc;
  --radius: 14px;
  --font: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --maxw: 1200px;
  --shadow: 0 10px 40px rgb(0 0 0 / .45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: #5cc4ec; }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2.5rem); }

h1, h2, h3 { line-height: 1.15; font-weight: 900; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 700; }
.kicker {
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 700;
  font-size: .85rem;
  margin-bottom: .75rem;
}
.lead { color: var(--text-dim); font-size: clamp(1rem, 1.8vw, 1.25rem); max-width: 60ch; }

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgb(11 13 15 / .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .75rem; font-weight: 900; letter-spacing: .04em; color: var(--text); font-size: 1.05rem; }
.brand img { width: 44px; height: auto; }
.brand span b { color: var(--blue); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .5rem;
}
.nav-toggle span {
  display: block; width: 26px; height: 3px; margin: 5px 0;
  background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.site-nav ul { display: flex; gap: .25rem; list-style: none; align-items: center; }
.site-nav a {
  display: block; padding: .55rem .9rem; border-radius: 8px;
  color: var(--text); font-weight: 500; font-size: .95rem;
}
.site-nav a:hover { background: var(--bg-card); color: var(--blue); }
.site-nav a[aria-current="page"] { color: var(--blue); }
.site-nav .tag {
  font-size: .6rem; background: var(--blue); color: #04121a;
  padding: .1rem .4rem; border-radius: 99px; vertical-align: super; font-weight: 700;
}

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; inset: 100% 0 auto 0;
    background: var(--bg-panel); border-bottom: 1px solid var(--line);
    display: none; padding: .75rem 1rem 1.25rem;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; display: grid; place-items: center; text-align: center;
  min-height: min(88vh, 820px); padding-block: clamp(4rem, 10vw, 7rem);
  isolation: isolate; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgb(11 13 15 / .55), rgb(11 13 15 / .88));
}
.hero .logo { width: clamp(120px, 20vw, 200px); margin-inline: auto; filter: drop-shadow(0 8px 30px rgb(0 0 0 / .6)); }
.hero p.tagline { color: var(--text-dim); font-size: clamp(1.05rem, 2vw, 1.4rem); max-width: 46ch; margin: 1rem auto 2rem; }

.btn {
  display: inline-block; padding: .85rem 1.9rem; border-radius: 99px;
  font-weight: 700; font-size: 1rem; border: 0; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.btn-primary { background: var(--blue); color: #04121a; box-shadow: 0 6px 24px rgb(39 170 224 / .35); }
.btn-primary:hover { transform: translateY(-2px); color: #04121a; box-shadow: 0 10px 30px rgb(39 170 224 / .5); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Banner sections (photo background) ---------- */
.banner {
  position: relative; isolation: isolate; overflow: hidden;
  background-size: cover; background-position: center;
}
@media (min-width: 900px) { .banner { background-attachment: fixed; } }
.banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgb(0 0 0 / .68); }

/* ---------- Split feature ---------- */
.split { display: grid; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
@media (min-width: 800px) { .split { grid-template-columns: 1fr 1fr; } .split.rev > :first-child { order: 2; } }
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Spec grid ---------- */
.spec-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 2.5rem; }
.spec {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.spec h3 { color: var(--blue); font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .5rem; }
.spec p { color: var(--text-dim); font-size: .95rem; }

/* ---------- Pricing ---------- */
.pricing { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); max-width: 900px; margin: 2.5rem auto 0; }
.plan {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2.25rem 2rem; text-align: center; display: flex; flex-direction: column; gap: 1.25rem;
  transition: transform .2s, border-color .2s;
}
.plan:hover { transform: translateY(-4px); border-color: var(--blue); }
.plan .model { color: var(--text-dim); font-size: .85rem; letter-spacing: .1em; }
.plan .price { font-size: clamp(2.6rem, 5vw, 3.4rem); font-weight: 900; line-height: 1; }
.plan .price small { font-size: 1rem; font-weight: 500; color: var(--text-dim); display: block; margin-top: .4rem; }
.plan ul { list-style: none; color: var(--text-dim); font-size: .95rem; display: grid; gap: .6rem; }
.plan ul li strong { color: var(--text); }
.plan .btn { margin-top: auto; }

/* ---------- Video (click-to-load) ---------- */
.video-embed {
  position: relative; aspect-ratio: 16 / 9; max-width: 960px; margin-inline: auto;
  border-radius: var(--radius); overflow: hidden; background: #000 center/cover no-repeat;
  cursor: pointer; box-shadow: var(--shadow); border: 0; width: 100%; padding: 0; display: block;
}
.video-embed .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgb(0 0 0 / .35); transition: background .2s;
}
.video-embed:hover .play { background: rgb(0 0 0 / .15); }
.video-embed .play::before {
  content: ""; width: 84px; height: 84px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2304121a'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/38px no-repeat;
  box-shadow: 0 8px 30px rgb(39 170 224 / .5);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Galleries ---------- */
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 2.5rem; }
.gallery a, .gallery button {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--bg-card); cursor: pointer; padding: 0;
}
.gallery img { width: 100%; height: 220px; object-fit: cover; transition: transform .3s; }
.gallery a:hover img, .gallery button:hover img { transform: scale(1.05); }
.gallery figcaption, .gallery .cap {
  position: absolute; inset: auto 0 0 0; padding: .6rem .9rem;
  background: linear-gradient(transparent, rgb(0 0 0 / .85));
  color: #fff; font-size: .85rem; text-align: left;
}
.gallery .is-video::after {
  content: "▶"; position: absolute; top: .75rem; right: .75rem;
  background: var(--blue); color: #04121a; width: 34px; height: 34px;
  display: grid; place-items: center; border-radius: 50%; font-size: .8rem;
}

/* Lightbox */
dialog.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(94vw, 1200px);
}
dialog.lightbox::backdrop { background: rgb(0 0 0 / .88); backdrop-filter: blur(4px); }
dialog.lightbox img { max-height: 86vh; width: auto; max-width: 100%; margin-inline: auto; border-radius: var(--radius); }
dialog.lightbox .lb-close {
  position: fixed; top: 1rem; right: 1.25rem; background: var(--bg-card); color: var(--text);
  border: 1px solid var(--line); border-radius: 50%; width: 44px; height: 44px;
  font-size: 1.3rem; cursor: pointer; line-height: 1;
}

/* ---------- Cards (mission page) ---------- */
.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.75rem;
}
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--text-dim); }

/* ---------- Contact form ---------- */
.contact-form { max-width: 720px; margin-inline: auto; display: grid; gap: 1rem; }
.contact-form .row2 { display: grid; gap: 1rem; }
@media (min-width: 640px) { .contact-form .row2 { grid-template-columns: 1fr 1fr; } }
.contact-form input, .contact-form textarea {
  width: 100%; padding: .9rem 1.1rem; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--text);
  font: inherit; transition: border-color .15s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 0; border-color: var(--blue); }
.contact-form textarea { min-height: 160px; resize: vertical; }
.form-alert { display: none; padding: .9rem 1.1rem; border-radius: 10px; font-weight: 500; }
.form-alert.show { display: block; }
.form-alert.ok { background: rgb(46 160 67 / .15); border: 1px solid #2ea043; color: #7ee2a8; }
.form-alert.err { background: rgb(248 81 73 / .15); border: 1px solid #f85149; color: #ffa198; }

/* ---------- Community placeholder ---------- */
.soon-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 2.5rem; }
.soon-grid .card { text-align: center; }
.soon-grid .card .icon { font-size: 2.2rem; margin-bottom: .75rem; }
.badge-soon {
  display: inline-block; background: var(--bg-card); border: 1px solid var(--blue);
  color: var(--blue); border-radius: 99px; padding: .25rem .9rem; font-size: .8rem;
  font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); background: var(--bg-panel);
  padding-block: 2.5rem; margin-top: 2rem;
}
.footer-wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.footer-wrap p { color: var(--text-dim); font-size: .85rem; max-width: 60ch; }
.social { display: flex; gap: .75rem; list-style: none; }
.social a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: .8rem;
}
.social a:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
