:root {
  --ink: #12213b;
  --paper: #f5f3ee;
  --accent: #b64a26;       /* warm terracotta */
  --accent2: #1f5f68;      /* deep teal */
  --card-bg: #ffffff;
  --shadow: 0 10px 30px rgba(18, 33, 59, 0.12);
  --radius: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body.landing {
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
}

/* ---------- Landing ---------- */
.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 32px;
  text-align: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent2);
  margin: 0 0 12px;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.05;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}
.lede {
  font-size: 1.12rem;
  color: #3d4a5f;
  max-width: 560px;
  margin: 0 auto 18px;
}
.howto {
  font-size: 0.95rem;
  background: #ffffff;
  border: 1px solid #e3dfd6;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 14px 18px;
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

.cards {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 24px 64px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(18, 33, 59, 0.18);
}
.card-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent2), #2e7f8a);
}
.card-emoji { font-size: 3.2rem; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25)); }
.card-body { padding: 18px; }
.card-body h2 { margin: 0 0 4px; font-size: 1.15rem; }
.card-sub { margin: 0 0 12px; color: #6a7689; font-size: 0.9rem; }
.card-cta { font-size: 0.85rem; font-weight: 700; color: var(--accent); }

.foot {
  text-align: center;
  padding: 24px;
  color: #8a93a3;
  font-size: 0.85rem;
  border-top: 1px solid #e3dfd6;
}
.empty { text-align: center; color: #6a7689; }

/* ---------- AR view ---------- */
body.ar-view {
  background: #000;
  color: #fff;
  overflow: hidden;
  height: 100dvh;
  width: 100%;
  position: relative;
  touch-action: none;
}
#camerafeed {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Top title bar */
.ar-titlebar {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 10;
  pointer-events: none;
}
.ar-title { font-size: 1.15rem; font-weight: 700; }
.ar-subtitle { font-size: 0.85rem; opacity: 0.85; }

/* Centred status hint (camera loading / error) */
.overlay-hint {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}
.overlay-status {
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Bottom call-to-action */
.ar-cta {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
  white-space: nowrap;
}

/* Info button + panel */
.info-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  z-index: 12;
  cursor: pointer;
}
.info-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  color: var(--ink);
  border-radius: 20px 20px 0 0;
  padding: 24px 22px 30px;
  z-index: 15;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.info-panel.visible {
  transform: translateY(0);
}
.info-panel h2 { margin: 0 0 8px; }
.info-panel p { margin: 0 0 16px; color: #3d4a5f; }
.info-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #6a7689;
  cursor: pointer;
}
.info-back {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* Show the title bar + CTA once the model has loaded */
body.model-ready .overlay-hint { display: none; }
