:root {
  --cairn-green: #2d6a4f;
  --cairn-green-dark: #1b4332;
  --cairn-green-light: #40916c;
  --cairn-sand: #f4f1de;
  --cairn-sand-dark: #e8e4c9;
  --text: #1d1d1d;
  --text-muted: #5c5c5c;
  --white: #ffffff;
  --shadow: 0 12px 40px rgba(27, 67, 50, 0.12);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--cairn-sand);
  line-height: 1.6;
}

a {
  color: var(--cairn-green-dark);
}

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(27, 67, 50, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
  font-weight: 700;
  font-size: 1.15rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-by {
  font-size: 0.68rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.92rem;
}

.nav a:hover {
  color: var(--white);
}

.nav-cta {
  background: var(--cairn-green-light);
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--white) !important;
  font-weight: 600;
}

.nav-cta--secondary {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white) !important;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
}

.lang-btn:hover {
  color: var(--white);
}

.lang-btn.is-active {
  background: var(--white);
  color: var(--cairn-green-dark);
}

/* Hero */
.hero {
  padding: 72px 0 88px;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(64, 145, 108, 0.18), transparent),
    linear-gradient(180deg, var(--cairn-sand) 0%, var(--cairn-sand-dark) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cairn-green);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.15;
  color: var(--cairn-green-dark);
}

.lead {
  margin: 0 0 16px;
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 52ch;
}

.hero-note {
  margin: 0 0 24px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cairn-green);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--cairn-green-dark);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--cairn-green);
}

.btn-ghost {
  background: transparent;
  color: var(--cairn-green-dark);
  border-color: var(--cairn-green-dark);
}

.icon-apple {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  display: block;
}

/* Phone mockup */
.phone-mock {
  justify-self: center;
  width: min(280px, 100%);
  aspect-ratio: 9 / 19;
  padding: 12px;
  background: var(--cairn-green-dark);
  border-radius: 36px;
  box-shadow: var(--shadow);
}

.phone-screen {
  position: relative;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(145deg, #a8dadc 0%, #457b9d 45%, #1d3557 100%);
}

.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}

.map-pin {
  position: absolute;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--white);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.map-pin > * {
  transform: rotate(45deg);
}

.pin-1 { top: 22%; left: 18%; }
.pin-2 { top: 48%; right: 22%; }
.pin-3 { bottom: 28%; left: 32%; }
.pin-sos {
  top: 14%;
  right: 20%;
  background: #fde8e8;
  border: 2px solid #e63946;
  animation: sos-pulse 2s ease-in-out infinite;
}

@keyframes sos-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.45); }
  50% { box-shadow: 0 0 0 10px rgba(230, 57, 70, 0); }
}

.map-route {
  position: absolute;
  top: 35%;
  left: 28%;
  width: 42%;
  height: 28%;
  border: 3px dashed rgba(255, 255, 255, 0.85);
  border-radius: 40% 60% 50% 40%;
  transform: rotate(-12deg);
}

.map-user {
  position: absolute;
  bottom: 18%;
  right: 28%;
  width: 14px;
  height: 14px;
  background: #4cc9f0;
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(76, 201, 240, 0.25);
}

/* Sections */
.section {
  padding: 80px 0;
}

.section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  color: var(--cairn-green-dark);
  text-align: center;
}

.section-lead {
  margin: 0 auto 48px;
  max-width: 56ch;
  text-align: center;
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card--highlight {
  border: 2px solid rgba(230, 57, 70, 0.25);
  background: linear-gradient(180deg, #fff 0%, #fff8f8 100%);
}

.feature-card {
  background: var(--white);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 12px;
}

.feature-card h3 {
  margin: 0 0 10px;
  color: var(--cairn-green-dark);
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* How it works */
.how {
  background: var(--white);
}

.steps {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  gap: 24px;
  max-width: 900px;
  margin-inline: auto;
}

.steps-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.steps-4 li {
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
}

.steps li {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  background: var(--cairn-sand);
  border-radius: var(--radius);
}

.step-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--cairn-green-dark);
  color: var(--white);
  font-weight: 700;
  border-radius: 50%;
}

.steps h3 {
  margin: 0 0 6px;
  color: var(--cairn-green-dark);
}

.steps p {
  margin: 0;
  color: var(--text-muted);
}

/* Product / Inde Imaginarium */
.product {
  background: var(--white);
}

.product-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.product-copy h2 {
  text-align: left;
  margin-bottom: 16px;
}

.product-lead {
  font-size: 1.05rem;
  color: var(--cairn-green);
  font-weight: 600;
  margin: 0 0 12px;
}

.product-copy p:last-child {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.65;
}

.product-card {
  background: linear-gradient(145deg, var(--cairn-sand) 0%, var(--white) 100%);
  border: 1px solid var(--cairn-sand-dark);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.product-card-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.product-logo {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(27, 67, 50, 0.12);
}

.product-app-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--cairn-green-dark);
}

.product-by {
  margin: 2px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.product-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.product-list li {
  position: relative;
  padding-left: 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.product-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cairn-green-light);
}

.product-link {
  display: inline-block;
  margin-top: 18px;
  font-weight: 700;
  color: var(--cairn-green-dark);
  text-decoration: none;
}

.product-link:hover {
  text-decoration: underline;
}

/* Download */
.download {
  background: var(--cairn-green-dark);
  color: var(--white);
}

.download-inner {
  text-align: center;
}

.download h2 {
  color: var(--white);
}

.download p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 52ch;
  margin-inline: auto;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 32px 0 24px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

.store-badge--apple .icon-apple {
  width: 1.25em;
  height: 1.25em;
}

.store-badge--active {
  background: var(--white);
  color: var(--cairn-green-dark);
  border-color: var(--white);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.store-badge--active:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.store-badge.disabled {
  opacity: 0.75;
  cursor: default;
}

.download-note {
  font-size: 0.85rem;
  opacity: 0.75;
}

.download-note a,
.download-note code {
  color: rgba(255, 255, 255, 0.95);
}

.download-credit {
  margin-top: 8px;
  font-size: 0.95rem;
  opacity: 0.9;
}

.download-credit a {
  color: var(--white);
  font-weight: 700;
  margin-left: 6px;
}

/* Footer */
.site-footer {
  padding: 40px 0;
  background: #0f2920;
  color: rgba(255, 255, 255, 0.8);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-studio {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
}

.footer-tagline {
  margin: 4px 0 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.footer-nav a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-inner p {
  margin: 0;
}

.footer-meta a {
  color: rgba(255, 255, 255, 0.9);
}

.footer-meta {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
}

/* Live feed (tracks + alerts on homepage) */
.live-feed {
  padding-top: 56px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, transparent 28%),
    var(--cairn-sand);
}

.live-subtitle {
  margin-top: 56px;
}

.section-lead--tight {
  margin-bottom: 28px;
}

.live-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.live-loading,
.live-empty {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.live-tile {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(27, 67, 50, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  min-height: 100%;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

.live-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 44px rgba(27, 67, 50, 0.16);
}

.live-tile-media {
  position: relative;
  aspect-ratio: 16 / 11;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(64, 145, 108, 0.35), transparent 55%),
    linear-gradient(145deg, #d8f3dc 0%, #95d5b2 40%, #2d6a4f 100%);
  overflow: hidden;
  display: grid;
  gap: 2px;
}

.live-tile-media--one {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
}

.live-tile-media--two {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
}

.live-tile-media--four {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.live-tile-cell {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #1b4332;
}

.live-tile-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.live-tile-cell--icon {
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  background:
    radial-gradient(ellipse at 70% 10%, rgba(230, 57, 70, 0.18), transparent 50%),
    linear-gradient(160deg, #f8faf8 0%, #e9f5ee 55%, #cae9d4 100%);
}

.live-tile-media--alert {
  background:
    radial-gradient(ellipse at 70% 10%, rgba(230, 57, 70, 0.18), transparent 50%),
    linear-gradient(160deg, #f8faf8 0%, #e9f5ee 55%, #cae9d4 100%);
}

.live-tile-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(27, 67, 50, 0.88);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.live-tile-badge--alert {
  background: rgba(155, 34, 38, 0.9);
}

.live-tile-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 16px 18px;
  flex: 1;
}

.live-tile-body h3 {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--cairn-green-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.live-tile-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cairn-green);
}

.live-tile-meta span {
  white-space: nowrap;
}

.live-tile-author {
  margin: auto 0 0;
  padding-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.live-cta-wrap {
  margin: 40px 0 0;
  text-align: center;
}

/* Live modal */
body.live-modal-open {
  overflow: hidden;
}

.live-modal[hidden] {
  display: none !important;
}

.live-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.live-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 28, 22, 0.55);
  backdrop-filter: blur(3px);
}

.live-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.live-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--cairn-green-dark);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.live-modal-hero {
  height: 240px;
  overflow: hidden;
  background: #1b4332;
  border-radius: 18px 18px 0 0;
}

.live-modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.live-modal-hero--brand img {
  object-position: center 28%;
}

.live-modal-content {
  padding: 20px 22px 28px;
}

.live-modal-content--alert {
  padding-top: 28px;
  text-align: center;
}

.live-modal-kicker {
  margin: 0 0 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.live-modal-content h2 {
  margin: 0 0 12px;
  color: var(--cairn-green-dark);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.2;
}

.live-modal-content h3 {
  margin: 22px 0 12px;
  color: var(--cairn-green-dark);
  font-size: 1.05rem;
}

.live-modal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--cairn-green);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.live-pill--muted {
  background: rgba(27, 67, 50, 0.12);
  color: var(--cairn-green-dark);
}

.live-pill--accent {
  background: transparent;
  border: 1.5px solid #7c3aed;
  color: #7c3aed;
}

.live-modal-author,
.live-modal-muted,
.live-modal-loading,
.live-modal-desc {
  color: var(--text-muted);
  margin: 0 0 10px;
}

.live-modal-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 12px 0 4px;
  padding-bottom: 4px;
}

.live-modal-thumbs img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  flex: 0 0 auto;
}

.live-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.live-info-card {
  background: #f3f5f4;
  border-radius: 12px;
  padding: 12px 14px;
}

.live-info-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.live-info-value {
  font-weight: 800;
  color: var(--cairn-green-dark);
  font-size: 0.98rem;
}

.live-elev {
  background: #eaf4fb;
  border-radius: 12px;
  padding: 10px 12px 8px;
}

.live-elev-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--cairn-green-dark);
  margin-bottom: 4px;
}

.live-elev-svg {
  width: 100%;
  height: 110px;
  display: block;
}

.live-alert-icon {
  font-size: 2rem;
  margin-bottom: 4px;
}

.live-alert-photo {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 14px;
  margin: 8px 0 16px;
}

.live-contributor {
  text-align: left;
  background: #f7f8f7;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 8px 0 16px;
}

.live-contributor-name {
  font-weight: 800;
  color: var(--cairn-green-dark);
  font-size: 1.05rem;
  margin: 4px 0 8px;
}

.live-contributor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.live-coords {
  margin: 0;
  font-weight: 700;
  color: var(--cairn-green);
  text-align: left;
}

@media (max-width: 960px) {
  .live-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .live-grid {
    grid-template-columns: 1fr;
  }

  .live-info-grid {
    grid-template-columns: 1fr;
  }

  .live-modal {
    padding: 0;
  }

  .live-modal-dialog {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
}

/* Responsive */
@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .lead {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-note {
    margin-inline: auto;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-copy h2 {
    text-align: center;
  }

  .nav a:not(.nav-cta) {
    display: none;
  }

  .nav-cta--secondary {
    display: none;
  }

  .lang-switch {
    margin-left: auto;
    margin-right: 8px;
  }
}
