/* ==========================================================================
   Phyllume — preliminary landing page
   ========================================================================== */

:root {
  /* Brand colours (sampled from logo) */
  --ink: #1f2a2e;
  --ink-soft: #4a5659;
  --muted: #7a8588;
  --blue: #1f5a8a;
  --cyan: #2fa9cf;
  --green: #3f8a2a;
  --rust: #b5532a;

  --bg: #fbfcfb;
  --surface: #ffffff;
  --line: #dfe5e3;
  --line-strong: #c4cdca;

  --font-sans: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "EB Garamond", Georgia, "Times New Roman", serif;

  --container: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 76px;

  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 500; }

em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  z-index: 100;
}
.skip-link:focus { top: 8px; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.nav__brand img {
  height: 52px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.95rem;
  font-weight: 400;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color .2s ease;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }

.tag {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

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

.btn {
  display: inline-block;
  padding: 11px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 400;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { background: var(--blue); border-color: var(--blue); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

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

.eyebrow {
  margin-bottom: 18px;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  padding-block: clamp(56px, 10vw, 120px);
  scroll-margin-top: var(--header-h);
}

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  font-weight: 400;
}

.hero h1 em {
  display: block;
  margin-top: .15em;
  color: var(--blue);
}

.lede {
  max-width: 34em;
  margin-top: 24px;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__art { margin: 0; }
.hero__art img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid var(--line);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section {
  padding-block: clamp(64px, 10vw, 112px);
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--header-h);
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: clamp(32px, 5vw, 56px);
}

.section__head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  font-weight: 400;
}

/* About */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
}

.about__copy p {
  font-size: 1.1rem;
  color: var(--ink-soft);
}
.about__copy strong { color: var(--ink); }

.pillars {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.pillars li {
  display: grid;
  grid-template-columns: 48px 1fr;
  column-gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.pillars svg {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--green);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pillars li:nth-child(2) svg { stroke: var(--blue); }
.pillars li:nth-child(3) svg { stroke: var(--rust); }

.pillars h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.pillars p {
  font-size: 0.98rem;
  color: var(--ink-soft);
}

/* Products — coming soon */
.soon {
  position: relative;
  max-width: 720px;
  padding: clamp(28px, 5vw, 48px);
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
}

.soon__title {
  font-size: clamp(1.3rem, 2.4vw, 1.6rem);
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink);
}

.soon p:not(.eyebrow):not(.soon__title) { color: var(--ink-soft); }
.soon .btn { margin-top: 12px; }

/* Contact */
.contact__lede {
  max-width: 34em;
  font-size: 1.15rem;
  color: var(--ink-soft);
}

.contact__email {
  display: inline-block;
  margin-top: 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: border-color .2s ease, color .2s ease;
}
.contact__email:hover { color: var(--blue); border-color: var(--blue); }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 28px;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

.footer__tag {
  font-family: var(--font-serif);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   Hovering drone (decorative)
   Horizontal and vertical drift run on separate, unequal timers so the
   flight path wanders instead of visibly repeating.
   -------------------------------------------------------------------------- */

.drone {
  --drone-w: 130px;
  --drone-h: 115px;
  position: fixed;
  inset: calc(var(--header-h) + 12px) 12px 12px;
  z-index: 40; /* above content, below the sticky header */
  pointer-events: none;
}

/* Each track is the free space on its axis, so 100% is the far edge. */
.drone__x,
.drone__y { position: absolute; inset: 0; }

.drone__x {
  right: var(--drone-w);
  animation: drone-x 24s ease-in-out -15s infinite alternate;
}

.drone__y {
  bottom: var(--drone-h);
  animation: drone-y 17s ease-in-out -3s infinite alternate;
}

.drone__craft {
  width: var(--drone-w);
  max-width: none;
  height: var(--drone-h);
  overflow: visible;
  transform-origin: 50% 20%;
  /* Twice the drone-x duration and delay-matched: leans into its travel. */
  animation: drone-tilt 48s ease-in-out -15s infinite;
}

.drone__body {
  fill: var(--blue);
  animation: drone-bob 2.6s ease-in-out infinite alternate;
}

.drone__beam {
  transform-origin: 130px 66px;
  animation: drone-scan 5s ease-in-out infinite alternate;
}

.drone__rotor {
  transform-box: fill-box;
  transform-origin: center;
  animation: drone-rotor .16s linear infinite alternate;
}

@keyframes drone-x { to { transform: translateX(100%); } }
@keyframes drone-y { to { transform: translateY(100%); } }
@keyframes drone-bob { from { transform: translateY(-3px); } to { transform: translateY(3px); } }
@keyframes drone-scan { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
@keyframes drone-rotor { to { transform: scaleX(.55); } }
@keyframes drone-tilt {
  0%, 50%, 100% { transform: rotate(0); }
  25% { transform: rotate(7deg); }
  75% { transform: rotate(-7deg); }
}

@media (prefers-reduced-motion: reduce) {
  .drone { display: none; }
}

@media print {
  .drone { display: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .hero,
  .about { grid-template-columns: 1fr; }

  .hero__art { order: -1; }
}

@media (max-width: 640px) {
  :root { --header-h: 112px; }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-block: 10px;
  }

  .nav__brand img { height: 44px; }

  .hero { padding-block: 32px 56px; gap: 24px; }

  .drone { --drone-w: 84px; --drone-h: 74px; }

  .nav__links { gap: 20px; }
  .nav__links a { font-size: 0.9rem; }
  .tag { font-size: 0.6rem; padding: 0 6px; }
}
