/* =========================
   TrekCrumbs – Global Styles
   ========================= */

/* Theme tokens */
:root {
  --bg: #0b0e12;
  --surface: #12161c;
  --text: #e7edf5;
  --muted: #a8b3c7;
  --primary: #2A6EDB;
  /* blue */
  --accent: #E2554F;
  /* orange/red */
  --card: #0f1319;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

/* Light theme override */
[data-theme="light"] {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --text: #0b1321;
  --muted: #4a5568;
  --card: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Accent swap (blue ↔︎ accent) */
.accent-alt {
  --primary: var(--accent);
}

/* Base */
html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(42, 110, 219, 0.15), transparent 60%),
    radial-gradient(1000px 700px at 90% 10%, rgba(226, 85, 79, 0.12), transparent 60%),
    var(--bg);
  line-height: 1.55;
}

h1,
h2,
h3 {
  font-family: Montserrat, Inter, ui-sans-serif, system-ui, -apple-system;
  letter-spacing: 0.2px;
  margin: 0 0 0.5rem;
}

h1 {
  font-weight: 800;
  font-size: clamp(2rem, 3.6vw, 3rem);
}

h2 {
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
}

h3 {
  font-weight: 700;
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

a {
  color: var(--text);
  text-decoration: none;
}

a.btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
}

a.btn:hover {
  transform: translateY(-2px);
}

/* Layout */
.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

section {
  padding: 4rem 0;
}

/* Header / Nav */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: saturate(1.2) blur(8px);
  background: color-mix(in sRGB, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.brand img {
  height: 40px;
  width: auto;
  border-radius: 10px;
}

.brand .name {
  font-weight: 800;
  letter-spacing: .2px;
}

.nav-ctrls {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: .6rem .8rem;
  border-radius: 12px;
  font-weight: 600;
}

/* Hero */
.hero {
  padding: 7rem 0 5rem;
  text-align: center;
}

.hero h1 span {
  color: var(--primary);
}

.hero p.sub {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  max-width: 780px;
  margin: .75rem auto 1.75rem;
}

.cta-row {
  display: flex;
  gap: .5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* Signup Form */
form.signup {
  display: flex;
  gap: .6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.input {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .9rem 1rem;
  border-radius: 12px;
  outline: none;
  min-width: 300px;
}

.submit {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: .9rem 1rem;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}

/* Section headings */
.section-head {
  text-align: center;
  margin-bottom: 2rem;
}

/* What is TrekCrumbs (tiles) */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  transform: translateY(8px);
  opacity: 0;
  transition: transform .6s cubic-bezier(.2, .65, .2, 1), opacity .6s;
  text-align: center;
}

.tile.reveal {
  transform: translateY(0);
  opacity: 1;
}

.tile .icon {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in sRGB, var(--primary) 20%, transparent);
  margin: 0 auto .5rem auto;
}

.tile .icon img {
  width: 36px;
  height: 36px;
  display: block;
}

/* Video */
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: transform .6s, opacity .6s;
}

.feature.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  filter: saturate(.7) contrast(1);
  opacity: .9;
  box-shadow: var(--shadow);
}

.gallery figure {
  margin: 0;
}

.gallery figcaption {
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
  margin-top: .25rem;
}

/* CTA block */
.cta {
  background: linear-gradient(135deg,
      color-mix(in sRGB, var(--primary) 35%, transparent),
      color-mix(in sRGB, var(--accent) 25%, transparent));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

/* Footer */
footer {
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--border);
}

.foot {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Accessibility helper */
.sr-only {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* GDPR banner */
.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, .2);
}

.consent-inner {
  width: min(1120px, 92%);
  margin: 0 auto;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 0;
  flex-wrap: wrap;
}

.consent-text {
  max-width: 780px;
  font-size: .95rem;
  color: var(--muted);
}

.consent-actions {
  display: flex;
  gap: .5rem;
}

.consent-actions button {
  padding: .6rem .9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.consent-actions .accept-all {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

/* Video consent placeholder */
.video-consent {
  display: grid;
  place-items: center;
  aspect-ratio: 16/9;
  width: 100%;
  background: linear-gradient(135deg,
      color-mix(in sRGB, var(--primary) 20%, transparent),
      color-mix(in sRGB, var(--accent) 15%, transparent));
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  padding: 1.25rem;
}

.video-consent h3 {
  margin: .25rem 0 .5rem;
}

.video-consent p {
  margin: 0 0 .75rem;
}

.video-consent .btn-row {
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.video-consent .btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: .6rem .9rem;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.video-consent .ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: .6rem .9rem;
  border-radius: 10px;
  font-weight: 700;
}

/* Success modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 120;
}

.modal[open] {
  display: grid;
  place-items: center;
}

.modal .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(2px);
}

.modal .card {
  position: relative;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  width: min(520px, 92%);
  padding: 1.25rem 1.25rem 1rem;
}

.modal h3 {
  margin: 0 0 .5rem;
  font-size: 1.3rem;
}

.modal p {
  margin: 0 0 1rem;
}

.modal .row {
  display: flex;
  gap: .5rem;
  justify-content: flex-end;
}

.modal button {
  padding: .6rem .9rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.modal .primary {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

/* Content cards for policy/terms pages */
.content-card,
.policy-wrap,
.terms-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.policy-wrap h1,
.terms-wrap h1 {
  margin-bottom: .75rem;
}

.policy-wrap ul,
.terms-wrap ul {
  padding-left: 1.2rem;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}