/* -------------------------------------------------------
   LMTB — Global Styles (clean build)
   Palette + layout + hero/cards + right-hand mobile drawer
   + Support/Connect section (BMC + Social icons)
------------------------------------------------------- */

/* ===== Tokens ===== */
:root{
  /* Brand */
  --ctpl-1:#F7E0BC; --ctpl-2:#E89847; --ctpl-3:#CA7435; --ctpl-4:#442F31;
  --btrf-1:#EA9142; --btrf-2:#423234;
  --bg-0:#FEFDF9; --bg-1:#D8F1F8; --blue:#77C6E9;
  --green-1:#7FC096; --green-2:#457054; --ink:#2F4E4F;
  --white:#fff; --black:#000;

  --radius:22px;
  --shadow:0 6px 24px rgba(0,0,0,.08);
}

/* ===== Reset / Base ===== */
*,*::before,*::after{ box-sizing:border-box; margin:0; padding:0; }
html,body{ height:100%; }
html{ -webkit-text-size-adjust:100%; }
body{
  background:var(--bg-0);
  color:var(--ink);
  font-family:"Rubik",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  line-height:1.55;
}

/* Global media defaults */
img{
  display:block;
  max-width:100%;
  height:auto;
}
a{ color:#0b63ff; text-decoration:underline; }
a:hover{ text-decoration:none; }
button{ font:inherit; }

/* Prevent scroll when mobile menu open */
body.menu-open{ overflow:hidden; touch-action:none; }

/* ===== Layout ===== */
.container{ max-width:1100px; margin:0 auto; padding:28px 16px; }
h1,h2,h3{ font-weight:700; letter-spacing:.2px; margin-bottom:.5rem; }
p{ margin:0 0 1rem; color:#2a3a3b; }

/* ===== Header & Nav ===== */
header.nav{
  position:sticky; top:0; z-index:1000;
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 20px;
  background:#fff;
  border-bottom:1px solid rgba(47,78,79,.08);
  box-shadow:0 1px 3px rgba(0,0,0,.06);
}
.nav-left{ display:flex; align-items:center; gap:10px; }
.logo{ width:36px; height:36px; }
.brand{ font-weight:700; color:#111; text-decoration:none; }

/* Desktop nav */
.nav-links{ display:flex; align-items:center; gap:14px; }
.nav-links a{
  color:#111; text-decoration:none;
  padding:8px 12px; border-radius:14px;
  transition:background .2s ease, transform .2s ease, color .2s ease;
}
.nav-links a:hover{ background:var(--blue); color:var(--black); transform:translateY(-1px); }

/* Burger (hidden on desktop) */
.burger{
  display:none;
  width:38px; height:34px; margin:0 8px; border:0; background:transparent; cursor:pointer;
  position:relative; border-radius:10px;
}
.burger span{
  position:absolute; left:7px; right:7px; height:2px; background:#333;
  transition:transform .2s ease, opacity .2s ease, top .2s ease;
}
.burger span:nth-child(1){ top:10px; }
.burger span:nth-child(2){ top:16px; }
.burger span:nth-child(3){ top:22px; }
body.menu-open .burger span:nth-child(1){ top:16px; transform:rotate(45deg); }
body.menu-open .burger span:nth-child(2){ opacity:0; }
body.menu-open .burger span:nth-child(3){ top:16px; transform:rotate(-45deg); }

/* Backdrop (dim only) */
.menu-backdrop{
  position:fixed; inset:0; z-index:900;
  background:rgba(0,0,0,.4);
  opacity:0; pointer-events:none;
  transition:opacity .3s ease;
}
body.menu-open .menu-backdrop{ opacity:1; pointer-events:all; }

/* ===== Mobile Drawer ===== */
@media (max-width: 959.98px){
  .burger{ display:block; }

  .nav-links{
    position:fixed; z-index:1001; top:0; right:-100%; height:100%;
    width:70%; max-width:320px; background:#fff;
    display:flex; flex-direction:column; padding:2rem 1.5rem; gap:.25rem;
    box-shadow:-24px 0 48px rgba(0,0,0,.15);
    transition:right .3s ease;
  }
  .nav-links.open{ right:0; }

  /* Chip-style items */
  .nav-links a{
    display:inline-flex;
    align-self:flex-start;
    margin:6px 0;
    padding:10px 14px;
    border-radius:16px;
    font-size:1.1rem; font-weight:700; color:#111;
  }
  .nav-links a:hover{ background:rgba(119,198,233,.35); color:#111; }
  .nav-links a.current{ background:var(--blue); color:#111; }
}

/* Desktop reset for nav */
@media (min-width: 960px){
  .menu-backdrop{ display:none; }
  .nav-links{
    position:static; height:auto; width:auto; max-width:none;
    box-shadow:none; padding:0; flex-direction:row; right:0; transition:none;
  }
}

/* ===== Hero ===== */
.hero{
  margin-top:18px;
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(119,198,233,.25), transparent 60%),
    radial-gradient(900px 300px at 100% 0%, rgba(127,192,150,.2), transparent 60%);
  border-radius:var(--radius);
  padding:40px 28px;
  box-shadow:var(--shadow);
}
.hero h1{ font-size:clamp(28px,4vw,44px); margin:0 0 8px; }
.hero p{ font-size:clamp(16px,2.4vw,20px); opacity:.9; margin:0 0 18px; }

/* CTA row */
.cta-row{ display:flex; gap:12px; flex-wrap:wrap; }

/* Buttons */
.btn{
  display:inline-block;
  padding:12px 18px;
  border-radius:16px;
  font-weight:600;
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.btn-primary{ background:var(--ink); color:#fff; box-shadow:0 6px 0 var(--green-2); }
.btn-primary:hover{ transform:translateY(-1px); box-shadow:0 8px 0 var(--green-2); }
.btn-secondary{ border:2px solid var(--ink); color:var(--ink); background:transparent; }
.btn-secondary:hover{ background:var(--ink); color:#fff; }

/* Backward-compat */
.btn-dark{ background:var(--ink); color:#fff; box-shadow:0 6px 0 var(--green-2); }
.btn-dark:hover{ transform:translateY(-1px); box-shadow:0 8px 0 var(--green-2); }
.btn-outline{ border:2px solid var(--ink); color:var(--ink); background:transparent; }
.btn-outline:hover{ background:var(--ink); color:#fff; }

/* ===== Support + Social (between hero and cards) ===== */
.support-connect{
  margin: 1.75rem auto 2.25rem;
  padding: 0 6px;
  text-align:center;
}

.support-connect .support{
  display:flex;
  justify-content:center;
  margin-bottom: 1rem;
}

/* BMC image link */
.bmc-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}
.bmc-link img{
  height:44px;
  width:auto;
  max-width:none;           /* important: prevent global max-width behaviour interfering with aspect sizing */
  opacity:.92;
  transition:opacity .2s ease, transform .2s ease;
}
.bmc-link img:hover{
  opacity:1;
  transform:translateY(-1px);
}

/* Social icon row */
.social-links{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  margin-top:12px;
}

/* Give each icon a fixed hit-area so it can't balloon */
.social-links a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:12px;
  text-decoration:none;
}

/* HARD clamp for SVG icons (works even if SVG has huge intrinsic size) */
.social-links img{
  width:28px;
  height:28px;
  min-width:28px;
  min-height:28px;
  max-width:28px;
  max-height:28px;
  object-fit:contain;
  display:block;
  opacity:.7;
  transition:opacity .2s ease, transform .2s ease;
}
.social-links a:hover img{
  opacity:1;
  transform:translateY(-2px);
}

/* ===== Cards ===== */
.cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:14px;
  margin-top:22px;
}

.card{
  padding:18px;
  border-radius:20px;
  background:#fff;
  box-shadow:var(--shadow);
  border:1px solid rgba(47,78,79,.06);
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.card h3{ margin:0 0 6px; }
.card p{ margin:0 0 1rem; opacity:.9; }

.card:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 28px rgba(0,0,0,.12);
  background:linear-gradient(180deg, rgba(234,145,66,.08), #fff);
}

/* If your cards are links */
.card-link{
  display:block;
  color:inherit;
  text-decoration:none;
  border-radius:20px;
  transition:background .2s ease, transform .2s ease;
}
.card-link:hover h3{ color:var(--btrf-1); }

/* App Store badge */
.appstore-badge{
  margin:.75rem auto 0;
  display:block;
}

/* ===== About page images (kept, simplified) ===== */
.about-figure{ margin:2rem 0; }
.about-figure img{
  width:100%;
  height:auto;
  border-radius:12px;
}

.about-image{
  width:100%;
  height:auto;
  margin:2rem 0;
  border-radius:12px;
}

.about-image-grid{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:1rem;
  margin:2rem 0;
}
@media (max-width: 768px){
  .about-image-grid{ grid-template-columns:1fr; }
}

/* ===== Footer ===== */
.footer{
  padding:28px 16px;
  text-align:center;
  color:#455;
  opacity:.9;
  background:#fff;
  border-top:1px solid #eee;
}

/* ===== Narrow tweaks ===== */
@media (max-width:420px){
  .brand{ font-size:15px; }
  .logo{ width:32px; height:32px; }
  .btn{ padding:11px 16px; }
}

/* ===== Print ===== */
@media print{
  .nav, .menu-backdrop{ display:none !important; }
  .container{ max-width:none; padding:0; }
  .hero,.card{ box-shadow:none; border-color:#ddd; }
}

/* SOCIAL ICONS — clamp no matter how they are embedded */
.social-links a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  border-radius:12px;
  text-decoration:none;
}

/* If using <img src="...svg"> */
.social-links img{
  width:28px !important;
  height:28px !important;
  max-width:28px !important;
  max-height:28px !important;
  object-fit:contain;
  display:block;
}

/* If SVG is inline (<svg>...</svg>) */
.social-links svg{
  width:28px !important;
  height:28px !important;
  max-width:28px !important;
  max-height:28px !important;
  display:block;
}

