/* ============================================
   ARTHUR's TATTOO — « Le Trait du Graveur »
   Design Tokens + Styles
   ============================================ */

/* --- PRIMITIVE TOKENS --- */
:root {
  --color-ink-900: #0D0C0A;
  --color-ink-800: #1A1816;
  --color-ink-700: #2A2725;
  --color-bone-100: #E8E2D8;
  --color-bone-300: #A09A90;
  --color-gold-500: #B8943E;
  --color-gold-400: #D4AD4A;
  --color-iron-500: #6B6560;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-30: 120px;

  --radius-none: 0;
  --radius-sm: 2px;

  /* --- SEMANTIC TOKENS --- */
  --bg-base: var(--color-ink-900);
  --bg-surface: var(--color-ink-800);
  --bg-elevated: var(--color-ink-700);
  --text-primary: var(--color-bone-100);
  --text-secondary: var(--color-bone-300);
  --accent: var(--color-gold-500);
  --accent-hover: var(--color-gold-400);
  --border-default: var(--color-iron-500);
  --border-accent: var(--color-gold-500);

  /* --- COMPONENT TOKENS --- */
  --hero-bg: var(--bg-base);
  --card-bg: var(--bg-surface);
  --card-border-left: var(--border-accent);
  --card-hover-bg: var(--bg-elevated);
  --gallery-frame: var(--border-default);
  --gallery-frame-hover: var(--border-accent);
  --nav-bg-scroll: var(--bg-surface);
  --testimonial-quote-color: var(--accent);
  --cta-bg: var(--accent);
  --cta-text: var(--color-ink-900);
  --cta-hover-bg: var(--accent-hover);
}

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-base);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
}

.font-quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
}

/* --- NAV --- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

.site-nav.is-scrolled {
  background: rgba(26,24,22,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(107,101,96,0.2);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav-logo .gold { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav-links a {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-variant: small-caps;
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
}

@media (max-width: 640px) {
  .nav-links { gap: var(--space-4); }
  .nav-links a { font-size: 10px; letter-spacing: 0.1em; }
  .nav-logo { font-size: 11px; }
}

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--hero-bg);
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.15;
  filter: grayscale(1);
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-6);
}

.hero-swords {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  margin-bottom: var(--space-4);
}

.hero-sword-svg {
  width: 40px;
  height: 40px;
  color: var(--accent);
}

.hero-sword-svg path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

.hero-sword-svg.is-drawn path {
  animation: draw-sword 1.2s ease-out forwards;
}

@keyframes draw-sword {
  to { stroke-dashoffset: 0; }
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-primary);
  line-height: 1.1;
  overflow: hidden;
}

.hero-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
}

.hero-title .char.is-visible {
  animation: char-engrave 0.5s ease-out forwards;
}

@keyframes char-engrave {
  to { opacity: 1; transform: translateY(0); }
}

.hero-gold-line {
  width: 120px;
  height: 1px;
  background: var(--accent);
  margin: var(--space-6) auto;
  transform: scaleX(0);
  transition: transform 0.8s ease-out 0.6s;
}

.hero-gold-line.is-drawn { transform: scaleX(1); }

.hero-subtitle {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(13px, 2vw, 16px);
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: var(--space-10);
  opacity: 0;
  transition: opacity 0.6s ease-out 1s;
}

.hero-subtitle.is-visible { opacity: 1; }

.hero-cta {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 14px 40px;
  transition: background 0.3s ease, color 0.3s ease;
  opacity: 0;
  transition: opacity 0.6s ease-out 1.2s, background 0.3s ease, color 0.3s ease;
}

.hero-cta.is-visible { opacity: 1; }

.hero-cta:hover,
.hero-cta:focus-visible {
  background: var(--accent);
  color: var(--cta-text);
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: pulse-line 2.5s ease-in-out infinite;
}

@keyframes pulse-line {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* --- SECTION COMMONS --- */
.section {
  position: relative;
  padding: var(--space-20) var(--space-6);
}

@media (min-width: 1024px) {
  .section { padding: var(--space-30) var(--space-6); }
}

@media (max-width: 640px) {
  .section { padding: var(--space-16) var(--space-4); }
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: var(--space-12);
}

/* --- ORNAMENT SEPARATOR (crossed swords) --- */
.ornament-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) 0;
}

.ornament-sep svg {
  width: 80px;
  height: 24px;
  color: var(--accent);
}

.ornament-sep svg path {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
}

.ornament-sep.is-drawn svg path {
  animation: draw-ornament 1s ease-out forwards;
}

@keyframes draw-ornament {
  to { stroke-dashoffset: 0; }
}

/* --- ARTISTE --- */
.artiste-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (max-width: 768px) {
  .artiste-grid { grid-template-columns: 1fr; }
}

.artiste-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  border: 1px solid var(--gallery-frame);
  transition: border-color 0.3s ease;
}

.artiste-photo:hover { border-color: var(--gallery-frame-hover); }

.artiste-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Corner ornaments on artiste photo */
.artiste-photo .corner {
  position: absolute;
  width: 16px;
  height: 16px;
  color: var(--border-default);
  transition: color 0.3s ease;
}

.artiste-photo:hover .corner { color: var(--accent); }

.artiste-photo .corner--tl { top: 8px; left: 8px; }
.artiste-photo .corner--tr { top: 8px; right: 8px; transform: scaleX(-1); }
.artiste-photo .corner--bl { bottom: 8px; left: 8px; transform: scaleY(-1); }
.artiste-photo .corner--br { bottom: 8px; right: 8px; transform: scale(-1); }

.artiste-text h2 {
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.artiste-text p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: var(--space-4);
  font-weight: 300;
}

.artiste-text p strong {
  color: var(--text-primary);
  font-weight: 400;
}

/* --- SERVICES --- */
.services-section {
  background: var(--bg-surface);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
}

.service-card {
  padding: var(--space-8) var(--space-6);
  border-left: 2px solid var(--card-border-left);
  transition: background 0.3s ease;
}

.service-card:hover {
  background: var(--card-hover-bg);
}

.service-icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.service-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.service-card p {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.7;
}

/* --- PORTFOLIO / GALLERY --- */
.portfolio-section {
  padding-left: 0;
  padding-right: 0;
}

.portfolio-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  margin-bottom: var(--space-12);
  padding: 0 var(--space-6);
}

.portfolio-line {
  flex: 0 0 60px;
  height: 1px;
  background: var(--accent);
}

.portfolio-header h2 {
  font-size: clamp(24px, 3.5vw, 40px);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0;
}

.gallery-grid {
  display: columns;
  columns: 3;
  column-gap: 4px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-1);
}

@media (max-width: 1024px) { .gallery-grid { columns: 2; } }
@media (max-width: 640px) { .gallery-grid { columns: 1; padding: 0 var(--space-4); } }

.gallery-item {
  break-inside: avoid;
  margin-bottom: 4px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.gallery-item-inner {
  position: relative;
  border: 1px solid var(--gallery-frame);
  transition: border-color 0.25s ease-out;
}

.gallery-item:hover .gallery-item-inner,
.gallery-item:focus-within .gallery-item-inner {
  border-color: var(--gallery-frame-hover);
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-item:hover img,
.gallery-item:focus-within img {
  transform: scale(1.02);
}

/* Corner micro-ornaments (cruciform) */
.gallery-item-inner .gc {
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
}

.gallery-item-inner .gc::before,
.gallery-item-inner .gc::after {
  content: '';
  position: absolute;
  background: var(--gallery-frame);
  transition: background 0.25s ease-out;
}

.gallery-item:hover .gc::before,
.gallery-item:hover .gc::after,
.gallery-item:focus-within .gc::before,
.gallery-item:focus-within .gc::after {
  background: var(--gallery-frame-hover);
}

.gallery-item-inner .gc::before {
  width: 10px; height: 1px;
  top: 50%; left: 0;
  transform: translateY(-50%);
}

.gallery-item-inner .gc::after {
  width: 1px; height: 10px;
  left: 50%; top: 0;
  transform: translateX(-50%);
}

.gallery-item-inner .gc--tl { top: 6px; left: 6px; }
.gallery-item-inner .gc--tr { top: 6px; right: 6px; }
.gallery-item-inner .gc--bl { bottom: 6px; left: 6px; }
.gallery-item-inner .gc--br { bottom: 6px; right: 6px; }

.gallery-instagram {
  text-align: center;
  margin-top: var(--space-10);
  padding: 0 var(--space-6);
}

.gallery-instagram a {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.25s ease;
}

.gallery-instagram a:hover,
.gallery-instagram a:focus-visible {
  border-bottom-color: var(--accent);
}

/* --- AVIS / TESTIMONIALS --- */
.avis-section .section-title { margin-bottom: var(--space-10); }

.avis-scroll {
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 var(--space-6) var(--space-4);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.avis-scroll::-webkit-scrollbar { display: none; }

.avis-card {
  flex: 0 0 min(380px, 85vw);
  scroll-snap-align: start;
  padding: var(--space-8) var(--space-6);
  background: var(--bg-surface);
  position: relative;
}

.avis-quote-mark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 48px;
  color: var(--testimonial-quote-color);
  line-height: 1;
  margin-bottom: var(--space-2);
  font-style: italic;
}

.avis-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
}

.avis-author {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.avis-stars {
  display: flex;
  gap: 2px;
}

.avis-stars .star {
  color: var(--accent);
  font-size: 14px;
}

.avis-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.avis-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-default);
  border: none;
  padding: 0;
  transition: background 0.25s ease;
}

.avis-dot.is-active { background: var(--accent); }

/* --- CONTACT --- */
.contact-section {
  background: var(--bg-elevated);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-info h2 {
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-8);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.contact-item-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

.contact-item a {
  color: var(--text-primary);
  font-size: 16px;
  transition: color 0.25s ease;
}

.contact-item a:hover,
.contact-item a:focus-visible {
  color: var(--accent);
}

.contact-item span {
  color: var(--text-secondary);
  font-size: 16px;
}

.contact-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding: 14px 36px;
  background: var(--cta-bg);
  color: var(--cta-text);
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.25s ease, transform 0.2s ease;
}

.contact-cta:hover,
.contact-cta:focus-visible {
  background: var(--cta-hover-bg);
  transform: translateY(-2px);
}

.contact-map {
  aspect-ratio: 4/3;
  border: 1px solid var(--border-default);
  overflow: hidden;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) invert(0.92) contrast(0.85);
}

/* --- FOOTER --- */
.site-footer {
  border-top: 1px solid rgba(107,101,96,0.2);
  padding: var(--space-8) var(--space-6);
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-inner span,
.footer-inner small {
  font-size: 13px;
  color: var(--border-default);
}

.footer-logo {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary) !important;
}

/* --- LIGHTBOX --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(13,12,10,0.95);
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.lightbox.is-open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  color: var(--text-primary);
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-elevated);
  transition: background 0.2s ease;
}

.lightbox-close:hover { background: var(--accent); color: var(--cta-text); }

/* --- FOCUS --- */
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scroll-line { animation: none; opacity: 0.5; }
  .hero-title .char { opacity: 1; transform: none; }
  .hero-gold-line { transform: scaleX(1); }
  .hero-subtitle, .hero-cta { opacity: 1; }
  .hero-sword-svg path { stroke-dashoffset: 0; }
  .ornament-sep svg path { stroke-dashoffset: 0; }
}

/* --- GLOBAL ANIMATIONS --- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}
