/* Fonts are self-hosted so no visitor data goes to Google (GDPR) */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(assets/fonts/inter.woff2) format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 500 700; font-display: swap; src: url(assets/fonts/montserrat.woff2) format("woff2"); }

/* =========================================================
   BRAND TOKENS — taken from the Clover Rotors logo
   (leaf greens, charcoal drone, grey "ROTORS").
   ========================================================= */
:root {
  --accent: #6a9233;          /* logo dark leaf */
  --accent-2: #8db548;        /* logo light leaf */
  --accent-text: #557827;     /* darker leaf for small text on white (AA contrast) */
  --accent-ink: #ffffff;      /* text on accent buttons */
  --charcoal: #333333;        /* logo drone */
  --grey: #555555;            /* logo "ROTORS" */

  --bg: #ffffff;
  --bg-alt: #f5f7f1;
  --surface: #ffffff;
  --line: #e2e7da;
  --text: #2a2c28;
  --muted: #61675e;
  --dark: #1f221d;            /* hero, lightbox, media tiles */

  --radius: 14px;
  --font-body: "Inter", system-ui, sans-serif;
  --font-head: "Montserrat", "Inter", system-ui, sans-serif;
  --nav-h: 72px;
  --nav-bg: rgb(255 255 255 / .92);
  color-scheme: light;
}

/* Dark theme: chosen with the toggle in the nav (saved per browser), else follows the device setting */
:root[data-theme="dark"] {
  --accent-text: #a3c96b;     /* light leaf: readable on dark */
  --grey: #c8ccc4;
  --bg: #111310;
  --bg-alt: #171a16;
  --surface: #1b1f1a;
  --line: #2a3028;
  --text: #ecefe9;
  --muted: #a3ab9f;
  --nav-bg: rgb(17 19 16 / .88);
  color-scheme: dark;
}
.mark-light { display: none; }
[data-theme="dark"] .mark-dark { display: none; }
[data-theme="dark"] .mark-light { display: block; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0 0 .5em; letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.eyebrow { color: var(--accent-text); font: 600 .8rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .85em 1.5em; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink);
  font: 600 .95rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); background: var(--accent-text); border-color: var(--accent-text); box-shadow: 0 10px 30px -12px var(--accent); }
.btn--ghost { background: transparent; color: #fff; border-color: rgb(255 255 255 / .45); }
.btn--ghost:hover { background: rgb(255 255 255 / .1); border-color: #fff; box-shadow: none; }
.btn--sm { padding: .6em 1.1em; font-size: .9rem; }
.btn--block { width: 100%; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  background: var(--nav-bg); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.nav.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgb(0 0 0 / .4); }
.nav__inner { height: 100%; display: flex; align-items: center; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; font: 600 1.05rem var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--grey); }
.brand img { height: 40px; width: auto; }
.brand b { color: var(--accent); font-weight: 600; }
.nav__menu { display: flex; align-items: center; gap: 2rem; margin-left: auto; }
.theme-toggle {
  order: 2; margin-left: 1.25rem; width: 40px; height: 40px; display: grid; place-items: center; flex: none;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent-text); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.theme-toggle .moon, [data-theme="dark"] .theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .moon { display: block; }
.nav__menu a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; transition: color .2s; }
.nav__menu a:not(.btn):hover { color: var(--text); }
.nav__toggle { order: 3; display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav__toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .3s; }

@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .theme-toggle { margin-left: auto; margin-right: 4px; }
  .nav__menu {
    position: fixed; inset: var(--nav-h) 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 20px;
    transform: translateY(calc(-100% - var(--nav-h))); visibility: hidden;
    transition: transform .35s ease, visibility .35s; z-index: -1;
  }
  .nav__menu a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav__menu .btn { margin-top: 16px; }
  .nav.is-open { background: var(--bg); }
  .nav.is-open .nav__menu { transform: none; visibility: visible; }
  .nav.is-open .nav__toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
}

/* Hero */
.hero { color: #fff; background: var(--dark); position: relative; min-height: 100svh; display: grid; align-items: end; overflow: hidden; padding-bottom: 14vh; }
.hero__media {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  /* fallback shown until assets/hero.mp4 exists */
  background: radial-gradient(1200px 600px at 75% 20%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 60%),
              radial-gradient(900px 500px at 10% 90%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 60%),
              linear-gradient(160deg, #263020, var(--dark));
}
.hero__shade { position: absolute; inset: 0; background:
  linear-gradient(to right, rgb(20 22 18 / .75), rgb(20 22 18 / .35) 55%, transparent 80%),
  linear-gradient(to top, rgb(20 22 18 / .85), rgb(20 22 18 / .2) 55%, rgb(20 22 18 / .1)); }
.hero h1, .hero .lede, .hero .eyebrow { text-shadow: 0 2px 24px rgb(0 0 0 / .35); }
.hero__content { position: relative; }
.hero h1 { font-size: clamp(2.8rem, 8vw, 6.2rem); max-width: 14ch; margin-bottom: .35em; }
.hero .eyebrow { color: rgb(255 255 255 / .9); }
.hero h1 em { font-style: normal; color: var(--accent-2); }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgb(255 255 255 / .82); max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.hero__scroll { position: absolute; left: 50%; bottom: 28px; width: 26px; height: 42px; border: 2px solid rgb(255 255 255 / .4); border-radius: 20px; translate: -50% 0; }
.hero__scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; background: #fff; border-radius: 2px; translate: -50% 0; animation: scroll 1.8s infinite; }
@keyframes scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Strip */
.strip { border-block: 1px solid var(--line); background: var(--bg-alt); }
.strip__inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip__inner div { padding: 28px 16px; text-align: center; }
.strip__inner div + div { border-left: 1px solid var(--line); }
.strip strong { display: block; font: 700 1.6rem var(--font-head); color: var(--text); }
.strip span { color: var(--muted); font-size: .9rem; }
@media (max-width: 760px) {
  .strip__inner { grid-template-columns: repeat(2, 1fr); }
  .strip__inner div:nth-child(3) { border-left: 0; }
  .strip__inner div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* Sections */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.section__head h2 { margin: 0; }
.section__note { color: var(--muted); max-width: 40ch; margin: 0; }

/* Filters */
.filters { display: inline-flex; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; }
.filter { background: none; border: 0; color: var(--muted); padding: .55em 1.2em; border-radius: 999px; font: 500 .9rem var(--font-body); cursor: pointer; transition: background .2s, color .2s; }
.filter:hover { color: var(--text); }
.filter.is-active { background: var(--text); color: var(--bg); }

/* Gallery grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; grid-auto-flow: dense; gap: 16px; }
.tile {
  position: relative; overflow: hidden; border-radius: var(--radius); border: 0; padding: 0;
  background: var(--dark); cursor: pointer; text-align: left; color: #fff;
  animation: fade .4s ease both;
}
.tile--wide { grid-column: span 2; }
.tile--tall { grid-row: span 2; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile:hover img, .tile:hover video { transform: scale(1.05); }
.tile__meta {
  position: absolute; inset: auto 0 0; padding: 18px; display: flex; justify-content: space-between; align-items: end; gap: 12px;
  background: linear-gradient(to top, rgb(0 0 0 / .75), transparent);
}
.tile__title { font: 600 1.05rem var(--font-head); }
.tile__tag { font-size: .8rem; color: rgb(255 255 255 / .7); }
.tile__badge {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: rgb(255 255 255 / .14); backdrop-filter: blur(6px); transition: background .2s, color .2s;
}
.tile:hover .tile__badge { background: var(--accent); color: var(--accent-ink); }
.tile__badge svg { width: 16px; height: 16px; fill: currentColor; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; } }
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .tile--wide { grid-column: auto; }
  .tile--tall { grid-row: auto; }
}

/* Placeholder look for missing media (also used on the about photo) */
.ph {
  background-color: var(--surface);
  background-size: cover; background-position: center;
}
.ph:empty::after, .tile.is-ph::before {
  content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center;
  font: 600 .75rem var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.tile.is-ph::before { color: rgb(255 255 255 / .55); }
.tile.is-ph {
  background:
    repeating-linear-gradient(135deg, transparent 0 18px, rgb(255 255 255 / .025) 18px 36px),
    linear-gradient(140deg, color-mix(in srgb, var(--accent) calc(var(--h, 20) * 1.6%), var(--dark)), var(--dark));
}

/* Service cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--surface); box-shadow: 0 1px 2px rgb(0 0 0 / .04); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: border-color .25s, transform .25s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); transform: translateY(-4px); }
.card__icon { width: 40px; height: 40px; padding: 8px; border-radius: 10px; margin-bottom: 20px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; background: color-mix(in srgb, var(--accent) 12%, transparent); }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }
@media (max-width: 1000px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }

/* Fleet */
.fleet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.drone { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s, border-color .25s; }
.drone:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.drone__media { position: relative; aspect-ratio: 4 / 3; background-color: var(--bg-alt); border-bottom: 1px solid var(--line); }
.drone__body { padding: 24px; }
.drone__type { color: var(--accent-text); font: 600 .75rem var(--font-body); letter-spacing: .12em; text-transform: uppercase; margin-bottom: .5rem; }
.drone p { color: var(--muted); font-size: .95rem; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: .78rem; font-weight: 500; padding: .3em .75em; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); color: var(--text); }
@media (max-width: 900px) { .fleet { grid-template-columns: 1fr; max-width: 520px; } }
.credit { margin: 16px 0 0; font-size: .78rem; color: var(--muted); }

/* About */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about__media { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); border: 1px solid var(--line); }
.about p { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .7rem; }
.ticks li { padding-left: 1.8rem; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1rem; height: .55rem; border: solid var(--accent); border-width: 0 0 2px 2px; rotate: -45deg; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } .about__media { width: min(100%, 420px); } }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact > div > p { color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 2rem 0; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; column-gap: 14px; }
.steps li::before { content: counter(s); grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); color: var(--accent); font: 600 .9rem var(--font-head); }
.steps span { color: var(--muted); font-size: .95rem; }
.contact__direct a { color: var(--accent-text); text-decoration: none; font-weight: 500; }
.contact__direct a:hover { text-decoration: underline; }

.form { box-shadow: 0 20px 50px -30px rgb(0 0 0 / .25); background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: clamp(20px, 4vw, 36px); display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-size: .85rem; font-weight: 500; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%; padding: .8em .9em; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-alt); color: var(--text); font: 400 1rem var(--font-body);
  transition: border-color .2s, box-shadow .2s;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.form .is-invalid { border-color: #d64545; }
.form__hint { margin: 0; font-size: .85rem; color: var(--muted); text-align: center; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .form__row { grid-template-columns: 1fr; } }

/* Privacy page */
.legal { padding-top: calc(var(--nav-h) + 48px); }
.legal .wrap { max-width: 760px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal h2 { font-size: 1.3rem; margin-top: 2.2em; }
.legal p { color: var(--muted); }
.legal a { color: var(--accent-text); }
.legal strong { color: var(--text); }
.legal__updated { font-size: .9rem; }
.form__hint a { color: var(--accent-text); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: .9rem; }
.footer .brand img { height: 32px; }
.footer__inner { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.footer p { margin: 0; }
.footer a:not(.brand) { color: inherit; }
.footer a:not(.brand):hover { color: var(--accent-text); }

/* Lightbox */
.lightbox { width: min(1100px, 100% - 32px); max-height: 92vh; padding: 0; border: 0; border-radius: var(--radius); background: #000; color: #fff; overflow: visible; }
.lightbox::backdrop { background: rgb(0 0 0 / .85); backdrop-filter: blur(6px); }
.lightbox[open] { animation: fade .25s ease; }
.lightbox__body { aspect-ratio: 16 / 9; display: grid; place-items: center; border-radius: var(--radius); overflow: hidden; }
.lightbox.is-portrait { width: min(calc(82vh * 9 / 16), 100% - 32px); }
.lightbox.is-portrait .lightbox__body { aspect-ratio: 9 / 16; }
.lightbox__body img, .lightbox__body video { width: 100%; height: 100%; object-fit: contain; }
.lightbox__body .is-ph { width: 100%; height: 100%; position: relative; }
.lightbox__caption { position: absolute; left: 0; top: 100%; margin: 12px 0 0; color: rgb(255 255 255 / .75); }
.lightbox__close { position: absolute; right: 0; bottom: 100%; margin-bottom: 8px; background: none; border: 0; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Phones: roomier tap targets and a readable tagline */
@media (max-width: 760px) {
  .eyebrow { line-height: 1.5; }
  .filter { padding: .8em 1.25em; }
  .contact__direct a { display: inline-block; padding: .6em 0; }
  .footer a:not(.brand), .form__hint a { display: inline-block; padding: .55em .2em; }
}
