/* Alliance Tattoo Studio — bespoke single-page site
   Theme: black satin + bronze highlights. Mobile-first. */

:root {
  /* Satin blacks — neutral, near-black with a soft sheen (no brown warmth) */
  --leather-900: #0a0a0b;
  --leather-800: #101012;
  --leather-700: #17171a;
  --leather-600: #202024;
  --leather-line: #2d2d33;

  /* Burnished bronze highlights */
  --copper-900: #5e3618;
  --copper-700: #8a4f24;
  --copper-500: #b87333;   /* primary burnished bronze */
  --copper-400: #c88a4a;
  --copper-300: #e0a96d;   /* highlight */
  --copper-glow: rgba(200, 138, 74, 0.35);

  /* Text — soft neutral, slight warmth only */
  --ink-100: #f1eee8;
  --ink-200: #ddd8ce;
  --ink-300: #b0aa9f;
  --ink-400: #837e76;

  --star: #e0a96d;
  --ok: #7bbf6a;

  --maxw: 1100px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.55);

  --font-display: "Oswald", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-200);
  background-color: var(--leather-900);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Fixed background layer — stays put while the page scrolls (no parallax). */
.site-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-color: var(--leather-900);
  background-image:
    radial-gradient(circle at 20% 15%, rgba(184, 115, 51, 0.06), transparent 40%),
    radial-gradient(circle at 85% 60%, rgba(184, 115, 51, 0.05), transparent 45%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 5px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.25) 0 3px, transparent 3px 7px);
}

img { max-width: 100%; display: block; }
a { color: var(--copper-300); text-decoration: none; }
a:hover { color: var(--copper-400); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.05;
  color: var(--ink-100);
  margin: 0 0 0.5em;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.section { padding: 44px 0; }
.section-title {
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 6px;
}
.section-title::after {
  content: "";
  display: block;
  width: 74px; height: 3px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, transparent, var(--copper-500), transparent);
  border-radius: 2px;
}
.section-sub { text-align: center; color: var(--ink-400); margin: 0 0 26px; }

/* ---------- Top action bar (sticky) ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.97), rgba(10, 10, 12, 0.86));
  border-bottom: 1px solid var(--leather-line);
  backdrop-filter: blur(6px);
}
.topbar .brand { display: flex; align-items: center; min-width: 0; }
.topbar .brand img { height: 40px; width: auto; }
.topbar .call {
  flex: none;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  font-weight: 700; font-size: 0.9rem;
  color: #1a1109;
  background: linear-gradient(180deg, var(--copper-300), var(--copper-500));
  box-shadow: 0 4px 14px var(--copper-glow);
}
.topbar .call:hover { color: #1a1109; filter: brightness(1.06); }

/* ---------- Hero: pertinent info top & center ---------- */
.hero { text-align: center; padding: 22px 0 8px; }
.hero .logo { width: min(300px, 74vw); margin: 0 auto 8px; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6)); }
.hero .place {
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 3px; font-size: 0.9rem; color: var(--copper-300);
  margin: 0 0 10px;
}
.hero .tagline { color: var(--ink-200); font-size: 1.05rem; margin: 0 auto 4px; max-width: 34ch; }
.hero .military { color: var(--copper-300); font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; font-size: 0.85rem; }
.hero-reviews { margin-top: 12px; }

.rating-badge {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  margin: 16px auto 6px; padding: 10px 22px;
  background: var(--leather-700); border: 1px solid var(--leather-line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.rating-badge .stars { color: var(--star); font-size: 1.25rem; letter-spacing: 2px; }
.rating-badge .score { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink-100); }
.rating-badge .count b { color: var(--copper-300); }
.rating-badge small { color: var(--ink-400); }

/* Address + today's hours line */
.hero .whereopen { margin-top: 14px; color: var(--ink-300); font-size: 0.98rem; }
.hero .whereopen .open-now { color: var(--ok); font-weight: 700; }
.hero .whereopen .closed-now { color: var(--copper-300); font-weight: 700; }

/* ---------- Primary quick-action buttons ---------- */
.actions {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  max-width: 460px; margin: 22px auto 0;
}
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 8pt;
  padding: 14px 12px; border-radius: var(--radius);
  font-weight: 700; font-size: 1rem; text-align: center;
  border: 1px solid var(--leather-line);
  background: var(--leather-700); color: var(--ink-100);
  transition: transform 0.06s ease, border-color 0.15s ease;
}
.btn:hover { color: var(--ink-100); border-color: var(--copper-700); transform: translateY(-1px); }
.btn.primary {
  color: #1a1109; border: none;
  background: linear-gradient(180deg, var(--copper-300), var(--copper-500));
  box-shadow: 0 6px 18px var(--copper-glow);
}
.btn.primary:hover { color: #1a1109; }
.btn .ico { font-size: 1.15rem; }

/* ---------- Cards / panels ---------- */
.panel {
  background: linear-gradient(180deg, var(--leather-700), var(--leather-800));
  border: 1px solid var(--leather-line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- Reviews ---------- */
.reviews-head { text-align: center; margin-bottom: 18px; }
.reviews-head .total { font-family: var(--font-display); font-size: clamp(2.2rem, 11vw, 3.6rem); color: var(--copper-300); line-height: 1; }
.reviews-head .total-label { color: var(--ink-300); text-transform: uppercase; letter-spacing: 2px; font-size: 0.8rem; }
.reviews-head .google { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--ink-300); font-size: 0.9rem; }

.reviews-rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 82%;
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 0 -18px; padding: 6px 18px 14px;
  -webkit-overflow-scrolling: touch;
}
.reviews-rail::-webkit-scrollbar { height: 6px; }
.reviews-rail::-webkit-scrollbar-thumb { background: var(--copper-900); border-radius: 3px; }
.review {
  scroll-snap-align: start;
  margin: 0;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--leather-600); border: 1px solid var(--leather-line);
  display: flex; flex-direction: column; gap: 10px;
}
.review .stars { color: var(--star); letter-spacing: 2px; font-size: 0.95rem; }
.review .text { margin: 0; color: var(--ink-200); font-size: 0.98rem; line-height: 1.5; }
.review .who { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.review .avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-weight: 700; color: #1a1109;
  background: linear-gradient(180deg, var(--copper-300), var(--copper-700));
}
.review .who b { color: var(--ink-100); font-size: 0.92rem; }
.review .who small { color: var(--ink-400); display: block; font-weight: 400; }
.reviews-cta { text-align: center; margin-top: 8px; }

/* ---------- Artists ---------- */
.artists-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.artist {
  overflow: hidden;
  display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 14px;
}
.artist .portrait {
  width: 96px; height: 96px; border-radius: 12px; object-fit: cover;
  border: 2px solid var(--copper-700);
}
.artist .info { min-width: 0; }
.artist .info h3 { margin: 0 0 2px; font-size: 1.25rem; }
/* Photo + name link to the artist's Instagram (the visible handle chip stays too). */
.artist .portrait-link { display: block; line-height: 0; }
.artist .portrait-link .portrait { transition: border-color 0.15s ease; }
.artist .portrait-link:hover .portrait { border-color: var(--copper-300); }
.artist .info h3 a { color: inherit; text-decoration: none; }
.artist .info h3 a:hover { color: var(--copper-300); }
.artist .specialty { color: var(--copper-300); font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.artist .bio { color: var(--ink-300); font-size: 0.92rem; margin: 0 0 10px; }
.artist .links { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px; font-size: 0.84rem; font-weight: 600;
  background: var(--leather-600); border: 1px solid var(--leather-line); color: var(--ink-100);
}
.chip.ig { background: linear-gradient(180deg, var(--copper-700), var(--copper-900)); border: none; color: var(--ink-100); }
.chip:hover { color: var(--ink-100); border-color: var(--copper-700); }

/* Latest 3 Instagram thumbnails, injected by JS */
.artist .ig-feed {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px;
}
.artist .ig-feed a { display: block; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--leather-line); }
.artist .ig-feed img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.artist .ig-feed a:hover img { transform: scale(1.08); }
.artist .ig-feed.empty { display: none; }

/* ---------- Hours ---------- */
.hours-table { max-width: 460px; margin: 0 auto; padding: 6px 6px; }
.hours-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 11px 14px; border-bottom: 1px solid var(--leather-line); font-size: 1rem;
}
.hours-row:last-child { border-bottom: none; }
.hours-row.today { background: rgba(184, 115, 51, 0.12); border-radius: 8px; }
.hours-row .day { color: var(--ink-200); font-weight: 600; }
.hours-row.today .day { color: var(--copper-300); }
.hours-row .time { color: var(--ink-300); }
.hours-row .time.closed { color: var(--ink-400); }

/* ---------- Studio gallery (auto-scrolling marquee) ---------- */
.studio-rail {
  overflow-x: auto; overflow-y: hidden; width: 100%; margin: 0 -18px;
  -webkit-overflow-scrolling: touch; touch-action: pan-x; scrollbar-width: none; cursor: grab;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}
.studio-rail::-webkit-scrollbar { display: none; }
.studio-track {
  display: flex; gap: 10px; width: max-content; padding: 4px 18px 14px;
}
.studio-track img {
  height: 210px; width: auto; display: block;
  -webkit-user-drag: none; user-select: none; pointer-events: none;
  border-radius: var(--radius); border: 1px solid var(--leather-line);
}

/* ---------- Accordion (policies + aftercare) ---------- */
.accordion { max-width: 760px; margin: 0 auto; }
.acc-item { border: 1px solid var(--leather-line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; background: var(--leather-700); }
.acc-item > summary {
  cursor: pointer; list-style: none; padding: 15px 18px;
  font-family: var(--font-display); font-size: 1.1rem; letter-spacing: 0.5px;
  color: var(--ink-100); display: flex; justify-content: space-between; align-items: center;
}
.acc-item > summary::-webkit-details-marker { display: none; }
.acc-item > summary::after { content: "+"; color: var(--copper-300); font-size: 1.4rem; line-height: 1; }
.acc-item[open] > summary::after { content: "\2013"; }
.acc-body { padding: 0 18px 16px; color: var(--ink-300); font-size: 0.94rem; }
.acc-body p { margin: 0 0 10px; }
.acc-body strong { color: var(--ink-100); }

/* ---------- Location / footer ---------- */
.map-embed { border: 0; width: 100%; height: 300px; border-radius: var(--radius); filter: grayscale(0.35) contrast(1.05); }
.footer { text-align: center; padding: 34px 0 40px; color: var(--ink-400); font-size: 0.85rem; border-top: 1px solid var(--leather-line); margin-top: 20px; }
.footer .addr { color: var(--ink-300); margin-bottom: 6px; }
.footer .addr a { white-space: nowrap; }
.footer .credit { margin-top: 6px; }

/* ---------- Larger screens ---------- */
@media (min-width: 720px) {
  .actions { grid-template-columns: repeat(4, 1fr); max-width: 720px; }
  .artists-grid { grid-template-columns: 1fr 1fr; }
  /* If the last card is left alone in a row (odd number of artists), center it. */
  .artists-grid > .artist:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 9px); /* one column width (gap is 18px) */
    margin-inline: auto;
  }
  .footer { padding-bottom: 40px; }
}
@media (min-width: 720px) {
  .reviews-rail { grid-auto-columns: 46%; }
}
@media (min-width: 1000px) {
  .reviews-rail { grid-auto-columns: 31%; }
}

/* Desktop-only split hero: logo + location on the left, info + buttons on the right.
   Mobile keeps the original single-column, centered layout untouched. */
@media (min-width: 900px) {
  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "left right"
      "actions actions";
    align-items: center;
    column-gap: 0; row-gap: 26px;
    text-align: center; padding: 40px 0 24px;
  }
  .hero-left { grid-area: left; }
  .hero-right { grid-area: right; }
  .hero-right .rating-badge { margin-left: auto; margin-right: auto; }
  .hero-right .whereopen { text-align: center; }
  .hero .actions { grid-area: actions; margin: 0; max-width: none; width: 100%; }

  /* Bottom: Find Us (left) + Hours (right). Constrained to the page width and split
     into equal halves so both columns match and align to the page margins.
     DOM order is Hours→Location, so reorder with `order`. */
  .bottom-split {
    max-width: var(--maxw); margin: 0 auto; padding: 0 18px;
    display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; align-items: stretch;
  }
  .bottom-split .wrap { padding: 0; max-width: none; }
  .bottom-split .hours-table { max-width: none; }
  .bottom-split #location { order: 1; }
  .bottom-split #hours { order: 2; }
  /* Map fills the location column so its bottom lines up with the hours table. */
  .bottom-split #location .wrap { display: flex; flex-direction: column; height: 100%; }
  .bottom-split .map-embed { flex: 1 1 auto; height: auto; min-height: 320px; }
}

/* ---------- Desktop margin carousels ----------
   Fixed vertical strips in the left/right margins, filled with random studio
   images that auto-scroll. Hidden on mobile/tablet; only shown once the centered
   content leaves enough room in the margins so they never overlap it. */
.side-rail { display: none; }

@keyframes rail-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

@media (min-width: 1200px) {
  .side-rail {
    display: block;
    position: fixed; top: 60px; bottom: 0; z-index: 1;
    width: min(320px, calc((100vw - var(--maxw)) / 2 - 12px));
    overflow: hidden; pointer-events: auto;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
            mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
  }
  .side-left  { left: 0;  }
  .side-right { right: 0; }
  .rail-track {
    display: flex; flex-direction: column; gap: 12px; padding: 0 14px;
    will-change: transform;
    animation: rail-scroll 100s linear infinite;
  }
  .side-right .rail-track { animation-duration: 88s; animation-direction: reverse; }
  /* Pause the scroll while the pointer is over a rail. */
  .side-rail:hover .rail-track { animation-play-state: paused; }
  .rail-track img {
    width: 100%; height: auto; display: block; border-radius: 10px;
    border: 1px solid var(--leather-line); box-shadow: var(--shadow);
  }
}

/* ---------- Mobile-only horizontal carousel (between Artists and Studio) ---------- */
.mobile-showcase { display: none; padding: 22px 0; }
@media (max-width: 899px) {
  .mobile-showcase { display: block; }
}
.hrail {
  overflow-x: auto; overflow-y: hidden; width: 100%;
  -webkit-overflow-scrolling: touch; touch-action: pan-x; scrollbar-width: none; cursor: grab;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.hrail::-webkit-scrollbar { display: none; }
.hrail-track {
  display: flex; gap: 10px; width: max-content; padding: 0 10px;
}
.hrail-track img {
  height: 190px; width: auto; display: block; border-radius: 10px;
  -webkit-user-drag: none; user-select: none; pointer-events: none;
  border: 1px solid var(--leather-line); box-shadow: var(--shadow);
}

/* ---------- Memorial section (folds on mobile, full section on desktop) ---------- */
.memorial > summary {
  list-style: none; cursor: pointer; display: block; position: relative;
}
.memorial > summary::-webkit-details-marker { display: none; }
.memorial > summary .section-title { margin-bottom: 0; }
.memorial > summary::after {
  content: "+"; color: var(--copper-300); font-size: 1.7rem; line-height: 1;
  position: absolute; right: 6px; top: 6px;
}
.memorial[open] > summary::after { content: "\2013"; }
.memorial-body { padding-top: 16px; }
/* Memorial heading has no auto underline; an explicit bronze rule divides the flip-side line from the memory line */
.memorial-title::after { display: none; }
.memorial-rule {
  width: 74px; height: 3px; margin: 14px auto 16px;
  background: linear-gradient(90deg, transparent, var(--copper-500), transparent);
  border-radius: 2px;
}
.memorial-grid {
  display: grid; grid-template-columns: 1fr; gap: 20px; align-items: center;
  max-width: 920px; margin: 0 auto;
}
/* Logo is the main image — shown in full so it stays readable */
.memorial-logo {
  width: 100%; display: block; border-radius: var(--radius);
  box-shadow: var(--shadow);
}
/* Photo of Matt tattooing sits above the tribute text */
.memorial-photo {
  width: 100%; margin: 0 auto 16px; border-radius: var(--radius);
  border: 1px solid var(--leather-line); box-shadow: var(--shadow);
}
.memorial-tribute { text-align: center; }
.memorial-tribute p { color: var(--ink-300); margin: 0 0 10px; }

@media (min-width: 900px) {
  /* Desktop: always expanded like the other sections, no fold control */
  .memorial > summary { cursor: default; pointer-events: none; }
  .memorial > summary::after { display: none; }
  .memorial-grid { grid-template-columns: 0.9fr 1.1fr; gap: 34px; }
  .memorial-tribute { text-align: left; }
  .memorial-photo { margin: 0 0 16px; max-width: 460px; }
}

/* ---------- Deals (in Good to Know) ---------- */
.deals { margin: 0 auto 26px; max-width: 760px; }
.deals-title {
  text-align: center; text-transform: uppercase; letter-spacing: 1px;
  color: var(--copper-300); font-size: 1.15rem; margin: 0 0 14px;
}
.deals-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.deals-empty {
  text-align: center; color: var(--ink-300); font-size: 1.02rem; margin: 0;
  padding: 22px 18px; border-radius: var(--radius);
  background: var(--leather-700); border: 1px dashed var(--copper-700);
}
.deals-empty a { font-weight: 700; white-space: nowrap; }
.deal-card {
  overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--copper-700); background: var(--leather-700);
  box-shadow: var(--shadow);
}
.deal-card img { width: 100%; display: block; }
.deal-card .deal-meta { padding: 12px 16px; }
.deal-card .deal-name { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink-100); margin: 0 0 4px; }
.deal-card .deal-dates { color: var(--ink-400); font-size: 0.82rem; }
@media (min-width: 720px) {
  .deals-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

/* ---------- Active-deal popup ---------- */
.deal-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.deal-modal[hidden] { display: none; }
.deal-modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(3px); }
.deal-modal-box { position: relative; z-index: 1; max-width: 560px; width: 100%; max-height: 90vh; }
.deal-modal-link { display: block; }
.deal-modal-box img {
  width: 100%; max-height: 82vh; object-fit: contain; display: block;
  border-radius: var(--radius); border: 1px solid var(--copper-700); box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}
.deal-modal-close {
  position: absolute; top: -18px; right: -14px; z-index: 2;
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--ink-100);
  background: var(--copper-500); color: #1a1109;
  font-size: 2rem; line-height: 1; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}
.deal-modal-close:hover { filter: brightness(1.08); }
@media (max-width: 560px) { .deal-modal-close { top: -6px; right: -6px; } }

/* ---------- Subtle staff login link ---------- */
.admin-login {
  display: inline-block; margin-top: 12px;
  color: var(--ink-400); font-size: 0.72rem; letter-spacing: 0.5px;
  opacity: 0.55; text-decoration: none;
}
.admin-login:hover { opacity: 1; color: var(--ink-300); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .rail-track, .hrail-track, .studio-track { animation: none !important; }
}
