/* ============================================================
   ÖTZI — GLOBAL STYLESHEET
   Design language: tech-forward climate intelligence
   ============================================================ */

/* Fonts are loaded via <link> in each HTML page's <head> */

/* 1. DESIGN TOKENS ------------------------------------------- */
:root {
  /* Colors */
  --color-forest:       #0B2545;
  --color-forest-mid:   #1E3A5F;
  --color-forest-deep:  #061524;
  --color-amber:        #6596ce;
  --color-amber-light:  #8ab5e0;
  --color-cream:        #ffffff;
  --color-parchment:    #ddf4fd;
  --color-ink:          #0F172A;
  --color-ink-mid:      #2a3828;
  --color-ink-light:    #64748B;
  --color-rule:         #c0d4e8;
  --color-white:        #FFFFFF;
  --color-orange:       #f56900;
  --color-black:        #090d01;
  --color-mint:         #ddf4fd;   /* page background — very light mint */
  --color-sky-pale:     #ddf4fd;   /* contrast sections — very light blue */

  /* Typography */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Type scale — minor third (1.25×) */
  --text-xs:   0.64rem;
  --text-sm:   0.8rem;
  --text-base: 1rem;
  --text-md:   1.25rem;
  --text-lg:   1.563rem;
  --text-xl:   1.953rem;
  --text-2xl:  2.441rem;
  --text-3xl:  3.052rem;
  --text-4xl:  3.815rem;

  /* Spacing — 8px grid */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 8rem;

  /* Layout */
  --nav-height: 68px;
  --max-width:  1200px;

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 300ms ease;
  --t-slow: 500ms ease;

  /* Borders */
  --radius-sm:   2px;
  --radius-base: 4px;
  --radius-lg:   8px;
}

/* 3. RESET ---------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-ink);
  background-color: var(--color-mint);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* 4. TYPOGRAPHY ---------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 600;
}

.display {
  font-size: clamp(2.4rem, 5vw, var(--text-4xl));
  font-weight: 700;
  line-height: 1.12;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-amber);
}

.lead {
  font-size: var(--text-md);
  line-height: 1.8;
  color: var(--color-ink-mid);
}

.lead--light {
  color: rgba(240, 249, 255, 0.72);
}

/* 5. LAYOUT -------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container--narrow {
  max-width: 780px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

/* 6. SECTIONS ----------------------------------------------- */
.section {
  padding: var(--space-7) 0;
}

.section--sm {
  padding: var(--space-5) 0;
}

.section--forest {
  background-color: var(--color-forest);
  color: var(--color-cream);
}

.section--forest-deep {
  background-color: var(--color-forest-deep);
  color: var(--color-cream);
}

.section--cream {
  background-color: var(--color-mint);
}

.section--parchment {
  background-color: var(--color-sky-pale);
}

.section--amber {
  background-color: var(--color-amber);
  color: var(--color-forest-deep);
}

.section-header {
  margin-bottom: var(--space-5);
}

.section-header--center {
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-6);
}

.section-header .eyebrow {
  margin-bottom: var(--space-2);
}

.section-header h2 {
  font-size: clamp(1.8rem, 3.5vw, var(--text-3xl));
  margin-bottom: var(--space-2);
}

/* 7. NAVIGATION --------------------------------------------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: transparent;
  transition: background var(--t-base), backdrop-filter var(--t-base);
}

.nav--scrolled {
  background: rgba(6, 21, 36, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(240, 249, 255, 0.06);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav__logo-mark {
  width: 32px;
  height: 32px;
  color: var(--color-orange);
  flex-shrink: 0;
}

.nav__wordmark {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-orange);
}

.nav__links {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(240, 249, 255, 0.68);
  transition: color var(--t-fast);
  position: relative;
  padding-bottom: 2px;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-amber);
  transition: width var(--t-base);
}

.nav__link:hover,
.nav__link--active {
  color: var(--color-cream);
}

.nav__link:hover::after,
.nav__link--active::after {
  width: 100%;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 101;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-cream);
  transition: transform var(--t-base), opacity var(--t-base);
  transform-origin: center;
}

.nav--open .nav__toggle span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav--open .nav__toggle span:nth-child(2) {
  opacity: 0;
}
.nav--open .nav__toggle span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* 8. HERO ---------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--color-forest-deep);
  overflow: hidden;
}

.hero--full {
  min-height: 100vh;
  min-height: 100svh;
}

.hero--short {
  min-height: 46vh;
  padding-top: var(--nav-height);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-height) + var(--space-7));
  padding-bottom: var(--space-8);
  max-width: 860px;
}

/* Two-column hero layout (homepage with globe) */
.hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-top: calc(var(--nav-height) + var(--space-7));
  padding-bottom: var(--space-8);
  width: 100%;
}

.hero__inner .hero__content {
  flex: 1 1 55%;
  max-width: 580px;
  padding-top: 0;
  padding-bottom: 0;
}

.hero__globe {
  flex: 0 0 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hero--short .hero__content {
  padding-top: calc(var(--nav-height) + var(--space-5));
  padding-bottom: var(--space-6);
}

.hero__eyebrow {
  margin-bottom: var(--space-3);
}

.hero__title {
  font-size: clamp(2.1rem, 4.5vw, var(--text-4xl));
  color: var(--color-cream);
  font-weight: 700;
  line-height: 1.13;
  margin-bottom: var(--space-4);
}

.hero--short .hero__title {
  font-size: clamp(1.6rem, 3.5vw, var(--text-3xl));
}

.hero__sub {
  font-size: var(--text-md);
  color: rgba(240, 249, 255, 0.7);
  max-width: 640px;
  line-height: 1.8;
  margin-bottom: var(--space-5);
}

.hero__ctas {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
}

/* 9. BUTTONS ------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.72rem 1.6rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  transition: all var(--t-fast);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}

.btn--amber {
  background: var(--color-orange);
  color: var(--color-white);
  border: 1.5px solid var(--color-orange);
}

.btn--amber:hover {
  background: #e05e00;
  border-color: #e05e00;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245, 105, 0, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--color-cream);
  border: 1.5px solid rgba(240, 249, 255, 0.4);
}

.btn--ghost:hover {
  border-color: rgba(240, 249, 255, 0.85);
  background: rgba(240, 249, 255, 0.06);
}

.btn--outline {
  background: transparent;
  color: var(--color-forest);
  border: 1.5px solid var(--color-forest);
}

.btn--outline:hover {
  background: var(--color-forest);
  color: var(--color-cream);
}

.btn--outline-amber {
  background: transparent;
  color: var(--color-amber);
  border: 1.5px solid var(--color-amber);
}

.btn--outline-amber:hover {
  background: var(--color-amber);
  color: var(--color-forest-deep);
}

/* 10. PROBLEM ITEMS (3-col grid) ---------------------------- */
.problem-item {
  padding: var(--space-3) 0;
}

.problem-item__icon {
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-3);
  color: var(--color-forest);
}

.problem-item__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-ink);
  margin-bottom: var(--space-2);
  font-weight: 400;
}

.problem-item__text {
  color: var(--color-ink-mid);
  font-size: var(--text-base);
  line-height: 1.75;
}

/* 11. FEATURE CARDS ----------------------------------------- */
.feature-card {
  padding: var(--space-4) var(--space-4) var(--space-5);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-base);
  background: var(--color-sky-pale);
  transition: transform var(--t-base), box-shadow var(--t-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(11, 37, 69, 0.09);
}

.feature-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.feature-card__icon {
  width: 44px;
  height: 44px;
  color: var(--color-forest);
  flex-shrink: 0;
}

.feature-card__num {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--color-rule);
  line-height: 1;
  font-weight: 300;
  flex-shrink: 0;
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-ink);
  margin-bottom: var(--space-2);
  font-weight: 400;
  line-height: 1.25;
}

.feature-card__text {
  font-size: var(--text-base);
  color: var(--color-ink-mid);
  line-height: 1.75;
}

/* 12. SOLUTION APPROACH BLOCK ------------------------------- */
.approach-block {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}

.approach-block h2 {
  font-size: clamp(1.8rem, 3.5vw, var(--text-3xl));
  color: var(--color-cream);
  margin-bottom: var(--space-3);
  font-weight: 700;
}

.approach-block p {
  font-size: var(--text-md);
  color: rgba(240, 249, 255, 0.7);
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

/* 13. ABOUT / EDITORIAL TEXT --------------------------------- */
.editorial {
  font-size: var(--text-md);
  line-height: 1.85;
  color: var(--color-ink-mid);
  max-width: 680px;
  margin: 0 auto;
}

.editorial p + p {
  margin-top: var(--space-4);
}

.editorial--center {
  text-align: center;
}

/* 14. PULL QUOTE -------------------------------------------- */
.pullquote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, var(--text-2xl));
  line-height: 1.45;
  font-weight: 600;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.pullquote::before {
  content: '\201C';
  display: block;
  font-size: var(--text-3xl);
  line-height: 0.6;
  margin-bottom: var(--space-2);
  opacity: 0.4;
}

/* 15. DIVIDER ----------------------------------------------- */
.rule {
  border: none;
  border-top: 1px solid var(--color-rule);
  margin: var(--space-5) 0;
}

.rule--light {
  border-top-color: rgba(240, 249, 255, 0.12);
}

/* 16. FORM --------------------------------------------------- */
.form-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.form-intro {
  font-size: var(--text-base);
  color: var(--color-ink-mid);
  margin-bottom: var(--space-5);
  line-height: 1.7;
}

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-ink);
  letter-spacing: 0.02em;
}

.form-label--required::after {
  content: ' *';
  color: var(--color-amber);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--color-rule);
  border-radius: var(--radius-base);
  background: var(--color-sky-pale);
  color: var(--color-ink);
  font-size: var(--text-base);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-forest);
  box-shadow: 0 0 0 3px rgba(11, 37, 69, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-ink-light);
}

.form-textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.65;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237A7A72' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-submit {
  align-self: flex-start;
  margin-top: var(--space-1);
}

.form-status {
  padding: var(--space-3);
  border-radius: var(--radius-base);
  font-size: var(--text-sm);
  line-height: 1.6;
  display: none;
  margin-top: var(--space-2);
}

.form-status--success {
  background: rgba(11, 37, 69, 0.08);
  border: 1px solid var(--color-forest);
  color: var(--color-forest);
  display: block;
}

.form-status--error {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid var(--color-amber);
  color: var(--color-ink);
  display: block;
}

/* 17. FOOTER ------------------------------------------------- */
.footer {
  background-color: var(--color-forest-deep);
  color: var(--color-cream);
  padding: var(--space-6) 0 var(--space-4);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgba(240, 249, 255, 0.08);
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--space-3);
}

.footer__logo-mark {
  width: 28px;
  height: 28px;
  color: var(--color-cream);
  flex-shrink: 0;
}

.footer__logo-wordmark {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-cream);
}

.footer__tagline {
  font-size: var(--text-sm);
  color: rgba(240, 249, 255, 0.48);
  line-height: 1.7;
  max-width: 260px;
}

.footer__col-heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(240, 249, 255, 0.38);
  margin-bottom: var(--space-3);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__link {
  font-size: var(--text-sm);
  color: rgba(240, 249, 255, 0.62);
  transition: color var(--t-fast);
}

.footer__link:hover {
  color: var(--color-cream);
}

.footer__contact-item {
  font-size: var(--text-sm);
  color: rgba(240, 249, 255, 0.62);
  line-height: 1.65;
}

.footer__bottom {
  padding-top: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer__legal {
  font-size: var(--text-xs);
  color: rgba(240, 249, 255, 0.28);
}

/* 18. SCROLL ANIMATIONS ------------------------------------- */
.animate {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate--delay-1 { transition-delay: 80ms; }
.animate--delay-2 { transition-delay: 160ms; }
.animate--delay-3 { transition-delay: 240ms; }
.animate--delay-4 { transition-delay: 320ms; }

/* 19. HERO BACKGROUND CONTOURS ------------------------------ */
@keyframes contour-breathe {
  0%   { opacity: 0.04; transform: translateX(0px) translateY(0px); }
  33%  { opacity: 0.09; }
  66%  { opacity: 0.06; transform: translateX(18px) translateY(-6px); }
  100% { opacity: 0.04; transform: translateX(0px) translateY(0px); }
}

@keyframes contour-drift {
  0%   { opacity: 0.05; transform: translateX(0px); }
  50%  { opacity: 0.11; transform: translateX(28px); }
  100% { opacity: 0.05; transform: translateX(0px); }
}

.contour-line {
  animation: contour-breathe 22s ease-in-out infinite;
}

.contour-line:nth-child(1) { animation-duration: 28s; animation-delay: 0s; }
.contour-line:nth-child(2) { animation-duration: 34s; animation-delay: -9s; }
.contour-line:nth-child(3) { animation-duration: 25s; animation-delay: -17s; }
.contour-line:nth-child(4) { animation-duration: 31s; animation-delay: -5s; }
.contour-line:nth-child(5) { animation-duration: 38s; animation-delay: -22s; }
.contour-line:nth-child(6) { animation-duration: 27s; animation-delay: -13s; }

/* 20. UTILITIES --------------------------------------------- */
.text-center  { text-align: center; }
.text-amber   { color: var(--color-amber); }
.text-cream   { color: var(--color-cream); }
.text-dim     { color: rgba(240, 249, 255, 0.6); }

.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }

/* 21. RESPONSIVE -------------------------------------------- */
@media (max-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer__brand {
    grid-column: 1 / -1;
  }
  .hero__globe {
    flex: 0 0 300px;
  }
}

@media (max-width: 768px) {
  :root {
    --space-7: 4rem;
    --space-8: 5rem;
  }

  /* Mobile nav overlay */
  .nav__links {
    position: fixed;
    inset: 0;
    background: var(--color-forest-deep);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-5);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t-base);
    z-index: 99;
  }

  .nav--open .nav__links {
    opacity: 1;
    pointer-events: all;
  }

  .nav__link {
    font-size: var(--text-lg);
    color: rgba(240, 249, 255, 0.8);
  }

  .nav__toggle {
    display: flex;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .hero__ctas {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__inner {
    flex-direction: column;
    padding-top: calc(var(--nav-height) + var(--space-5));
    padding-bottom: var(--space-6);
    gap: var(--space-4);
  }

  .hero__globe {
    order: -1;
    flex: none;
    width: 220px;
    height: 220px;
  }

  .hero__inner .hero__content {
    max-width: 100%;
    flex: none;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .footer__brand {
    grid-column: auto;
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-3);
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero__ctas .btn {
    width: auto;
    min-width: 200px;
  }
}
