/* Fysiikkaa leluilla – fysiikanlelut.fi */
:root {
  --ink: #10131a;
  --ink-2: #1b2030;
  --paper: #f6f5f1;
  --card: #ffffff;
  --text: #22252d;
  --muted: #5d6270;
  --line: #e2e0d9;
  --accent: #d8412f;
  --accent-dark: #b03323;
  --rgb: linear-gradient(90deg, #e8412c 0%, #f2b233 30%, #2fae66 55%, #2f7fe0 80%, #8a4fd8 100%);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 19, 26, .06), 0 8px 24px rgba(16, 19, 26, .08);
  --max: 1120px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
}

img, video { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-dark); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

h1, h2, h3 { line-height: 1.2; color: var(--ink); margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: #fff; padding: .5rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16, 19, 26, .96);
  backdrop-filter: saturate(140%) blur(8px);
  color: #fff;
}
.site-header::after { content: ""; display: block; height: 3px; background: var(--rgb); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 68px;
}
.brand {
  display: flex; align-items: center; gap: .7rem;
  color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .01em;
}
.brand:hover { color: #fff; }
.brand img { width: 42px; height: 42px; border-radius: 50%; background: #fff; }
.brand small { display: block; font-weight: 400; font-size: .78rem; color: #b9bfcc; letter-spacing: 0; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid rgba(255,255,255,.3); color: #fff;
  border-radius: 8px; padding: .45rem .7rem; font: inherit; font-size: .95rem; cursor: pointer;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .15rem; }
.site-nav a {
  display: block; padding: .5rem .7rem; border-radius: 8px;
  color: #d9dde6; text-decoration: none; font-size: .95rem;
}
.site-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.site-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.12); font-weight: 600; }
.site-nav .nav-shop a { background: var(--accent); color: #fff; font-weight: 600; margin-left: .4rem; }
.site-nav .nav-shop a:hover { background: var(--accent-dark); }

@media (max-width: 980px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ink); padding: .5rem 1.25rem 1.25rem; box-shadow: 0 12px 24px rgba(0,0,0,.3); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: .8rem .75rem; font-size: 1.05rem; }
  .site-nav .nav-shop a { margin: .5rem 0 0; text-align: center; }
}

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: #e6e9f0; padding: clamp(2.5rem, 6vw, 5rem) 0; overflow: hidden; }
.hero h1 { color: #fff; }
.hero .lead { font-size: 1.2rem; color: #c7ccd8; max-width: 38ch; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.hero-img { border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.5); width: 100%; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #f2b233; margin-bottom: .8rem; }
.page-hero { background: var(--ink); color: #c7ccd8; padding: clamp(2rem, 5vw, 3.5rem) 0; }
.page-hero h1 { color: #fff; margin-bottom: .3em; }
.page-hero p { max-width: 60ch; margin: 0; font-size: 1.1rem; }

@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-grid .hero-media { order: -1; }
}

/* ---------- Buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.25rem; border-radius: 10px;
  font-weight: 600; text-decoration: none; line-height: 1.2;
  border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--card); border-block: 1px solid var(--line); }
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-head p { color: var(--muted); }
.prose { max-width: 70ch; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.5rem; display: flex; flex-direction: column;
}
.card > :last-child { margin-bottom: 0; }
.card .btns { margin-top: auto; padding-top: 1rem; }

.package { display: grid; grid-template-columns: 150px 1fr; gap: 1.25rem; align-items: start; }
.package img { border-radius: 8px; border: 1px solid var(--line); }
.package h3 { margin-top: .2rem; }
.package .meta { color: var(--muted); font-size: .95rem; }
@media (max-width: 520px) { .package { grid-template-columns: 100px 1fr; } }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.fact strong { display: block; font-size: 2rem; line-height: 1.1; color: var(--accent-dark); }
.fact span { color: var(--muted); font-size: .95rem; }

.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.doc-list a {
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); text-decoration: none; color: var(--text);
}
.doc-list a:hover { border-color: var(--accent); color: var(--accent-dark); }
.doc-list .tag { font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: #fff; background: var(--accent); border-radius: 5px; padding: .15rem .4rem; }
.doc-list .ext { font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: #fff; background: var(--ink-2); border-radius: 5px; padding: .15rem .4rem; }

.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1rem; }
.person { border-left: 4px solid var(--accent); padding: .25rem 0 .25rem 1rem; }
.person strong { display: block; color: var(--ink); }
.person span { color: var(--muted); }

/* ---------- Media ---------- */
.video { background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video video { width: 100%; }
figure { margin: 0; }
figcaption { font-size: .95rem; color: var(--muted); padding-top: .6rem; }
.video + figcaption { padding-inline: .25rem; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.gallery a { display: block; border-radius: 10px; overflow: hidden; background: var(--ink); box-shadow: var(--shadow); text-decoration: none; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .3s, opacity .3s; }
.gallery a:hover img { transform: scale(1.04); opacity: .92; }
.gallery figcaption { padding: .6rem .8rem; color: #e6e9f0; background: var(--ink); font-size: .92rem; }

.album { text-decoration: none; color: inherit; padding: 0; overflow: hidden; }
.album img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.album .album-body { padding: 1.1rem 1.25rem 1.3rem; }
.album h3 { margin-bottom: .2rem; }
.album span { color: var(--muted); font-size: .95rem; }
.album:hover h3 { color: var(--accent-dark); }

.press { border-top: 1px solid var(--line); padding: 1.5rem 0; }
.press:first-child { border-top: 0; padding-top: 0; }
.press time { font-size: .9rem; color: var(--muted); font-weight: 600; }

.note { font-size: .92rem; color: var(--muted); }

/* ---------- Lightbox ---------- */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; margin: 0;
}
.lightbox::backdrop { background: rgba(8, 10, 14, .92); }
.lightbox-inner { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3.5rem 4rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 9rem); border-radius: 6px; object-fit: contain; }
.lightbox p { color: #e6e9f0; margin: .9rem 0 0; text-align: center; }
.lightbox button {
  position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox-inner { padding: 4rem .75rem; }
  .lb-prev, .lb-next { top: auto; bottom: 1rem; transform: none; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b9bfcc; padding: 3rem 0 2rem; font-size: .95rem; }
.site-footer::before { content: ""; display: block; height: 3px; background: var(--rgb); margin-top: -3rem; margin-bottom: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { color: #fff; font-size: 1rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .8rem; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.footer-logo { width: 220px; margin-bottom: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1.25rem; font-size: .85rem; color: #8b91a0; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
