@import url("tokens.css");
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Source+Sans+3:wght@400;600&display=swap");

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 1rem;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
}

a { color: var(--color-secondary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Layout */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

section { padding: 3rem 0; }

/* Visual placeholder (WEB-715) */
.visual-placeholder {
  display: block;
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--color-primary) 22%, var(--color-bg)) 0%,
    color-mix(in srgb, var(--color-primary) 10%, var(--color-bg)) 55%,
    color-mix(in srgb, var(--color-secondary) 18%, var(--color-bg)) 100%
  );
}
.visual-placeholder[data-aspect="4:3"]  { aspect-ratio: 4 / 3; }
.visual-placeholder[data-aspect="1:1"]  { aspect-ratio: 1 / 1; }
.visual-placeholder[data-aspect="3:4"]  { aspect-ratio: 3 / 4; }
.visual-placeholder[data-aspect="21:9"] { aspect-ratio: 21 / 9; }

.visual-placeholder[data-tone="secondary"] {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--color-secondary) 22%, var(--color-bg)) 0%,
    color-mix(in srgb, var(--color-secondary) 10%, var(--color-bg)) 55%,
    color-mix(in srgb, var(--color-primary) 16%, var(--color-bg)) 100%
  );
}
.visual-placeholder[data-tone="accent"] {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--color-accent, var(--color-primary)) 22%, var(--color-bg)) 0%,
    color-mix(in srgb, var(--color-primary) 12%, var(--color-bg)) 60%,
    color-mix(in srgb, var(--color-secondary) 16%, var(--color-bg)) 100%
  );
}
.visual-placeholder[data-tone="muted"] {
  background: color-mix(in srgb, var(--color-text) 8%, var(--color-bg));
}

/* Header / Nav */
.site-header {
  background-color: var(--color-primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: #fff;
}

.nav-logo svg { width: 140px; height: auto; }
.nav-logo svg text, .nav-logo svg tspan { fill: #fff; }

.nav-links {
  display: none;
  list-style: none;
  gap: 1.5rem;
}

.nav-links a {
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.nav-links a:hover { color: var(--color-accent); text-decoration: none; }
.nav-links a.active { color: var(--color-accent); }

.nav-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  background-color: var(--color-primary);
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.nav-mobile.open { display: block; }
.nav-mobile ul { list-style: none; }
.nav-mobile li { border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-mobile a {
  display: block;
  padding: .75rem 0;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.nav-mobile a:hover, .nav-mobile a.active { color: var(--color-accent); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-block;
  padding: .75rem 1.75rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s;
  text-decoration: none;
}
.btn-primary {
  background-color: var(--color-secondary);
  color: #fff;
  border-color: var(--color-secondary);
}
.btn-primary:hover { background-color: #be1139; border-color: #be1139; text-decoration: none; color: #fff; }
.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}
.btn-accent:hover { background-color: #d97706; border-color: #d97706; text-decoration: none; }
.btn-outline {
  background: transparent;
  color: #fff;
  border-color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }

/* Hero */
.hero {
  background-color: var(--color-primary);
  color: #fff;
  padding: 3.5rem 0;
}
.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.hero__text { flex: 1; }
.hero h1 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  margin-bottom: 1rem;
  color: #fff;
}
.hero h1 em { color: var(--color-accent); font-style: normal; }
.hero .lead {
  font-size: 1.1rem;
  opacity: .85;
  margin-bottom: 1.5rem;
  max-width: 540px;
}
.hero__rating {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: .4rem 1rem;
  font-size: .9rem;
  margin-bottom: 1.5rem;
}
.stars { color: var(--color-accent); letter-spacing: 2px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero__visual { flex: 1; }

/* Section headers */
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--color-primary);
  margin-bottom: .5rem;
}
.section-header .subtitle {
  color: #6b7280;
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}
.section-divider {
  width: 48px;
  height: 3px;
  background-color: var(--color-secondary);
  margin: .75rem auto 0;
  border-radius: 2px;
}

/* Dark sections */
.section-dark {
  background-color: var(--color-primary);
  color: #fff;
}
.section-dark .section-header h2 { color: #fff; }
.section-dark .section-header .subtitle { color: rgba(255,255,255,.7); }

/* Rating badge */
.rating-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2.5rem;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  text-align: center;
}
.rating-badge .big-score {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}
.rating-badge .stars { font-size: 1.5rem; }
.rating-badge p { color: rgba(255,255,255,.8); font-size: .95rem; }

/* Service cards */
.services-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
.service-card {
  background: var(--color-bg);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.service-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.service-card__body { padding: 1.5rem; }
.service-card h3 {
  font-size: 1.2rem;
  color: var(--color-primary);
  margin-bottom: .5rem;
}
.service-card p { color: #4b5563; font-size: .95rem; margin-bottom: 1rem; }
.service-card ul { list-style: none; }
.service-card li {
  padding: .3rem 0;
  font-size: .9rem;
  color: #6b7280;
}
.service-card li::before { content: "→ "; color: var(--color-secondary); font-weight: 700; }

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* Reviews */
.reviews { padding: 3rem 0; }
.reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.google-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: .5rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}
.google-badge:hover { box-shadow: 0 2px 8px rgba(0,0,0,.1); text-decoration: none; color: var(--color-primary); }
.reviews-grid { display: grid; gap: 1.25rem; }
.review-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.25rem;
}
.review-card__top {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.review-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.review-card__meta { flex: 1; }
.review-card__author { font-weight: 600; font-size: .95rem; color: var(--color-primary); }
.review-card__date { font-size: .8rem; color: #9ca3af; }
.review-stars { color: var(--color-accent); font-size: .85rem; }
.review-card__text { font-size: .95rem; color: #374151; line-height: 1.55; }
.reviews-attribution {
  margin-top: 1.5rem;
  font-size: .8rem;
  color: #9ca3af;
  text-align: center;
}
.reviews-attribution a { color: #9ca3af; }

/* About page */
.about-intro {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.about-intro__visual { flex: 1; }
.about-intro__text { flex: 1; }
.about-intro__text h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--color-primary);
  margin-bottom: 1rem;
}
.about-intro__text p { color: #4b5563; margin-bottom: 1rem; }

/* Values */
.values-grid { display: grid; gap: 1.25rem; }
.value-item {
  padding: 1.5rem;
  background: #f9fafb;
  border-left: 4px solid var(--color-secondary);
  border-radius: 0 8px 8px 0;
}
.value-item h3 { font-size: 1.1rem; color: var(--color-primary); margin-bottom: .5rem; }
.value-item p { color: #6b7280; font-size: .95rem; }

/* Contact */
.contact-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.contact-info h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--color-primary);
  margin-bottom: 1rem;
}
.contact-details { list-style: none; margin-bottom: 1.5rem; }
.contact-details li { padding: .5rem 0; border-bottom: 1px solid #f3f4f6; font-size: .95rem; }
.contact-details li:last-child { border-bottom: none; }
.contact-details strong { color: var(--color-primary); }
.tel-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background-color: var(--color-secondary);
  color: #fff;
  padding: .75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}
.tel-link:hover { background-color: #be1139; text-decoration: none; color: #fff; }
.map-wrapper { border-radius: 8px; overflow: hidden; border: 1px solid #e5e7eb; }
.map-wrapper iframe { display: block; width: 100%; height: 280px; border: none; }

/* Form */
.contact-form-wrapper { flex: 1; }
.form-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
}
.form-card h2 {
  font-size: 1.4rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .4rem;
  color: var(--color-primary);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .65rem .9rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
  color: var(--color-text);
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(225,29,72,.15);
}
.form-group textarea { min-height: 130px; resize: vertical; }
.form-row { display: grid; gap: 1.25rem; }
.form-note { font-size: .8rem; color: #6b7280; margin-top: .5rem; }
.rgpd-notice {
  font-size: .8rem;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 6px;
  padding: .75rem 1rem;
  margin-top: 1.25rem;
  line-height: 1.5;
}

/* CTA banner */
.cta-banner {
  background-color: var(--color-secondary);
  color: #fff;
  text-align: center;
  padding: 3rem 1.25rem;
}
.cta-banner h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: .75rem; color: #fff; }
.cta-banner p { opacity: .9; margin-bottom: 1.5rem; max-width: 500px; margin-left: auto; margin-right: auto; }

/* Footer */
.site-footer {
  background-color: var(--color-primary);
  color: rgba(255,255,255,.75);
  padding: 2.5rem 0;
  font-size: .875rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.footer-brand h3 { font-family: var(--font-display); font-size: 1.1rem; color: #fff; margin-bottom: .35rem; }
.footer-brand p { color: rgba(255,255,255,.55); font-size: .85rem; }
.footer-links h4 { color: var(--color-accent); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .75rem; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: rgba(255,255,255,.7); }
.footer-links a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  text-align: center;
  color: rgba(255,255,255,.4);
  font-size: .8rem;
}

/* Page hero (inner pages) */
.page-hero {
  background-color: var(--color-primary);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: #fff;
  margin-bottom: .5rem;
}
.page-hero p { color: rgba(255,255,255,.7); font-size: 1.05rem; max-width: 540px; margin: 0 auto; }

/* Accessibility */
.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;
}
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  background: var(--color-accent);
  color: var(--color-primary);
  padding: .5rem 1rem;
  border-radius: 4px;
  font-weight: 700;
  z-index: 999;
}
.skip-link:focus { left: 1rem; }

/* Tablet+ */
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .reviews-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { flex-direction: row; justify-content: space-between; }
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* Desktop */
@media (min-width: 900px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .hero__inner { flex-direction: row; align-items: center; }
  .about-intro { flex-direction: row; align-items: flex-start; }
  .contact-grid { flex-direction: row; }
  .contact-info { flex: 1; }
  .contact-form-wrapper { flex: 1; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .rating-badge { flex-direction: row; text-align: left; }
}

/* ============================================================
   ANIMATION PASS — Totems Tattoo Store · WEB-1227
   Template tribal/sombre · Lot 7+ · CSS-first, no lib
   ============================================================ */

/* Accessibility safety net */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Structural base for shimmer pseudo-element (not motion-dependent) */
.visual-placeholder {
  position: relative;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {

  /* ── 1. Hero entrance — slide-up on page load ── */
  @keyframes slide-up-fade {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
  }

  .hero__text  { animation: slide-up-fade 0.65s ease-out both; }
  .hero__visual { animation: slide-up-fade 0.65s ease-out 0.2s both; }

  /* ── 2. Inner page-hero entrance ─────────────── */
  .page-hero h1 { animation: slide-up-fade 0.55s ease-out both; }
  .page-hero p  { animation: slide-up-fade 0.55s ease-out 0.1s both; }

  /* ── 3. Service card hover lift ──────────────── */
  .service-card {
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  }
  .service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,.14);
    border-color: var(--color-secondary);
  }

  /* ── 4. Visual placeholder hover shimmer ─────── */
  .visual-placeholder {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .visual-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      105deg,
      transparent 30%,
      rgba(255,255,255,.07) 50%,
      transparent 70%
    );
    transform: translateX(-110%);
    transition: transform 0.55s ease;
  }
  .visual-placeholder:hover {
    transform: scale(1.012);
    box-shadow: 0 6px 22px rgba(0,0,0,.2);
  }
  .visual-placeholder:hover::after { transform: translateX(110%); }

  /* ── 5. Section divider grow (scroll-driven) ─── */
  @keyframes divider-grow {
    from { width: 0; }
    to   { width: 48px; }
  }
  @supports (animation-timeline: view()) {
    .section-divider {
      animation: divider-grow 1s linear both;
      animation-timeline: view(block);
      animation-range: entry 0% cover 15%;
    }
  }

  /* ── 6. Nav link animated underline ──────────── */
  .nav-links a { position: relative; }
  .nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
  }
  .nav-links a:hover::after,
  .nav-links a.active::after { transform: scaleX(1); }

  /* ── Stagger delays for scroll-reveal grids ──── */
  .services-grid .service-card:nth-child(2).fade-in { transition-delay: 0.10s; }
  .services-grid .service-card:nth-child(3).fade-in { transition-delay: 0.18s; }
  .services-grid .service-card:nth-child(4).fade-in { transition-delay: 0.26s; }

  .reviews-grid .review-card:nth-child(2).fade-in   { transition-delay: 0.12s; }
  .reviews-grid .review-card:nth-child(3).fade-in   { transition-delay: 0.24s; }

  .gallery-grid .visual-placeholder:nth-child(2).fade-in { transition-delay: 0.10s; }
  .gallery-grid .visual-placeholder:nth-child(3).fade-in { transition-delay: 0.20s; }

  .gallery-full .visual-placeholder:nth-child(2).fade-in { transition-delay: 0.08s; }
  .gallery-full .visual-placeholder:nth-child(3).fade-in { transition-delay: 0.16s; }
  .gallery-full .visual-placeholder:nth-child(4).fade-in { transition-delay: 0.24s; }
  .gallery-full .visual-placeholder:nth-child(5).fade-in { transition-delay: 0.32s; }
  .gallery-full .visual-placeholder:nth-child(6).fade-in { transition-delay: 0.40s; }

} /* end prefers-reduced-motion: no-preference */
