/*
Theme Name: Coherence Earth Landing
Theme URI: https://coherence.earth
Author: Codex
Description: Cinematic one-page landing theme for Coherence.Earth.
Version: 1.1.10
Text Domain: coherence-earth
*/

:root {
  --background-navy: #06131f;
  --deep-space: #020812;
  --soft-white: #f7f2e8;
  --muted-white: rgba(247, 242, 232, 0.78);
  --gold: #d6a85a;
  --soft-gold: #f0c978;
  --overlay: rgba(4, 14, 24, 0.48);
  --border: rgba(214, 168, 90, 0.35);
  --border-soft: rgba(214, 168, 90, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --content-max: 78rem;
  --panel-radius: 2rem;
}

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

html {
  background: var(--deep-space);
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--deep-space);
  color: var(--soft-white);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

.landing-page {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: clip;
  background: var(--deep-space);
}

.landing-page__background {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-color: var(--deep-space);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  transform: scale(1.03);
}

.landing-page__background::before,
.landing-page__background::after,
.landing-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.landing-page__background::before {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.14), transparent 26%),
    radial-gradient(circle at 16% 14%, rgba(255, 255, 255, 0.08), transparent 4px),
    radial-gradient(circle at 78% 24%, rgba(255, 255, 255, 0.09), transparent 3px),
    radial-gradient(circle at 22% 38%, rgba(255, 255, 255, 0.07), transparent 2px),
    radial-gradient(circle at 88% 32%, rgba(255, 255, 255, 0.06), transparent 2px),
    radial-gradient(circle at 12% 62%, rgba(255, 255, 255, 0.05), transparent 2px),
    radial-gradient(circle at 63% 10%, rgba(255, 255, 255, 0.05), transparent 2px);
  mix-blend-mode: screen;
  opacity: 0.9;
}

.landing-page__background::after {
  background:
    linear-gradient(180deg, rgba(2, 8, 18, 0.14) 0%, rgba(2, 8, 18, 0.36) 28%, rgba(2, 8, 18, 0.62) 100%),
    linear-gradient(180deg, rgba(3, 10, 18, 0.08) 0%, rgba(3, 10, 18, 0.3) 100%);
  z-index: -2;
}

.landing-page::before {
  z-index: -1;
  background:
    radial-gradient(circle at 50% 74%, rgba(213, 168, 90, 0.16), transparent 25%),
    linear-gradient(180deg, rgba(6, 19, 31, 0.1) 0%, rgba(2, 8, 18, 0.76) 100%);
}

.landing-page__effects {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}

.landing-page__effects-star,
.landing-page__effects-shooting-star {
  position: absolute;
  display: block;
  pointer-events: none;
}

.landing-page__effects-star {
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 999px;
  background: rgba(255, 244, 217, 0.9);
  box-shadow: 0 0 10px rgba(240, 201, 120, 0.55);
  opacity: 0.2;
  animation: coherence-twinkle 2.8s ease-in-out infinite;
}

.landing-page__effects-shooting-star {
  width: 9rem;
  height: 0.12rem;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(240, 201, 120, 0.15), rgba(255, 248, 225, 0.95));
  filter: blur(0.2px);
  opacity: 0;
  transform-origin: right center;
  transform: rotate(var(--shooting-angle, -22deg));
}

.landing-page__effects-shooting-star.is-active {
  animation: coherence-shoot 1.1s ease-out forwards;
}

.landing-page__content {
  position: relative;
  z-index: 1;
  width: min(var(--content-max), calc(100% - 2rem));
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(1rem, 2.4vw, 1.8rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(1rem, 2vw, 1.75rem);
}

.landing-page__content::before {
  content: "";
  position: fixed;
  inset: clamp(0.5rem, 1vw, 0.9rem);
  border: 1px solid rgba(214, 168, 90, 0.24);
  border-radius: 2.25rem;
  pointer-events: none;
  z-index: 0;
}

.hero-panel {
  width: min(60rem, 100%);
  margin: 0 auto;
  padding: clamp(1.55rem, 3vw, 2.7rem);
  border: 1px solid var(--border);
  border-radius: var(--panel-radius);
  background: var(--overlay);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(240, 201, 120, 0.1), transparent 28%),
    radial-gradient(circle at top right, rgba(240, 201, 120, 0.12), transparent 32%);
}

.hero-panel__heading {
  position: relative;
  isolation: isolate;
  text-align: center;
  margin-inline: auto;
  color: var(--soft-white);
  text-shadow:
    0 0 28px rgba(255, 244, 217, 0.12),
    0 0 54px rgba(240, 201, 120, 0.1);
}

.hero-panel__heading::before {
  content: "";
  position: absolute;
  inset: -1.2rem -2rem -0.8rem;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 45%, rgba(240, 201, 120, 0.22), transparent 38%),
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.08), transparent 52%);
  filter: blur(18px);
  opacity: 0.92;
}

.hero-panel__heading::after {
  content: "";
  position: absolute;
  inset: auto -0.5rem 0.1rem;
  height: 0.45rem;
  background: radial-gradient(circle, rgba(240, 201, 120, 0.48) 0%, rgba(240, 201, 120, 0.15) 35%, transparent 70%);
  filter: blur(16px);
  opacity: 0.7;
}

.hero-panel__brand {
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  margin-bottom: 1.15rem;
}

.hero-panel__site-title {
  margin: 0;
  color: var(--soft-white);
  font-family: "Montserrat", "Inter", system-ui, sans-serif;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 600;
  letter-spacing: 0.36em;
  text-indent: 0.36em;
  text-transform: uppercase;
  text-shadow:
    0 0 18px rgba(240, 201, 120, 0.16),
    0 0 34px rgba(255, 255, 255, 0.08);
}

.hero-panel__rule {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  width: min(31rem, 100%);
}

.hero-panel__rule span:not(.hero-panel__rule-mark) {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(240, 201, 120, 0.1), rgba(240, 201, 120, 0.55), rgba(240, 201, 120, 0.1));
}

.hero-panel__rule-mark {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 201, 120, 0.78);
  box-shadow: inset 0 0 0 1px rgba(214, 168, 90, 0.16);
  color: var(--soft-gold);
  display: grid;
  place-items: center;
  font-size: 0.84rem;
  line-height: 1;
  text-shadow: 0 0 8px rgba(240, 201, 120, 0.25);
}

.hero-panel__tagline {
  margin: 0;
  color: var(--soft-gold);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(1.1rem, 1.8vw, 1.55rem);
  font-style: italic;
  line-height: 1.3;
  max-width: 31rem;
}

.hero-panel__heading {
  margin: 0;
  max-width: 14ch;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(2.95rem, 5.55vw, 5.7rem);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.035em;
}

.hero-panel__body {
  margin: 1.5rem auto 0;
  max-width: 37.5rem;
  color: var(--muted-white);
  font-size: clamp(1rem, 1.45vw, 1.08rem);
  line-height: 1.86;
  text-align: center;
}

.hero-panel__body p {
  margin: 0 0 0.95rem;
}

.hero-panel__body p:last-child {
  margin-bottom: 0;
}

.hero-panel__cta-row {
  margin-top: 1.55rem;
}

.hero-panel__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.25rem;
  padding: 0.9rem 1.45rem;
  border-radius: 999px;
  border: 1px solid rgba(247, 242, 232, 0.06);
  background: linear-gradient(180deg, var(--soft-gold), var(--gold));
  color: #181308;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 40px rgba(214, 168, 90, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
  border: 0;
  cursor: pointer;
}

.hero-panel__cta:hover,
.hero-panel__cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 24px 50px rgba(214, 168, 90, 0.3);
  filter: brightness(1.03);
}

.initiatives-section {
  width: 100%;
}

.initiatives-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(214, 168, 90, 0.18);
  border-radius: 1.45rem;
  background: rgba(3, 11, 18, 0.38);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.initiative-card {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  min-height: 100%;
  padding: 1.3rem 1rem 1.2rem;
  border-left: 1px solid rgba(214, 168, 90, 0.18);
  background: rgba(3, 11, 18, 0.02);
  transition: transform 180ms ease, background-color 180ms ease;
  text-align: center;
}

.initiative-card--active {
  background: rgba(5, 14, 24, 0.1);
}

.initiative-card:first-child {
  border-left: 0;
}

.initiative-card:hover {
  transform: translateY(-2px);
  background: rgba(8, 18, 28, 0.16);
}

.initiative-card__top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  min-height: 15.5rem;
}

.initiative-card__header {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.35rem;
  min-height: 8.8rem;
}

.initiative-card__logo {
  width: 3.6rem;
  height: 3.6rem;
  flex: 0 0 auto;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(247, 242, 232, 0.08);
  background: rgba(247, 242, 232, 0.05);
}

.initiative-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
}

.initiative-card__logo-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--soft-gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.coherence-earth-logo-field__row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.coherence-earth-logo-field__preview {
  width: 84px;
  height: 84px;
  border: 1px solid #d4d7dd;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f6f7f8;
  flex: 0 0 auto;
}

.coherence-earth-logo-field__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.coherence-earth-logo-field__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 10px;
  text-align: center;
  color: #4b5563;
  font-size: 0.8rem;
}

.coherence-earth-logo-field__controls {
  min-width: 0;
}

.coherence-earth-logo-field__buttons {
  margin: 0 0 8px;
}

.coherence-earth-logo-field__description {
  margin: 0;
}

.conversation-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.conversation-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.conversation-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 6, 12, 0.7);
  backdrop-filter: blur(6px);
}

.conversation-modal__dialog {
  position: relative;
  width: min(36rem, 100%);
  border: 1px solid rgba(214, 168, 90, 0.24);
  border-radius: 1.5rem;
  background: rgba(5, 14, 24, 0.96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
  padding: 1.5rem;
}

.conversation-modal__close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(247, 242, 232, 0.08);
  background: rgba(247, 242, 232, 0.05);
  color: var(--soft-white);
  cursor: pointer;
}

.conversation-modal__eyebrow {
  margin: 0 0 0.6rem;
  color: var(--soft-gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.conversation-modal__title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.conversation-modal__description {
  margin: 0.9rem 0 0;
  color: var(--muted-white);
  line-height: 1.6;
}

.conversation-form {
  margin-top: 1.25rem;
  display: grid;
  gap: 1rem;
}

.conversation-form__field {
  display: grid;
  gap: 0.45rem;
}

.conversation-form__field label {
  color: var(--soft-white);
  font-size: 0.9rem;
  font-weight: 600;
}

.conversation-form__field input,
.conversation-form__field textarea {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(247, 242, 232, 0.1);
  background: rgba(247, 242, 232, 0.05);
  color: var(--soft-white);
  padding: 0.9rem 1rem;
  outline: none;
}

.conversation-form__field input:focus,
.conversation-form__field textarea:focus {
  border-color: rgba(240, 201, 120, 0.38);
  box-shadow: 0 0 0 3px rgba(240, 201, 120, 0.12);
}

.conversation-form__trap {
  position: absolute;
  left: -9999px;
}

.conversation-form__submit {
  justify-self: start;
  min-height: 3rem;
  padding: 0.85rem 1.35rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--soft-gold), var(--gold));
  color: #181308;
  font-weight: 700;
  cursor: pointer;
}

.conversation-form__status {
  margin: 0;
  min-height: 1.25rem;
  color: var(--soft-gold);
  font-size: 0.95rem;
}

.coherence-toast {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 40;
  transform: translateX(-50%) translateY(1rem);
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
  border: 1px solid rgba(214, 168, 90, 0.24);
  background: rgba(5, 14, 24, 0.94);
  color: var(--soft-white);
  padding: 0.8rem 1rem;
  border-radius: 999px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.coherence-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes coherence-twinkle {
  0%, 100% { opacity: 0.16; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.2); }
}

@keyframes coherence-shoot {
  0% { opacity: 0; transform: translateX(0) translateY(0) rotate(var(--shooting-angle, -22deg)); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-22rem) translateY(10rem) rotate(var(--shooting-angle, -22deg)); }
}

.initiative-card__title {
  margin: 0;
  color: var(--soft-white);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -0.02em;
  min-height: 2.05em;
}

.initiative-card__subtitle {
  margin: 0.35rem 0 0;
  color: var(--muted-white);
  font-size: 0.92rem;
  line-height: 1.45;
  min-height: 4.9em;
}

.initiative-card__meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.initiative-card__status {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(247, 242, 232, 0.08);
  background: rgba(247, 242, 232, 0.04);
  color: var(--muted-white);
  font-size: 0.82rem;
  font-weight: 600;
}

.initiative-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(240, 201, 120, 0.98), rgba(214, 168, 90, 0.96));
  color: #181308;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 12px 28px rgba(214, 168, 90, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.initiative-card__button:hover,
.initiative-card__button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(214, 168, 90, 0.22);
  filter: brightness(1.02);
}

.site-whisper {
  padding: 0.4rem 0 0.85rem;
  text-align: center;
  color: rgba(247, 242, 232, 0.64);
  font-size: 0.84rem;
  line-height: 1.6;
}

.site-whisper p {
  margin: 0;
}

@media (max-width: 1100px) {
  .initiatives-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .initiative-card:nth-child(2n + 1) {
    border-left: 0;
  }

  .hero-panel {
    width: min(56rem, 100%);
  }
}

@media (max-width: 720px) {
  .landing-page__content {
    width: min(var(--content-max), calc(100% - 1.15rem));
    padding: 0.8rem 0.4rem 1rem;
  }

  .hero-panel {
    padding: 1.2rem;
    border-radius: 1.5rem;
  }

  .hero-panel__brand {
    gap: 0.55rem;
  }

  .hero-panel__site-title {
    letter-spacing: 0.24em;
    text-indent: 0.24em;
    font-size: 0.98rem;
  }

  .hero-panel__rule {
    width: min(20rem, 100%);
    gap: 0.75rem;
  }

  .hero-panel__tagline {
    max-width: 22rem;
    font-size: 1.03rem;
  }

  .hero-panel__heading {
    max-width: none;
    font-size: clamp(2.4rem, 13.6vw, 4.05rem);
  }

  .hero-panel__body,
  .hero-panel__tagline {
    font-size: 0.98rem;
  }

  .initiatives-grid {
    grid-template-columns: 1fr;
    border-radius: 1.2rem;
  }

  .initiative-card {
    padding: 0.95rem;
    border-left: 0;
    border-top: 1px solid rgba(214, 168, 90, 0.18);
  }

  .initiative-card__top,
  .initiative-card__header,
  .initiative-card__title,
  .initiative-card__subtitle {
    min-height: 0;
  }

  .initiative-card:first-child {
    border-top: 0;
  }

  .initiative-card__title {
    font-size: 1.65rem;
  }

  .site-whisper {
    padding-inline: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
