/* ===================================================================
   TIM BLACKHANDS TATTOO — Uppsala
   Design direction: "The Engraver's Archive" — gothic without gold.
   Aged manuscript materials (oak, parchment, copperplate hatch),
   high-contrast display serif, catalogue-card gallery.
   =================================================================== */

:root {
  /* ---- color: no gold/bronze. warm near-black + parchment ink + one
     muted ink-red used sparingly as the only saturated accent ---- */
  --bg: #15110d;
  --bg-deep: #0b0907;
  --ink: #e7ddc6;
  --ink-dim: #978d78;
  --ink-faint: #6b6354;
  --accent: #8a2a1c;
  --accent-bright: #b5402c;
  --line: rgba(231, 221, 198, 0.13);
  --line-strong: rgba(231, 221, 198, 0.22);

  --tex-oak: url("/images/tex-oak.webp");
  --tex-parchment: url("/images/tex-parchment.webp");
  --tex-hatch: url("/images/tex-hatch.webp");

  --font-display: 'Fraunces', serif;
  --font-body: 'Newsreader', serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  background-image: var(--tex-oak);
  background-size: 900px 900px;
  background-repeat: repeat;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

/* fine grain overlay — settles the procedural textures into one consistent surface */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: var(--ink-dim);
  font-weight: 500;
}
.eyebrow .num { color: var(--accent-bright); }

.quote-text {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
}

/* ===================== NAV ===================== */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  background: rgba(11, 9, 7, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.nav-logo .mark {
  width: 26px; height: 26px;
  border: 1px solid var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--ink-dim);
}

.nav-links {
  display: flex;
  gap: 2.2rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--ink-dim);
  transition: color 0.25s ease;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--ink); }

.nav-right { display: flex; align-items: center; gap: 1.5rem; }

.lang-switch {
  display: flex;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}
.lang-switch a {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line-strong);
  color: var(--ink-dim);
  transition: all 0.25s ease;
}
.lang-switch a.active {
  color: var(--bg);
  background: var(--ink-dim);
  border-color: var(--ink-dim);
}
.lang-switch a:hover:not(.active) { border-color: var(--ink); color: var(--ink); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .lang-switch { display: flex; }
}

/* ===================== HERO — asymmetric split, no full-bleed stretch ===================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
  padding-top: 5.5rem;
}

.hero-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem clamp(1.5rem, 4vw, 4.5rem) 3rem clamp(1.5rem, 5vw, 5.5rem);
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  opacity: 0;
  animation: fadeUp 0.8s 0.2s ease forwards;
  margin-bottom: 1.4rem;
}

.hero-title {
  font-size: clamp(2.8rem, 5.2vw, 5rem);
  line-height: 0.98;
  font-weight: 600;
  margin: 0 0 1.5rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.4s ease forwards;
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-dim);
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.4vw, 1.22rem);
  font-style: italic;
  color: var(--ink-dim);
  max-width: 40ch;
  margin-bottom: 2.4rem;
  opacity: 0;
  animation: fadeUp 0.9s 0.6s ease forwards;
}

.hero-cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.9s 0.8s ease forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg-deep);
  font-weight: 600;
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--accent-bright); border-color: var(--accent-bright); color: var(--ink); }
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }

/* hero figure: framed window, not full-bleed cover — image is shown near its
   native aspect/resolution so it never upscales past its real pixels */
.hero-figure {
  position: relative;
  overflow: hidden;
  background: var(--bg-deep);
}
.hero-figure picture { display: block; width: 100%; height: 100%; }
.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  filter: grayscale(0.25) contrast(1.08) brightness(0.92);
}
.hero-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,9,7,0.05) 0%, rgba(11,9,7,0.45) 100%),
              linear-gradient(90deg, rgba(11,9,7,0.55) 0%, transparent 14%);
  z-index: 1;
  pointer-events: none;
}
.hero-figure-caption {
  position: absolute;
  left: 1.4rem;
  bottom: 1.4rem;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(11,9,7,0.55);
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--line-strong);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.hero-scroll {
  position: fixed;
  bottom: 1.6rem;
  left: 0; right: 0;
  margin: 0 auto;
  width: fit-content;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  animation: fadeIn 0.8s 1.2s forwards;
  opacity: 0;
}
.hero-scroll .line {
  width: 1px;
  height: 26px;
  background: linear-gradient(180deg, var(--ink-faint), transparent);
  animation: scrollPulse 1.8s ease-in-out infinite;
}
.hero-scroll.hidden { animation: none !important; opacity: 0 !important; }

@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50% { transform: scaleY(0.6); opacity: 1; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; grid-template-rows: auto auto; min-height: auto; padding-top: 4.5rem; }
  .hero-text-col { padding: 2.8rem 1.5rem 2.2rem; order: 2; }
  .hero-figure { min-height: 56vh; order: 1; }
  .hero-scroll { display: none; }
}

/* ===================== SECTION SHARED ===================== */

section { position: relative; padding: 6.5rem 0; }
.section-head { max-width: 640px; margin-bottom: 3.5rem; }
.section-head h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); margin-top: 0.6rem; }
.divider {
  width: 38px; height: 1px;
  background: var(--ink-faint);
  margin: 1.5rem 0;
}

/* ===================== ABOUT — parchment ground, margin-note stats ===================== */

.about {
  background-color: #2a2218;
  background-image: var(--tex-parchment);
  background-size: 700px 700px;
  background-repeat: repeat;
  padding-bottom: 7.5rem;
  box-shadow: inset 0 18px 40px -20px rgba(11,9,7,0.7);
}
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 4rem;
  align-items: start;
}
.about-portrait {
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.about-portrait picture { display: block; }
.about-portrait img { filter: grayscale(0.25) contrast(1.05); }

.about-text { color: var(--bg-deep); }
.about-text .eyebrow { color: var(--accent); }
.about-text h2 { color: #20180f; }
.about-text p { margin-bottom: 1.2rem; color: #3a2f22; max-width: 56ch; }
.about-text p:first-of-type {
  font-family: var(--font-body);
  font-size: 1.28rem;
  font-style: italic;
  color: #20180f;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(32,24,15,0.18);
}
.about-stats > div { position: relative; padding-left: 0.9rem; border-left: 2px solid var(--accent); }
.stat-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.7rem;
  color: #20180f;
  line-height: 1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b5d47;
  margin-top: 0.4rem;
}

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .about-portrait { max-width: 320px; }
  .about-stats { grid-template-columns: 1fr; gap: 1rem; }
}

/* ===================== GALLERY — archive catalogue, staggered, numbered ===================== */

#galleri {
  background-image: linear-gradient(180deg, transparent, rgba(0,0,0,0.18) 50%, transparent);
}

.gallery-filters {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 2.8rem;
  border: 1px solid var(--line-strong);
  width: fit-content;
}
.filter-btn {
  padding: 0.55rem 1.05rem;
  border: none;
  border-right: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: transparent;
  transition: all 0.25s ease;
}
.filter-btn:last-child { border-right: none; }
.filter-btn:hover { color: var(--ink); background: rgba(231,221,198,0.05); }
.filter-btn.active {
  background: var(--ink);
  color: var(--bg-deep);
  font-weight: 600;
}

.gallery-grid {
  columns: 4 240px;
  column-gap: 0.85rem;
}
.gallery-item {
  position: relative;
  break-inside: avoid;
  margin-bottom: 0.85rem;
  overflow: hidden;
  background: var(--bg-deep);
  cursor: pointer;
  border: 1px solid var(--line);
}
.gallery-item picture { display: block; width: 100%; }
.gallery-item img {
  width: 100%; height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(.2,.7,.3,1), filter 0.4s ease;
  filter: grayscale(0.12) contrast(1.06);
}
.gallery-item:hover img { transform: scale(1.04); }

.gi-tag {
  position: absolute;
  top: 0; left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(11,9,7,0.72);
  backdrop-filter: blur(3px);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.gi-tag .gi-num { color: var(--accent-bright); }
.gallery-item:hover .gi-tag { opacity: 1; transform: translateY(0); }

.gallery-item[hidden] { display: none; }

@media (max-width: 1024px) {
  .gallery-grid { columns: 3 200px; }
}
@media (max-width: 640px) {
  .gallery-grid { columns: 2 140px; column-gap: 0.5rem; }
  .gallery-item { margin-bottom: 0.5rem; }
  .gallery-filters { gap: 0; }
  .filter-btn { padding: 0.45rem 0.75rem; font-size: 0.64rem; }
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8,6,5,0.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.8rem;
  font-size: 1.8rem; color: var(--ink);
  background: none; border: none;
}

/* ===================== BOOKING ===================== */

.booking {
  text-align: center;
}
.booking .section-head { margin: 0 auto 2rem; text-align: center; }
.booking-card {
  max-width: 600px;
  margin: 0 auto;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  padding: 2.6rem 1rem;
}
.booking-card p { color: var(--ink-dim); margin-bottom: 1.8rem; max-width: 44ch; margin-left: auto; margin-right: auto; }

/* ===================== FOOTER ===================== */

footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 2.2rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.3));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  color: var(--ink-dim);
  font-weight: 500;
}
.footer-col p, .footer-col a {
  font-size: 0.92rem;
  color: var(--ink-dim);
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.25s ease;
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ===================== UTILS ===================== */

.reveal { opacity: 1; transform: none; }
.js-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js-ready .reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
