/* ==========================================================================
   DiscoverMyCity — /shared/site.css
   Merged + de-duplicated (includes what was previously inline in index.html)
   Notes:
   - Remove the <style> block from index.html so this file takes effect.
   - No underline hover globally.
   - Sponsored badge keeps the purple touch.
   - Header tint works (isolation + z-index layering).
   ========================================================================== */

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

html { scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

/* Links: clean, no underline hover */
a{
  color: inherit;
  text-decoration: none;
}
a:hover{
  color: var(--accent-blue);
  text-decoration: none;
}

p{ line-height: 1.6; margin: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -0.2px; }

.small{ font-size: 12.5px; opacity: .75; }

/* ----- Tokens ----- */
:root{
  /* Base */
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: rgba(255,255,255,.72);

  --text: #111111;
  --muted: rgba(0,0,0,.62);

  --border: rgba(0,0,0,.10);
  --border-2: rgba(0,0,0,.06);

  --shadow: 0 8px 30px rgba(0,0,0,.08);
  --shadow-soft: 0 1px 0 rgba(0,0,0,.04), 0 10px 30px rgba(0,0,0,.06);

  --radius: 18px;
  --radius-sm: 14px;

  /* Page rhythm */
  --max: 1050px;  /* matches your article page */
  --pad: 16px;    /* matches your article page */

  /* Pink → orange brand energy (header tint) */
  --brand-pink: #ff2d55;
  --brand-orange: #ff9f0a;

  /* Blue → purple interaction accents */
  --accent-blue: #0a84ff;
  --accent-purple: #7d2ae8;
  --accent-soft: rgba(10,132,255,.12);
  --accent-border: rgba(10,132,255,.22);

  /* Article-page helpers (formerly dm vars) */
  --dm-radius: 16px;
  --dm-border: 1px solid rgba(0,0,0,.06);
  --dm-shadow: 0 10px 30px rgba(0,0,0,.08);
}

/* ----- Layout helpers ----- */
.container{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ----- Header (full-width band) ----- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;

  /* ensures ::before tint sits behind header content properly */
  isolation: isolate;

  width: 100%;
  color: #111111;
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid rgba(0,0,0,.07);
}

/* Subtle pink/orange header energy across full width */
.site-header::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:-1;
  background: #ffffff;
  opacity: 1;
}

.header-inner{
  position: relative; /* above tint */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}

.brand{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-family: "SF Pro Rounded", "Avenir Next", "Nunito Sans", "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  font-weight: 800;
  font-size: clamp(1.08rem, 1.25vw, 1.28rem);
  letter-spacing: -0.35px;
  white-space: nowrap;
  line-height: 1;
  color: var(--brand-pink);
  filter: saturate(1.2) contrast(1.06);
  text-shadow: none;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .brand{
    background: linear-gradient(100deg, #ff2d8a 0%, #ff6a3d 52%, #ff9f0a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.nav{
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a{
  font-size: 13px;
  opacity: .78;
  padding: 6px 10px;
  border-radius: 999px;
}

.nav a:hover{
  opacity: 1;
  background: var(--accent-soft);
}

.nav a.active{
  font-weight: 650;
  opacity: 1;
}

/* ----- Hero / Page header ----- */
.hero{ padding: 38px 0 18px; }

.kicker{ font-size: 13px; opacity: .78; margin: 0 0 6px; }

/* Your page uses a plain h1, so keep global h1 sane */
h1{ margin: 0; font-size: 30px; line-height: 1.15; }

.sub{
  margin: 10px 0 0;
  font-size: 15px;
  opacity: .86;
  max-width: 75ch;
}

.crumb{
  margin-top: 10px;
  font-size: 12.5px;
  opacity: .70;
}

/* Hero card (was inline) */
.heroCard{
  border-radius: var(--dm-radius);
  box-shadow: var(--dm-shadow);
  border: 1px solid rgba(255,255,255,.30);
  background: linear-gradient(100deg, #ff2d8a 0%, #ff6a3d 52%, #ff9f0a 100%);
  color: #ffffff;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.heroCard a{ color: inherit; }
.heroCard a:hover{ color: #ffffff; opacity: .88; }
.heroCard .kicker,
.heroCard .sub,
.heroCard .crumb,
.heroCard .small{ opacity: .92; }
.heroCard .badge{
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.34);
  color: #ffffff;
}
.heroCard .note{
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28);
}
.heroCard .note svg,
.heroCard .note span{ opacity: .95; }

/* Quick notes row (was inline) */
.noteRow{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.note{
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255,255,255,.78);
  border: var(--dm-border);
  border-radius: 14px;
  padding: 10px 12px;
  flex: 1 1 260px;
}
.note svg{ width: 22px; height: 22px; flex: 0 0 auto; opacity: .75; }
.note b{ display: block; font-size: 13px; margin-bottom: 2px; }
.note span{ font-size: 12.5px; opacity: .78; }

/* ----- Sections ----- */
.section{ padding: 16px 0 26px; }

h2{ margin: 0 0 10px; font-size: 18px; }

/* ----- Grid system ----- */
/* Default for article pages: 2 columns */
.grid{
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 820px){
  .grid{ grid-template-columns: 1fr; }
}

/* Optional: 4-up grid for home pages later */
.grid.grid-4{ grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px){
  .grid.grid-4{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px){
  .grid.grid-4{ grid-template-columns: 1fr; }
}

/* ----- Card / article blocks ----- */
.card{
  background: #fff;
  border-radius: var(--dm-radius);
  box-shadow: var(--dm-shadow);
  border: var(--dm-border);
  padding: 14px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

/* Keep hover subtle (no gradient bar) */
.card:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(0,0,0,.10);
}

/* Top row inside cards */
.top{
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.thumb{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255,106,61,.45);
  background: linear-gradient(100deg, #ff2d8a 0%, #ff6a3d 52%, #ff9f0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.thumbNumber{ font-size: 13px; font-weight: 700; color: #ffffff; line-height: 1; }

.titleRow{ flex: 1 1 auto; }

.place{ margin: 0; font-size: 16px; }

.meta{ margin: 4px 0 0; font-size: 12.5px; opacity: .74; }

/* Badges row (article cards) */
.badges{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* Badge base */
.badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  border: var(--dm-border);
  background: rgba(255,255,255,.85);
}

.badge.sponsored{
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-blue);
}

/* Optional: new */
.badge.new{
  background: rgba(10,132,255,.10);
  border-color: rgba(10,132,255,.22);
  color: rgba(10,132,255,.95);
}

.desc{ margin: 10px 0 0; font-size: 13.5px; opacity: .88; }
.tips{ margin: 10px 0 0; font-size: 12.8px; opacity: .80; }

/* Review box inside cards */
.reviewBox{
  margin-top: 12px;
  border-radius: 14px;
  border: var(--dm-border);
  background: rgba(0,0,0,.02);
  padding: 10px 12px;
}
.reviewBox h3{
  margin: 0 0 6px;
  font-size: 13px;
}
.reviewBox ul{ margin: 0; padding-left: 18px; }
.reviewBox li{ margin: 4px 0; font-size: 12.8px; opacity: .86; }
.reviewBox .caution{ margin-top: 8px; font-size: 12.8px; opacity: .84; }

/* Source links block inside review box */
.links{
  margin-top: 8px;
  font-size: 12.5px;
  opacity: .95;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.links a{
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  opacity: .78;
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
}
.links a:hover{
  opacity: 1;
  background: var(--accent-soft);
  border-color: transparent;
}

/* “How we pick” panel */
.howWePick{
  border-radius: var(--dm-radius);
  border: var(--dm-border);
  background: rgba(255,255,255,.72);
  padding: 12px 14px;
  box-shadow: var(--dm-shadow);
}
.howWePick ul{ margin: 8px 0 0; padding-left: 18px; }
.howWePick li{ margin: 6px 0; font-size: 12.8px; opacity: .86; }

/* Sources footer */
.sources{
  margin-top: 14px;
  font-size: 12.5px;
  opacity: .78;
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 12px;
}
.sources a{
  display: inline-flex;
  align-items: center;
  word-break: break-word;
  opacity: .78;
  padding: 4px 8px;
  border-radius: 999px;
}
.sources a:hover{
  opacity: 1;
  background: var(--accent-soft);
}

/* ----- Footer ----- */
.footer{
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
  padding: 18px 0;
  margin-top: 10px;
}

/* ----- Focus (accessible) ----- */
:focus{ outline: none; }
:focus-visible{
  outline: 3px solid rgba(10,132,255,.35);
  outline-offset: 3px;
  border-radius: 12px;
}

/* ----- Reduce motion ----- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ transition: none !important; }
}

/* ----- Auto dark mode ----- */
@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b0b0d;
    --surface: #141417;
    --surface-2: rgba(20,20,23,.72);

    --text: #f5f5f7;
    --muted: rgba(245,245,247,.68);

    --border: rgba(245,245,247,.14);
    --border-2: rgba(245,245,247,.10);

    --shadow: 0 10px 40px rgba(0,0,0,.55);
    --shadow-soft: 0 1px 0 rgba(255,255,255,.04), 0 12px 32px rgba(0,0,0,.45);

    --accent-blue: #67b3ff;
    --accent-purple: #b38cff;
    --accent-soft: rgba(103,179,255,.14);
    --accent-border: rgba(103,179,255,.26);

    --brand-pink: #ff375f;
    --brand-orange: #ffd60a;

    --dm-border: 1px solid rgba(245,245,247,.10);
    --dm-shadow: 0 12px 40px rgba(0,0,0,.50);
  }

  .site-header{
    color: #111111;
    background: #ffffff;
    border-bottom-color: rgba(0,0,0,.07);
  }

  .site-header::before{
    background: #ffffff;
    opacity: 1;
  }

  a:hover{ color: var(--accent-blue); }

  .card{ background: rgba(20,20,23,.92); }
  .heroCard{
    background: linear-gradient(100deg, #ff2d8a 0%, #ff6a3d 52%, #ff9f0a 100%);
    border-color: rgba(255,255,255,.30);
    color: #ffffff;
  }

  .note{ background: rgba(20,20,23,.72); }
  .badge{ background: rgba(255,255,255,.06); }

  .badge.sponsored{
    background: linear-gradient(100deg, #ff2d8a 0%, #ff6a3d 52%, #ff9f0a 100%);
    border-color: rgba(255,106,61,.42);
    color: #ffffff;
  }

  :focus-visible{
    outline: 3px solid rgba(103,179,255,.38);
  }
}
