/* ==========================================================
   Roosa Tuulia – fine line tattoo, Lahti
   ========================================================== */

/* ---------- Fonts (Google Fonts, ladataan omalta palvelimelta) ---------- */
@font-face { font-family: "PT Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/pt-serif-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/figtree-latin-500-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  --serif: "PT Serif", Georgia, serif;
  --sans: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(20px, 5vw, 64px);
  --max: 1200px;
  --header-h: 88px;
  --rose: #b58f8b;
}

/* Värit */
:root {
  color-scheme: light;
  --paper: #efeeec;
  --text: #2a2a2a;
  --ink: #141414;
  --muted: #706e6b;
  --line: #d8d6d2;
  --placeholder: #e1dfdb;
  --field: #f8f7f5;
  --accent: #1f1f1f;
  --on-accent: #f4f3f1;
  --footer-bg: #262626;
  --footer-fg: #ecebe9;
  --footer-muted: #9c9995;
  --grain: .05;
}
/* ---------- Language switch ---------- */
html[data-lang="fi"] body [lang="en"],
html[data-lang="en"] body [lang="fi"] { display: none !important; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
body::before {                          /* hienovarainen paperitekstuuri */
  content: "";
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--rose); outline-offset: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--accent); color: var(--on-accent); padding: 8px 14px; text-decoration: none; font-size: .9rem;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  height: var(--header-h);
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.logo {
  justify-self: start;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1;
  letter-spacing: .01em;
  text-decoration: none;
  color: var(--ink);
}
.logo { display: block; }
.logo img { height: 62px; width: auto; }

.nav { display: flex; gap: clamp(22px, 3.4vw, 48px); }
.nav a {
  font-size: .95rem;
  font-weight: 400;
  letter-spacing: .03em;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }

.tools { justify-self: end; display: flex; align-items: center; gap: 22px; }


.lang { display: flex; align-items: center; gap: 6px; font-size: .8rem; letter-spacing: .08em; }
.lang button {
  background: none; border: 0; cursor: pointer; padding: 4px 2px;
  color: var(--muted); border-bottom: 1px solid transparent;
}
.lang button[aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.lang span { color: var(--line); }

/* ---------- Page heading (italic serif + short rule, like the old site) ---------- */
.page-title {
  position: relative;
  display: table;
  margin: clamp(32px, 6vw, 72px) auto clamp(36px, 5vw, 64px);
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.1rem, 4.2vw, 3rem);
  line-height: 1.1;
  color: var(--ink);
}
.page-title::after {
  content: "";
  display: block;
  width: 140px;
  height: 1px;
  margin: 26px auto 0;
  background: linear-gradient(to right, transparent, var(--ink) 30%, var(--ink) 70%, transparent);
  opacity: .6;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s, color .25s;
}
.btn:hover { background: transparent; color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }

/* ---------- Home hero ---------- */
.hero {
  flex: none;                 /* korkeus = näkymä, ei kuvan oma korkeus */
  position: relative;
  height: calc(100svh - var(--header-h));
  min-height: 460px;
  margin: 0 var(--pad) var(--pad);
  overflow: hidden;
  background: var(--placeholder);
}
.hero__img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--hero-focus, center 28%);
}
.hero::after {               /* soft shade so the text stays readable on any photo */
  content: "";
  position: absolute; inset: 45% 0 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.42));
  pointer-events: none;
}
.hero__content {
  position: absolute; left: 0; right: 0; bottom: clamp(32px, 7vh, 72px);
  z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  padding: 0 24px;
  text-align: center;
  color: #fff;
}
.hero__tagline {
  margin: 0;
  max-width: 17em;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 2.8rem);
  line-height: 1.12;
  text-shadow: 0 1px 18px rgba(0,0,0,.18);
}
.hero__sub {
  margin: -14px 0 0;
  font-size: .95rem;
  letter-spacing: .04em;
  opacity: .9;
  text-shadow: 0 1px 12px rgba(0,0,0,.2);
  text-wrap: balance;
}
.btn--light { background: transparent; border-color: rgba(255,255,255,.85); color: #fff; padding: 16px 40px; }
.btn--light:hover { background: #fff; color: #1b1718; }

.hero__tagline, .hero__sub, .hero .btn { animation: rise 1.1s cubic-bezier(.2,.7,.2,1) both; }
.hero__sub { animation-delay: .15s; }
.hero .btn { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: clamp(28px, 5vw, 72px);
  max-width: 980px;
  margin: 0 auto clamp(56px, 9vw, 110px);
}
.about:has(.about__photo:not([hidden])) {
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  justify-items: stretch;
}
.about__photo { margin: 0; background: var(--placeholder); }
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about__text { max-width: 34em; text-align: center; }
.about:has(.about__photo:not([hidden])) .about__text { text-align: left; }
.about__text p { margin: 0 0 1.2em; font-size: 1.1rem; }
.about__line {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 1.5rem) !important;
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 0 !important;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2.2vw, 30px);
  margin-bottom: clamp(64px, 10vw, 120px);
}
.gallery__item {
  display: block; padding: 0; border: 0; margin: 0;
  background: var(--placeholder);
  cursor: zoom-in;
  overflow: hidden;
  position: relative;
}
.gallery__item img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .3s;
}
.gallery__item:hover img { opacity: .9; }
.gallery__item { aspect-ratio: 4 / 5; }
.gallery__item:nth-child(4) { grid-column: 1; grid-row: 2; }
.gallery__item:nth-child(5) { grid-column: 1; grid-row: 3; }
.gallery__item:nth-child(6) { grid-column: 2 / 4; grid-row: 2 / 4; aspect-ratio: auto; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--paper);
}
.lightbox::backdrop { background: var(--paper); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: min(88vw, 1100px); max-height: 86vh; width: auto; height: auto; object-fit: contain; }
.lightbox button {
  position: absolute;
  background: none; border: 0; cursor: pointer;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  color: var(--ink);
}
.lightbox svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 1; fill: none; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- Contact ---------- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 7vw, 110px);
  max-width: 1040px;
  margin: 0 auto clamp(64px, 10vw, 120px);
}
.form { display: grid; gap: 22px; align-content: start; }
.field { display: grid; gap: 8px; }
.field label { font-size: .95rem; font-weight: 500; }
.field__hint { margin: -2px 0 0; font-size: .88rem; color: var(--muted); }
.field input, .field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--field);
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  transition: border-color .2s;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.form .btn { justify-self: start; margin-top: 4px; }
.form__status { margin: 0; min-height: 1.6em; font-size: .95rem; }
.form__status.is-ok { color: var(--ink); }
.form__status.is-error { color: #a23a3a; }
.hp { display: none; }

.contact__info h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.45rem;
  line-height: 1.2;
  color: var(--ink);
}
.contact__info p { margin: 0 0 28px; font-size: 1rem; }
.map {
  aspect-ratio: 16 / 10;
  background: var(--placeholder);
  margin-bottom: 28px;
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
.contact__info address { font-style: normal; font-size: .98rem; line-height: 1.75; }
.contact__info address a { text-decoration: none; border-bottom: 1px solid var(--line); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: clamp(24px, 4vw, 48px);
  padding: 44px var(--pad) 46px;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  background: var(--footer-bg);
  color: var(--footer-fg);
}
.social { display: flex; gap: 34px; }
.social a { display: grid; place-items: center; width: 40px; height: 40px; color: inherit; transition: opacity .2s; }
.social a:hover { opacity: .6; }
.social svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.copyright { margin: 0; font-size: .82rem; color: var(--footer-muted); letter-spacing: .03em; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  :root { --header-h: 112px; }
  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    row-gap: 14px;
    padding-top: 18px; padding-bottom: 14px;
    align-content: center;
  }
  .logo img { height: 48px; }
  .nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; gap: 26px; }
  .nav a { font-size: .92rem; }
  .tools { grid-column: 2; grid-row: 1; gap: 16px; }

  .hero { margin: 0 0 var(--pad); }
  .hero__sub { font-size: .82rem; letter-spacing: .02em; }

  .about:has(.about__photo:not([hidden])) { grid-template-columns: 1fr; }
  .about:has(.about__photo:not([hidden])) .about__text { text-align: center; }

  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery__item:nth-child(n) { grid-column: auto; grid-row: auto; aspect-ratio: 4 / 5; }
  .gallery__item:nth-child(1),
  .gallery__item:nth-child(6) { grid-column: 1 / -1; }

  .contact { grid-template-columns: 1fr; }
  .form .btn { justify-self: stretch; text-align: center; }

  .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; transform: none; }
  .lightbox__prev { left: calc(50% - 64px); }
  .lightbox__next { right: calc(50% - 64px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
