/*
Theme Name: Off The Grid
Theme URI: https://offthegrid-bg.com/
Author: Off The Grid
Author URI: https://offthegrid-bg.com/
Description: Editorial, high-contrast WordPress theme for a small-scale wind-energy company. Serif display type, warm bone palette, monospace technical labels, scroll reveals, an animated stats band and an interactive installations map. Ships with Home, Services, Projects, About, Contact and Installations templates.
Version: 1.7.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: off-the-grid
Tags: business, portfolio, custom-logo, custom-menu, featured-images, full-width-template, sustainability
*/

/* ============================================================
   Off The Grid® — theme styles
   Editorial wind-energy site. Warm bone palette, serif display,
   grotesque UI, mono technical labels.
   ============================================================ */

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Hanken+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* color */
  --bg:        oklch(0.972 0.008 92);
  --bg-2:      oklch(0.945 0.012 88);
  --ink:       oklch(0.215 0.012 70);
  --ink-soft:  oklch(0.46 0.012 72);
  --ink-faint: oklch(0.62 0.010 78);
  --line:      oklch(0.86 0.010 85);
  --line-soft: oklch(0.90 0.008 88);
  --paper:     oklch(0.995 0.004 95);
  --accent:    oklch(0.52 0.066 150);   /* muted turbine green */
  --dark:      oklch(0.205 0.012 75);
  --dark-2:    oklch(0.255 0.012 75);
  --on-dark:   oklch(0.95 0.006 92);
  --on-dark-soft: oklch(0.72 0.010 85);

  /* type */
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans:  'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* layout */
  --maxw: 1320px;
  --gut: clamp(20px, 5vw, 64px);
  --radius: 14px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { 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(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

/* ---- Image placeholders (swap for real photos in WordPress) ---- */
.imgph {
  position: relative; width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--bg-2), var(--paper));
  overflow: hidden;
}
.imgph::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg,
    color-mix(in oklch, var(--ink) 8%, transparent) 0 1px,
    transparent 1px 13px);
}
.imgph .mk {
  position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3.4rem);
  color: color-mix(in oklch, var(--ink) 30%, transparent); line-height: 1;
}
.imgph .cap {
  position: absolute; left: 0; right: 0; bottom: 18px; text-align: center;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft); padding: 0 1rem;
}
.imgph.on-dark .mk { color: color-mix(in oklch, var(--on-dark) 35%, transparent); }
.imgph.on-dark .cap { color: var(--on-dark-soft); }
a { color: inherit; text-decoration: none; }

/* ---- Typography ---- */
.serif { font-family: var(--serif); }
.mono  { font-family: var(--mono); }

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1; }

.display {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.display em { font-style: italic; }

.h-hero  { font-size: clamp(2.7rem, 7vw, 6.2rem); line-height: 1.14; }
.h-1     { font-size: clamp(2.4rem, 6vw, 5.2rem); }
.h-2     { font-size: clamp(2rem, 4.6vw, 3.6rem); }
.h-3     { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow .dot { color: var(--accent); font-size: 1.1em; line-height: 0; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 42ch;
  font-weight: 400;
}

.muted { color: var(--ink-soft); }

/* ---- Layout ---- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gut);
}
.section { padding-block: clamp(64px, 11vw, 150px); }
.section-sm { padding-block: clamp(48px, 7vw, 90px); }

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.95em 1.6em;
  border-radius: 100px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: transform .5s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn .arrow { transition: transform .5s var(--ease); }
.btn:hover { background: transparent; color: var(--ink); }
.btn:hover .arrow { transform: translate(3px, -3px); }

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

.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-light:hover { background: transparent; color: var(--paper); border-color: var(--on-dark-soft); }

.link-underline {
  position: relative;
  font-weight: 500;
  padding-bottom: 2px;
}
.link-underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.link-underline:hover::after { transform: scaleX(1); }

/* ============================================================
   Top utility bar
   ============================================================ */
.topbar {
  background: var(--dark);
  color: var(--on-dark-soft);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  height: 38px;
  white-space: nowrap;
  overflow: hidden;
}
.topbar .up { color: var(--accent); }
.topbar .sep { opacity: 0.4; }
.topbar .grow { flex: 1; }
.topbar .lang { color: var(--on-dark); }

/* Topbar map link (replaces the ticker cluster) */
.topbar-link {
  display: inline-flex; align-items: center; gap: 0.5em;
  color: var(--on-dark); font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: color .3s var(--ease);
}
.topbar-link .dot { color: var(--accent); font-size: 1em; line-height: 0; }
.topbar-link .ar { transition: transform .4s var(--ease); display: inline-block; }
.topbar-link:hover { color: var(--accent); }
.topbar-link:hover .ar { transform: translate(2px, -2px); }

/* Language switcher */
.lang-switch { position: relative; display: inline-flex; }
.lang-switch .lang-current {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.06em;
  color: var(--on-dark); background: transparent; border: 0; cursor: pointer;
  padding: 0; display: inline-flex; align-items: center; gap: 0.35em;
}
.lang-switch .lang-current::after {
  content: "▾"; font-size: 0.8em; opacity: 0.6;
  transition: transform .25s var(--ease);
}
.lang-switch.open .lang-current::after { transform: rotate(180deg); }
.lang-switch .lang-menu {
  position: fixed; z-index: 200;
  background: var(--dark-2); border: 1px solid color-mix(in oklch, var(--on-dark) 14%, transparent);
  border-radius: 8px; padding: 4px; min-width: 150px;
  display: none; flex-direction: column; gap: 2px;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,0.6);
}
.lang-switch.open .lang-menu { display: flex; }
.lang-switch .lang-menu button {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em;
  text-align: left; color: var(--on-dark-soft); background: transparent; border: 0;
  cursor: pointer; padding: 0.5em 0.7em; border-radius: 5px; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.lang-switch .lang-menu button:hover { background: color-mix(in oklch, var(--on-dark) 10%, transparent); color: var(--on-dark); }

/* ============================================================
   Header / nav
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: color-mix(in oklch, var(--bg) 80%, transparent);
  backdrop-filter: saturate(1.2) blur(14px);
  border-bottom-color: var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  height: 78px;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 600; font-size: 1.05rem; letter-spacing: -0.01em;
  flex-shrink: 0; white-space: nowrap;
}
.brand .mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.05rem; line-height: 1;
}
.brand .brand-mark { display: block; width: auto; height: 32px; flex-shrink: 0; }
.brand .reg { font-size: 0.6em; vertical-align: super; color: var(--ink-soft); }

.nav-links { display: flex; align-items: center; gap: 2.2rem; list-style: none; margin: 0; padding: 0; }
.nav-links li { list-style: none; margin: 0; padding: 0; }
.nav-links li::marker { content: none; }
.nav-links a {
  font-size: 0.92rem; font-weight: 500; color: var(--ink-soft);
  position: relative; transition: color .3s var(--ease);
}
.nav-links a:hover,
.nav-links a.active,
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a,
.nav-links a[aria-current] { color: var(--ink); }
.nav-links a.active::after,
.nav-links .current-menu-item > a::after,
.nav-links .current_page_item > a::after,
.nav-links a[aria-current]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--accent);
}

.nav-cta { display: flex; align-items: center; gap: 0.7rem; }
.nav-cta .btn { white-space: nowrap; flex-shrink: 0; }
.btn-compact { padding: 0.7em 1.25em; font-size: 0.82rem; }
.btn .globe { width: 1em; height: 1em; display: inline-flex; flex-shrink: 0; }
.btn .globe svg { width: 100%; height: 100%; display: block; }

.burger {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line);
  border-radius: 50%; background: transparent; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.burger span { width: 16px; height: 1.5px; background: var(--ink); transition: .3s var(--ease); }
.burger.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 49;
  background: var(--bg);
  padding: 120px var(--gut) 40px;
  display: flex; flex-direction: column; gap: 0.2rem;
  transform: translateY(-100%);
  transition: transform .55s var(--ease);
  visibility: hidden;
}
.mobile-menu.open { transform: translateY(0); visibility: visible; }
.mobile-menu a {
  font-family: var(--serif); font-size: 2.6rem; line-height: 1.25;
  border-bottom: 1px solid var(--line); padding: 0.4rem 0;
}
.mobile-menu .contact-block {
  margin-top: auto; font-family: var(--mono); font-size: 0.8rem;
  color: var(--ink-soft); display: flex; flex-direction: column; gap: 0.3rem;
}

/* ============================================================
   Hero
   ============================================================ */
.hero { padding-top: clamp(40px, 6vw, 72px); }
.hero-head {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem 3rem;
  align-items: end; margin-bottom: clamp(32px, 4vw, 56px);
}
.hero-head h1 { margin-bottom: 0.12em; }
.hero-head .lead { justify-self: end; }
.hero-img {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 16 / 8.2;
}
.hero-img img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.05); transition: transform 1.4s var(--ease);
}
.hero.revealed .hero-img img { transform: scale(1); }
.hero-tag {
  position: absolute; left: 20px; bottom: 20px;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em;
  color: var(--on-dark); background: color-mix(in oklch, var(--dark) 55%, transparent);
  backdrop-filter: blur(8px); padding: 0.5em 0.9em; border-radius: 100px;
}

/* ============================================================
   Feature / "Sustainable Technology"
   ============================================================ */
.feature-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px);
  align-items: center;
}
.feature-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3.4;
}
.feature-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.feature-card:hover img { transform: scale(1.04); }
.feature-card .overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: flex-end; padding: clamp(20px, 3vw, 36px);
  background: linear-gradient(transparent 40%, color-mix(in oklch, var(--dark) 70%, transparent));
  color: var(--on-dark);
}
.feature-card .overlay .serif { font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.05; }
.pill-link {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1rem;
  width: max-content;
}
.pill-link .chip {
  font-family: var(--sans); font-size: 0.82rem; font-weight: 500;
  background: var(--paper); color: var(--ink);
  padding: 0.55em 1.05em; border-radius: 100px;
  transition: transform .4s var(--ease);
}
.pill-link:hover .chip:last-child { transform: translateX(4px); }

/* ============================================================
   Marquee
   ============================================================ */
.marquee-sec { border-block: 1px solid var(--line); padding-block: clamp(38px, 5vw, 60px); }
.marquee-label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-faint); text-align: center;
  margin-bottom: 1.8rem;
}
.marquee { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track {
  display: flex; gap: clamp(2.5rem, 6vw, 5.5rem); width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee-track span {
  font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.6rem);
  color: var(--ink); opacity: 0.55; white-space: nowrap;
  transition: opacity .3s var(--ease);
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span:hover { opacity: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   Statement / intro split
   ============================================================ */
.statement-grid {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.statement-grid .img-col { border-radius: var(--radius); overflow: hidden; aspect-ratio: 3/3.6; }
.statement-grid .img-col img { width: 100%; height: 100%; object-fit: cover; }
.statement-aside { padding-top: 0.4rem; }
.statement-aside .label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1.2rem;
}

/* ============================================================
   Capability cards (Onshore / Offshore / Service)
   ============================================================ */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); }
.cap-card {
  border-radius: var(--radius); overflow: hidden; background: var(--paper);
  border: 1px solid var(--line-soft);
  display: flex; flex-direction: column;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.cap-card:hover { transform: translateY(-5px); box-shadow: 0 24px 50px -28px oklch(0.3 0.02 80 / 0.5); }
.cap-card .ph { aspect-ratio: 5/4; overflow: hidden; }
.cap-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.cap-card:hover .ph img { transform: scale(1.05); }
.cap-card .body { padding: clamp(20px, 2.4vw, 30px); }
.cap-card .num { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.1em; }
.cap-card h3 { font-family: var(--serif); font-size: 1.7rem; margin: 0.5rem 0 0.6rem; }
.cap-card p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

/* ============================================================
   Stats band
   ============================================================ */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.stat { padding: clamp(28px, 4vw, 52px) clamp(8px, 2vw, 24px) clamp(28px, 4vw, 52px) 0; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .num { font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1; letter-spacing: -0.01em; }
.stat .lbl { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-top: 0.7rem; }

/* ============================================================
   Big CTA
   ============================================================ */
.cta {
  background: var(--dark); color: var(--on-dark);
  border-radius: var(--radius);
  padding: clamp(48px, 8vw, 110px) var(--gut);
  text-align: center;
  position: relative; overflow: hidden;
}
.cta .display { color: var(--on-dark); max-width: 20ch; margin-inline: auto; line-height: 1.12; font-size: clamp(2.1rem, 5vw, 4.4rem); padding-bottom: 0.12em; }
.cta .btn { margin-top: 3rem; }
.cta .glow {
  position: absolute; width: 60vw; height: 60vw; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklch, var(--accent) 45%, transparent), transparent 62%);
  bottom: -35%; left: 50%; transform: translateX(-50%); opacity: 0.5; pointer-events: none;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--dark); color: var(--on-dark-soft); padding-block: clamp(56px, 7vw, 96px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: clamp(28px, 4vw, 64px); }
.footer-brand .brand { color: var(--on-dark); }
.footer-brand .brand .mark { background: var(--on-dark); color: var(--dark); }
.footer-brand p { max-width: 34ch; margin: 1.4rem 0 0; color: var(--on-dark-soft); }
.footer-col h4 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-dark-soft); margin-bottom: 1.2rem; font-weight: 500; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col a, .footer-col li { color: var(--on-dark); font-size: 0.96rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: clamp(40px, 6vw, 72px); padding-top: 1.6rem;
  border-top: 1px solid var(--dark-2);
  font-size: 0.82rem; color: var(--on-dark-soft);
}

/* ============================================================
   Inner page header
   ============================================================ */
.page-hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(32px, 4vw, 56px); }
.page-hero .kicker { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.4rem; }
.page-hero .display { max-width: 18ch; line-height: 1.12; font-size: clamp(2.1rem, 5vw, 4.6rem); padding-bottom: 0.1em; }
.page-hero .lead { margin-top: 2.6rem; max-width: 52ch; }

/* services / values list */
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.offer-item { background: var(--bg); padding: clamp(28px, 3vw, 44px); transition: background .4s var(--ease); }
.offer-item:hover { background: var(--paper); }
.offer-item .idx { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); letter-spacing: 0.1em; }
.offer-item h3 { font-family: var(--serif); font-size: 1.55rem; margin: 0.9rem 0 0.7rem; }
.offer-item p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); }
.value h3 { font-family: var(--serif); font-size: 1.7rem; margin-bottom: 0.6rem; display: flex; align-items: baseline; gap: 0.7rem; }
.value h3 .n { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); }
.value p { margin: 0; color: var(--ink-soft); }
.value { padding-top: 1.4rem; border-top: 1px solid var(--line); }

/* projects */
.proj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
.proj-card { display: block; }
.proj-card .ph { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/11; }
.proj-card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.proj-card:hover .ph img { transform: scale(1.05); }
.proj-card .meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1.1rem; gap: 1rem; }
.proj-card h3 { font-family: var(--serif); font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.proj-card .spec { font-family: var(--mono); font-size: 0.76rem; color: var(--ink-soft); letter-spacing: 0.04em; text-align: right; white-space: nowrap; }

/* about story */
.story-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.story-grid .img-col { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/4.6; position: sticky; top: 110px; }
.story-grid .img-col img { width: 100%; height: 100%; object-fit: cover; }
.story-grid .label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1.2rem; }
.story-grid p { font-size: 1.12rem; line-height: 1.6; color: var(--ink); max-width: 50ch; }
.story-grid p + p { margin-top: 1.2rem; color: var(--ink-soft); }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.contact-info .row { padding: 1.3rem 0; border-top: 1px solid var(--line); }
.contact-info .row:last-child { border-bottom: 1px solid var(--line); }
.contact-info .row .k { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.contact-info .row .v { font-family: var(--serif); font-size: 1.5rem; margin-top: 0.3rem; }
.form { display: grid; gap: 1.1rem; }
.form .field { display: flex; flex-direction: column; gap: 0.5rem; }
.form .field.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.form input, .form textarea, .form select {
  font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 10px; padding: 0.9em 1em; width: 100%;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.form input:focus, .form textarea:focus, .form select:focus {
  outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--ink) 8%, transparent);
}
.form textarea { resize: vertical; min-height: 130px; }
.form .btn { justify-content: center; margin-top: 0.4rem; }
.form-note { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); margin-top: 0.4rem; }

/* ============================================================
   Reveal animations
   ============================================================ */
.reveal { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }
html.anim .reveal { opacity: 0; transform: translateY(26px); }
html.anim .reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  .hero-img img { transform: none !important; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1000px) {
  .hero-head { grid-template-columns: 1fr; align-items: start; gap: 1.4rem; }
  .hero-head .lead { justify-self: start; }
  .feature-grid { grid-template-columns: 1fr; }
  .statement-grid { grid-template-columns: 1fr; }
  .statement-grid .img-col { aspect-ratio: 16/10; }
  .cards-3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat { border-bottom: 1px solid var(--line); }
  .offer-grid { grid-template-columns: 1fr 1fr; }
  .values-grid { grid-template-columns: 1fr; gap: 0; }
  .value { padding-block: 1.4rem; }
  .proj-grid { grid-template-columns: 1fr; }
  .story-grid { grid-template-columns: 1fr; }
  .story-grid .img-col { position: relative; top: 0; aspect-ratio: 16/11; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  body { font-size: 16px; }
  .nav-links { display: none; }
  .nav-cta .btn { display: none; }
  .burger { display: flex; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; }
  .offer-grid { grid-template-columns: 1fr; }
  .form .field.two { grid-template-columns: 1fr; }
  .topbar .hide-sm { display: none; }
}


/* ============================================================
   Installations map page (map.html / page-installations)
   ============================================================ */
/* ---- Installations map page ---- */
  .map-hero { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(20px, 3vw, 36px); }
  .map-hero .kicker { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin: 0 0 1.1rem; display:inline-flex; align-items:center; gap:.6em; }
  .map-hero .kicker .dot { font-size: 1.1em; line-height: 0; }
  .map-hero h1 { font-family: var(--serif); font-weight: 400; line-height: 1.08; font-size: clamp(2.1rem, 5vw, 4rem); margin: 0 0 1rem; max-width: 20ch; }
  .map-hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.5; color: var(--ink-soft); max-width: 52ch; margin: 0; }

  /* aggregate strip */
  .map-stats { display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 64px); margin-top: clamp(28px, 4vw, 44px); border-top: 1px solid var(--line); padding-top: 1.6rem; }
  .map-stats .s .n { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; }
  .map-stats .s .k { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-top: 0.5rem; }

  .map-shell {
    display: grid; grid-template-columns: 380px 1fr; gap: 0;
    border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
    background: var(--paper); min-height: 600px; height: min(720px, 76vh);
  }
  .map-side { display: flex; flex-direction: column; border-right: 1px solid var(--line); min-height: 0; }
  .map-side .side-head { padding: 1.3rem 1.4rem 1rem; border-bottom: 1px solid var(--line); }
  .map-side .side-head .eyebrow { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); }
  .map-side .side-head h2 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; margin: 0.3rem 0 0; }

  .site-list { overflow-y: auto; flex: 1; min-height: 0; }
  .site-item { width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; padding: 1.05rem 1.4rem; display: flex; flex-direction: column; gap: 0.3rem; transition: background .25s var(--ease); font-family: var(--sans); }
  .site-item:hover { background: var(--bg-2); }
  .site-item.is-active { background: var(--bg-2); box-shadow: inset 3px 0 0 var(--accent); }
  .site-item .si-name { font-size: 1.02rem; color: var(--ink); display: flex; align-items: center; gap: 0.5rem; }
  .site-item .si-loc { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-soft); }
  .si-status { font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.18em 0.55em; border-radius: 100px; border: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
  .si-status.online { color: var(--accent); border-color: color-mix(in oklch, var(--accent) 45%, var(--line)); }

  .map-canvas { position: relative; min-height: 0; }
  #leaflet-map { position: absolute; inset: 0; background: var(--bg-2); }

  /* detail card floating over the map */
  .site-detail {
    position: absolute; left: 18px; bottom: 18px; z-index: 500; width: min(320px, calc(100% - 36px));
    background: color-mix(in oklch, var(--paper) 92%, transparent); backdrop-filter: blur(10px) saturate(1.1);
    border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem;
    box-shadow: 0 18px 40px -20px rgba(0,0,0,0.35);
  }
  .site-detail h3 { font-family: var(--serif); font-weight: 400; font-size: 1.35rem; margin: 0; }
  .site-detail .d-loc { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-soft); margin-top: 0.2rem; }
  .site-detail .d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.1rem; margin-top: 1rem; }
  .site-detail .d-grid .k { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
  .site-detail .d-grid .v { font-size: 1.05rem; color: var(--ink); margin-top: 0.15rem; }
  .site-detail .d-grid .v small { color: var(--ink-soft); font-size: 0.78rem; }

  .map-note { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); margin-top: 1rem; }

  /* custom marker */
  .otg-pin { position: relative; }
  .otg-pin i { display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 22%, transparent); }
  .otg-pin.is-active i { box-shadow: 0 0 0 7px color-mix(in oklch, var(--accent) 30%, transparent); }
  .otg-pin.is-active::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid var(--accent); animation: otgpulse 1.8s var(--ease) infinite; }
  @keyframes otgpulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.4); opacity: 0; } }
  .leaflet-container { font-family: var(--sans); }
  .leaflet-control-attribution { font-size: 10px; }

  @media (max-width: 820px) {
    .map-shell { grid-template-columns: 1fr; height: auto; }
    .map-side { border-right: 0; border-bottom: 1px solid var(--line); max-height: 280px; }
    .map-canvas { height: 460px; }
  }

/* ============================================================
   Wind-turbine preloader + spinning-turbine cursor
   ============================================================ */

/* Shared turbine artwork */
.otg-turbine { display: block; color: var(--ink); overflow: visible; }
.otg-turbine .blade { fill: currentColor; }
.otg-turbine .hub   { fill: currentColor; }
.otg-turbine .tower { fill: color-mix(in oklch, currentColor 38%, transparent); }
.otg-turbine .rotor { transform-origin: 50px 50px; }

@keyframes otg-rotor-spin { to { transform: rotate(360deg); } }

/* ---- Preloader ---- */
.otg-preloader {
  position: fixed; inset: 0; z-index: 4000;
  display: grid; place-items: center;
  background: var(--paper);
  transition: opacity .6s var(--ease), visibility 0s linear .6s;
}
.otg-preloader-inner {
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
}
.otg-preloader .otg-turbine { width: 92px; height: auto; }
.otg-preloader .rotor { animation: otg-rotor-spin 1.5s linear infinite; }

/* Preloader mark: gentle float */
.otg-preloader .brand-mark-float {
  width: 92px; height: auto; display: block;
  animation: otg-float 3.6s ease-in-out infinite;
}
.otg-preloader .brand-mark-shadow {
  width: 56px; height: 10px; margin: -4px auto 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.18), transparent 70%);
  animation: otg-shadow 3.6s ease-in-out infinite;
}
@keyframes otg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes otg-shadow { 0%, 100% { transform: scale(1); opacity: .6; } 50% { transform: scale(.7); opacity: .3; } }
.otg-preloader-label {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-soft);
}
.otg-preloader-label .reg { font-size: 0.7em; vertical-align: super; }
/* Hidden once the page is ready */
body.otg-loaded .otg-preloader {
  opacity: 0; visibility: hidden; pointer-events: none;
}

/* ---- Turbine cursor (fine-pointer devices only) ---- */
.otg-cursor-el { display: none; }
@media (hover: hover) and (pointer: fine) {
  html.otg-cursor, html.otg-cursor * { cursor: none; }
  /* keep a real caret where the user actually types */
  html.otg-cursor :is(input, textarea, select, [contenteditable="true"]) { cursor: auto; }

  .otg-cursor-el {
    display: block;
    position: fixed; top: 0; left: 0; z-index: 5000;
    width: 38px; height: 38px; margin: -19px 0 0 -19px;
    pointer-events: none; will-change: transform;
    opacity: 0; transition: opacity .25s var(--ease);
  }
  .otg-cursor-el.is-visible { opacity: 1; }
  .otg-cursor-el.is-hidden  { opacity: 0; }
  .otg-cursor-el .otg-turbine { width: 38px; height: 38px; }
  .otg-cursor-el .rotor { animation: otg-rotor-spin 2.6s linear infinite; }
  /* a gust when the pointer moves — blades whip up, then ease back */
  .otg-cursor-el.gust .rotor { animation-duration: .45s; }
  /* grows + accent tint over clickable things */
  .otg-cursor-el.over-link .otg-turbine { color: var(--accent); transform: scale(1.25); transition: transform .2s var(--ease), color .2s var(--ease); }
  /* turns white over dark sections so it stays visible */
  .otg-cursor-el.on-dark .otg-turbine { color: var(--paper); }
}

@media (prefers-reduced-motion: reduce) {
  .otg-preloader .rotor, .otg-cursor-el .rotor { animation: none; }
  .otg-preloader .brand-mark-float, .otg-preloader .brand-mark-shadow { animation: none; }
}

