/* PLAINspoken design system — Fasthand Studio rulebook
   Palette tokens (rule 10): creamy neutrals for surfaces, one high-contrast accent for key actions */

:root {
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --border: #E3E0D9;
  --text: #1C1B18;
  --muted: #6E6A61;
  --accent: #0B57D0;          /* white text on this passes rule 4 contrast */
  --accent-tint: #E9F0FC;
  --glyph-blue: #0B57D0;
  --glyph-green: #178A4C;
  --glyph-orange: #D9730D;
  --glyph-purple: #7C3AED;
  --glyph-red: #D92D20;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* rule 5/17 */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: auto; } /* rule 15: no animated smooth-scroll lag */

body {
  font-family: var(--font);
  font-size: 17px;             /* rule 5: body 17px regular */
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.75; }     /* rule 7: instant opacity feedback */

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Buttons (rules 1, 3, 9, 12, 24) ----------
   .btn    = 32px height → 16px radius (H/2)
   .btn-lg = 44px height → 22px radius (H/2)
   superellipse(1.5) on every variant, never 9999px/50% */

.btn, .btn-lg {
  display: inline-flex;        /* rule 11: icon + label as one unit */
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font);
  font-size: 17px;             /* rule 5: buttons 17px semibold */
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;         /* rule 1: single-line labels */
  cursor: pointer;
  corner-shape: superellipse(1.5);
  border: 1px solid transparent;
  background: none;
}

.btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 16px;         /* exactly H/2 of 32px */
}

.btn-lg {
  height: 44px;
  padding: 0 20px;
  border-radius: 22px;         /* exactly H/2 of 44px */
}

/* rule 9: hierarchy by prominence, not size */
.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
}
.btn-primary:hover { opacity: 0.88; }

.btn-tinted {
  background: var(--accent-tint);
  color: var(--accent);
}
.btn-tinted:hover { opacity: 0.8; }
.btn-tinted.is-active {
  border-color: var(--accent);
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { opacity: 0.75; }

/* ---------- Slim top bar (rules 8, 16) ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 20px;
  background: var(--bg);       /* solid fill — no blur (rule 19) */
  border-bottom: 1px solid var(--border); /* rule 6: hairline, not shadow */
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
}
.brand svg { color: var(--accent); }

.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.topnav a {
  height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 16px;         /* H/2 of the 32px capsule */
  corner-shape: superellipse(1.5);
  white-space: nowrap;
}
.topnav a:hover {
  background: var(--accent-tint); /* rule 7: active tint */
  color: var(--accent);
  opacity: 1;
}

/* ---------- Layout (rule 22: modest sizes, compact sections) ---------- */

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 44px 20px 8px;
}

h1 { font-size: 27px; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 21px; font-weight: 650; letter-spacing: -0.01em; }

.lede {
  color: var(--muted);
  margin-top: 6px;
  max-width: 640px;
}

/* ---------- Map (location first) ---------- */

.map-card {
  margin-top: 18px;
  border: 1px solid var(--border);   /* rule 6 */
  border-radius: 16px;
  corner-shape: superellipse(1.5);
  overflow: hidden;
  background: var(--surface);
}

.map-card iframe {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
}

.map-caption {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 15px;
  color: var(--muted);
}
.map-caption svg { color: var(--glyph-red); flex-shrink: 0; }

/* ---------- Intro: shop name/description + owner & business facts ---------- */

.intro-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 28px;
  margin-top: 26px;
}

.intro-grid p { color: var(--muted); margin-top: 8px; }

.facts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fact {
  display: flex;               /* rule 11: glyph paired inline with text */
  align-items: flex-start;
  gap: 10px;
}
.fact svg { flex-shrink: 0; margin-top: 3px; }
.fact dt { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.fact dd { font-size: 15px; }

.glyph-blue   { color: var(--glyph-blue); }
.glyph-green  { color: var(--glyph-green); }
.glyph-orange { color: var(--glyph-orange); }
.glyph-purple { color: var(--glyph-purple); }

/* ---------- Store media: 360 panorama + photo grid ---------- */

.pano {
  position: relative;
  margin-top: 18px;
  height: 340px;
  border: 1px solid var(--border);
  border-radius: 16px;
  corner-shape: superellipse(1.5);
  overflow: hidden;
  background: var(--surface) url("/assets/interior-panorama.png") repeat-x;
  background-size: auto 100%;
  background-position-x: 0px;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.pano.dragging { cursor: grabbing; }

.pano-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;         /* H/2 of 28px */
  corner-shape: superellipse(1.5);
  pointer-events: none;
  white-space: nowrap;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* rule 23: four, never three */
  gap: 12px;
  margin-top: 14px;
}

.photo-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  corner-shape: superellipse(1.5);
  overflow: hidden;
  background: var(--surface);
}
.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.photo-card figcaption {
  padding: 8px 12px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

/* ---------- Products ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* rule 23 */
  gap: 12px;
  margin-top: 14px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);   /* rule 6: hairline depth, no shadow */
  border-radius: 16px;
  corner-shape: superellipse(1.5);
  background: var(--surface);
}

.product-card .glyph { width: 20px; height: 20px; } /* rule 7: bare glyph, no box */

.product-name { font-size: 15px; font-weight: 650; }
.product-spec { font-size: 13px; color: var(--muted); }

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
}
.product-price { font-size: 15px; font-weight: 650; }

.grid-foot { margin-top: 16px; }

/* ---------- Visit / CTA ---------- */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* ---------- Footer ---------- */

.footer {
  max-width: 1080px;
  margin: 40px auto 0;
  padding: 20px 20px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-nap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 14px;
  color: var(--muted);
}
.footer-nap strong { color: var(--text); font-weight: 650; }

.footer-nav { display: flex; gap: 14px; font-size: 14px; }
.footer-nav a { color: var(--muted); }

.copyright { font-size: 13px; color: var(--muted); }

/* ---------- Responsive (rule 2: tighter density on mobile) ---------- */

@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; gap: 18px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

@media (max-width: 640px) {
  .section { padding: 28px 14px 6px; }  /* rule 2 */
  .topbar { padding: 0 14px; gap: 10px; }
  .topnav { display: none; }            /* keep the bar slim on small screens */
  .topbar .btn { margin-left: auto; }
  .map-card iframe { height: 260px; }
  .pano { height: 220px; }
  .intro-grid, .filters, .cta-row { margin-top: 12px; }
  .fact dd { font-size: 14px; }
}
