/* ==========================================================================
   Cannabis 4 U — brand stylesheet
   Direction: modern apothecary. Deep forest, warm cream, brass.
   ========================================================================== */

:root {
  /* Brand palette */
  --ink:      #14261C;   /* deepest forest — text & dark grounds */
  --forest:   #1E3A2B;   /* primary brand green */
  --moss:     #35604A;   /* secondary green */
  --sage:     #8FA894;   /* muted green — meta text on dark */
  --brass:    #C6A15B;   /* metallic accent */
  --brass-dk: #A8823D;
  --clay:     #B5643C;   /* warning / secondary accent */
  --cream:    #F7F2E7;   /* section ground */
  --paper:    #FDFBF5;   /* page ground */
  --line:     #E0D8C4;   /* hairlines on light */
  --line-dk:  rgba(198,161,91,.28);
  --muted:    #6B7F70;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 1140px;
  --r: 14px;
  --shadow: 0 1px 2px rgba(20,38,28,.05), 0 12px 32px -12px rgba(20,38,28,.16);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--moss); text-decoration-color: var(--line-dk); text-underline-offset: 3px; }
a:hover { color: var(--forest); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
  font-variation-settings: "SOFT" 0, "WONK" 0;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1.1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }

.eyebrow {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--brass-dk);
  margin: 0 0 .9rem;
}
.lede { font-size: 1.18rem; color: #3C4E44; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-size: .95rem; font-weight: 600;
  padding: .85rem 1.5rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none; transition: .18s ease; white-space: nowrap;
}
.btn-primary { background: var(--forest); color: var(--cream); }
.btn-primary:hover { background: var(--ink); color: var(--cream); transform: translateY(-1px); }
.btn-brass { background: var(--brass); color: var(--ink); }
.btn-brass:hover { background: var(--brass-dk); color: #fff; }
.btn-ghost { background: transparent; color: var(--forest); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--moss); background: rgba(53,96,74,.05); }
.btn-sm { padding: .55rem 1rem; font-size: .85rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(253,251,245,.9);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: .7rem 0;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand .seal { width: 42px; height: 42px; flex: none; border-radius: 12px; }
.brand .name {
  font-family: var(--serif); font-weight: 600; font-size: 1.16rem;
  letter-spacing: .04em; line-height: 1.05;
}
.brand .name b { font-weight: 600; }
.brand .name span { display: block; font-family: var(--sans); font-size: .6rem; letter-spacing: .22em; color: var(--muted); text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  font-size: .93rem; font-weight: 500; color: var(--ink);
  text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--brass); }
.nav a[aria-current="page"] { border-bottom-color: var(--brass); color: var(--forest); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .7rem; cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1.25rem; display: none;
  }
  .nav.open { display: flex; }
  .nav a { width: 100%; padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: .75rem; width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 82% -8%, rgba(198,161,91,.18), transparent 62%),
    linear-gradient(175deg, var(--ink), var(--forest) 62%, #21402F);
  color: var(--cream);
  padding: clamp(3.5rem, 9vw, 6.5rem) 0 clamp(3.5rem, 8vw, 6rem);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(247,242,231,.05) 1px, transparent 1px);
  background-size: 22px 22px;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.hero h1 { color: var(--cream); }
.hero .lede { color: rgba(247,242,231,.82); font-size: 1.2rem; max-width: 34em; }
.hero .eyebrow { color: var(--brass); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero .btn-ghost, section.dark .btn-ghost { color: var(--cream); border-color: var(--line-dk); }
.hero .btn-ghost:hover, section.dark .btn-ghost:hover { background: rgba(247,242,231,.09); border-color: var(--brass); color: var(--cream); }
.hero-seal { justify-self: center; width: min(320px, 80%); filter: drop-shadow(0 24px 48px rgba(0,0,0,.35)); }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero-seal { display: none; } }

.hero-stats { display: flex; flex-wrap: wrap; gap: 1.6rem 2.2rem; margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--line-dk); }
.hero-stats div strong { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--brass); }
.hero-stats div span { font-size: .82rem; letter-spacing: .06em; color: var(--sage); }

/* ---------- Sections ---------- */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
section.tint { background: var(--cream); }
section.dark { background: var(--ink); color: var(--cream); }
section.dark h2, section.dark h3 { color: var(--cream); }
section.dark p { color: rgba(247,242,231,.78); }

.section-head { max-width: 44em; margin-bottom: 2.6rem; }

.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1.6rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4rem; }
a.card { text-decoration: none; color: inherit; display: block; transition: .18s ease; }
a.card:hover { border-color: var(--brass); transform: translateY(-2px); }
a.card h3 { color: var(--ink); }
.card p:last-child { margin-bottom: 0; }
.card .icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: rgba(53,96,74,.09); color: var(--moss); margin-bottom: 1rem;
  font-family: var(--serif); font-size: 1.1rem; font-weight: 700;
}
section.dark .card { background: rgba(247,242,231,.045); border-color: var(--line-dk); box-shadow: none; }
section.dark .card .icon { background: rgba(198,161,91,.14); color: var(--brass); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: .95rem; }
th, td { text-align: left; padding: .85rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--cream); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }

/* ---------- Finder ---------- */
.finder-bar { background: var(--cream); border-bottom: 1px solid var(--line); padding: 1.4rem 0; position: sticky; top: 58px; z-index: 30; }
.finder-form { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.field { position: relative; flex: 1 1 260px; }
.field input, .field select {
  width: 100%; font-family: var(--sans); font-size: .98rem;
  padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--ink);
}
.field input:focus, .field select:focus { outline: 2px solid var(--brass); outline-offset: 1px; border-color: transparent; }
.field select { flex: 0 0 auto; }

.finder-layout { display: grid; grid-template-columns: 400px 1fr; gap: 0; min-height: 60vh; }
@media (max-width: 980px) { .finder-layout { grid-template-columns: 1fr; } .finder-map { min-height: 340px; order: -1; } }

.results { border-right: 1px solid var(--line); max-height: calc(100vh - 130px); overflow-y: auto; }
@media (max-width: 980px) { .results { border-right: 0; max-height: none; } }
.result {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  border-bottom: 1px solid var(--line); padding: 1.1rem 1.3rem; cursor: pointer;
  font-family: var(--sans); transition: background .15s;
}
.result:hover { background: var(--cream); }
.result[aria-selected="true"] { background: var(--cream); box-shadow: inset 3px 0 0 var(--brass); }
.result .row1 { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.result .rname { font-family: var(--serif); font-size: 1.08rem; font-weight: 600; color: var(--ink); }
.result .rdist { font-size: .82rem; font-weight: 600; color: var(--brass-dk); white-space: nowrap; }
.result .raddr { font-size: .87rem; color: var(--muted); margin: .2rem 0 .5rem; }
.result .rmeta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .82rem; }

.stars { color: var(--brass); letter-spacing: .06em; font-size: .95rem; }
.pill {
  font-size: .7rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: .22rem .55rem; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); background: var(--paper);
}
.pill.open { color: #1F6B45; border-color: rgba(31,107,69,.35); background: rgba(31,107,69,.07); }
.pill.closed { color: var(--clay); border-color: rgba(181,100,60,.35); background: rgba(181,100,60,.07); }

.finder-map { background: var(--cream); position: relative; }
.finder-map::before { content: "Map loads once you run a search"; position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; color: var(--muted); font-size: .88rem; }
.leaflet-container { background: var(--cream) !important; }
#map { position: absolute; inset: 0; z-index: 1; }
@media (max-width: 980px) { #map { position: relative; height: 340px; } }

.detail {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
  background: var(--paper); border-left: 1px solid var(--line);
  box-shadow: -20px 0 50px -25px rgba(20,38,28,.35);
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  z-index: 60; overflow-y: auto; padding: 1.6rem 1.6rem 4rem;
}
.detail.open { transform: none; }
.detail .close { position: absolute; top: 1rem; right: 1rem; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.detail h2 { margin-top: .6rem; font-size: 1.7rem; }
.dl { display: grid; grid-template-columns: 92px 1fr; gap: .5rem 1rem; font-size: .93rem; margin: 1.2rem 0; }
.dl dt { color: var(--muted); font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; padding-top: .12rem; }
.dl dd { margin: 0; }

/* ---------- Reviews ---------- */
.review { border-top: 1px solid var(--line); padding: 1rem 0; }
.review .rhead { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.review .rwho { font-weight: 600; font-size: .93rem; }
.review .rwhen { font-size: .8rem; color: var(--muted); }
.review p { font-size: .94rem; margin: .4rem 0 0; }

.star-input { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.star-input input { position: absolute; opacity: 0; width: 0; }
.star-input label { font-size: 1.7rem; color: var(--line); cursor: pointer; line-height: 1; transition: color .12s; }
.star-input input:checked ~ label,
.star-input label:hover, .star-input label:hover ~ label { color: var(--brass); }
.star-input input:focus-visible + label { outline: 2px solid var(--brass); }

textarea {
  width: 100%; font-family: var(--sans); font-size: .95rem; padding: .8rem 1rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper);
  color: var(--ink); resize: vertical; min-height: 100px;
}
textarea:focus { outline: 2px solid var(--brass); outline-offset: 1px; }

.notice {
  border: 1px solid var(--line-dk); background: rgba(198,161,91,.09);
  border-radius: 12px; padding: 1rem 1.1rem; font-size: .9rem; color: #4A5C51;
}
.notice strong { color: var(--ink); }

/* ---------- Age gate ---------- */
.gate {
  position: fixed; inset: 0; z-index: 200;
  background: linear-gradient(170deg, var(--ink), var(--forest));
  display: grid; place-items: center; padding: 1.5rem;
}
.gate[hidden] { display: none; }
.gate-card { max-width: 440px; text-align: center; color: var(--cream); }
.gate-card svg { width: 84px; margin-bottom: 1.4rem; }
.gate-card h2 { color: var(--cream); font-size: 1.9rem; }
.gate-card p { color: rgba(247,242,231,.75); font-size: .96rem; }
.gate-actions { display: flex; gap: .7rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.gate .btn-ghost { color: var(--cream); border-color: var(--line-dk); }
.gate .btn-ghost:hover { background: rgba(247,242,231,.08); color: var(--cream); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 1.5rem; background: rgba(20,38,28,.55); backdrop-filter: blur(3px); }
.modal[hidden] { display: none; }
.modal-card { background: var(--paper); border-radius: 18px; padding: 2rem; width: min(440px, 100%); box-shadow: var(--shadow); position: relative; }
.modal-card h3 { font-size: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--sage); padding: 3.5rem 0 2rem; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { font-family: var(--sans); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brass); margin-bottom: .9rem; }
.site-footer a { color: rgba(247,242,231,.8); text-decoration: none; display: block; padding: .22rem 0; }
.site-footer a:hover { color: var(--brass); }
.footer-brand p { color: rgba(247,242,231,.6); max-width: 30em; font-size: .88rem; }
.footer-bottom { border-top: 1px solid var(--line-dk); margin-top: 2.5rem; padding-top: 1.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .8rem; color: rgba(247,242,231,.5); }

.disclaimer { font-size: .82rem; color: var(--muted); border-left: 2px solid var(--brass); padding-left: 1rem; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; position: fixed; z-index: 300; background: var(--paper); padding: .7rem 1rem; border-radius: 8px; }

.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--brass); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.center-state { display: grid; place-items: center; gap: .8rem; padding: 3rem 1.5rem; text-align: center; color: var(--muted); font-size: .92rem; }


/* ---------- Brand kit page ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.swatch { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--paper); }
.swatch .chip { height: 92px; }
.swatch .meta { padding: .7rem .9rem; font-size: .8rem; }
.swatch .meta b { display: block; font-family: var(--sans); font-size: .85rem; }
.swatch .meta code { color: var(--muted); font-size: .78rem; }
.logo-box { border: 1px solid var(--line); border-radius: var(--r); padding: 2rem; display: grid; place-items: center; min-height: 190px; }
.logo-box.dark { background: var(--ink); border-color: var(--line-dk); }
.type-row { border-top: 1px solid var(--line); padding: 1.2rem 0; }
.type-row small { display: block; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
