/* ============================================================
   NAILS LAB, Warszawa
   Laboratory concept: clean white + steel + acid lime
   Fonts: Unbounded (display), Sora (body), Spline Sans Mono (mono)
   ============================================================ */

:root {
  --canvas: #f2f4f5;
  --ink: #232a30;
  --secondary: #e2e7ea;
  --muted: #5d6b76;
  --lime: #b6e83f;
  --white: #ffffff;
  --line: rgba(35, 42, 48, 0.14);
  --line-strong: rgba(35, 42, 48, 0.28);

  --maxw: 1280px;
  --gut: clamp(1.25rem, 4vw, 4rem);

  --f-display: "Unbounded", sans-serif;
  --f-body: "Sora", sans-serif;
  --f-mono: "Spline Sans Mono", monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--f-body);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }

/* subtle lab grid texture on the canvas */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(35,42,48,0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(35,42,48,0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 70%);
}

main, header, footer { position: relative; z-index: 1; }

/* ---------- shared atoms ---------- */

.eyebrow,
.sec-index,
.spec-code,
.proto-code,
.svc-col-code,
.ci-code,
.st-code,
.foot-base,
.lang-toggle,
.stat-lbl,
.foot-h {
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  font-weight: 500;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--ink);
  color: var(--canvas);
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.7rem 1.15rem;
  border-radius: 2px;
  border: 1px solid var(--ink);
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.btn-cta::after { content: "\2197"; font-family: var(--f-body); }
.btn-cta:hover {
  background: var(--lime);
  color: var(--ink);
  border-color: var(--lime);
  transform: translateY(-1px);
}
.btn-lg { padding: 0.95rem 1.5rem; font-size: 0.88rem; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--ink);
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.92rem 1.4rem;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  transition: border-color .35s var(--ease), background .35s var(--ease), transform .35s var(--ease);
}
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-1px); }
.btn-ghost[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- wordmark ---------- */
.wordmark {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.28em;
  line-height: 1;
}
.wm-main { font-size: 1.18rem; }
.wm-sub {
  font-size: 1.18rem;
  color: var(--ink);
  background: var(--lime);
  padding: 0.05em 0.28em;
  border-radius: 2px;
}
.wm-tick { font-family: var(--f-mono); font-weight: 600; color: var(--muted); font-size: 1rem; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 244, 245, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.hdr-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.85rem var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.hdr-nav { display: flex; gap: 1.65rem; }
.hdr-nav a {
  font-family: var(--f-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  position: relative;
  padding-bottom: 2px;
  transition: color .3s var(--ease);
}
.hdr-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--lime);
  transition: width .3s var(--ease);
}
.hdr-nav a:hover { color: var(--ink); }
.hdr-nav a:hover::after { width: 100%; }

.hdr-right { display: flex; align-items: center; gap: 1rem; }

.lang-toggle {
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  gap: 0.3rem;
  align-items: center;
  transition: border-color .3s var(--ease);
}
.lang-toggle:hover { border-color: var(--ink); }
.lang-opt { transition: color .25s var(--ease); }
.lang-opt.is-on { color: var(--ink); }
.lang-sep { color: var(--line-strong); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 5rem) var(--gut) 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}
.eyebrow { color: var(--muted); margin: 0 0 1.4rem; }

.hero-title {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.95;
  font-size: clamp(2.9rem, 7.2vw, 6.1rem);
  margin: 0 0 1.6rem;
}
.ht-line { display: block; }
.ht-accent {
  position: relative;
  display: inline-block;
}
.ht-accent::after {
  content: "";
  position: absolute;
  left: -0.06em; right: -0.06em;
  bottom: 0.07em;
  height: 0.34em;
  background: var(--lime);
  z-index: -1;
  border-radius: 1px;
}

.hero-lead {
  max-width: 44ch;
  color: var(--muted);
  font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.18rem);
  line-height: 1.7;
  margin: 0 0 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-bottom: 2.4rem; }

.hero-stats {
  display: flex;
  gap: 2.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.hero-stats li { display: flex; flex-direction: column; gap: 0.3rem; }
.stat-num {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1;
}
.stat-lbl { color: var(--muted); letter-spacing: 0.1em; }

.hero-figure {
  margin: 0;
  position: relative;
  border: 1px solid var(--line);
  background: var(--white);
  padding: 10px;
  border-radius: 3px;
}
.hero-figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px;
}
.specimen-tag {
  position: absolute;
  left: 18px; bottom: 18px;
  background: rgba(242, 244, 245, 0.94);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.55rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.st-code { color: var(--ink); }
.st-name { font-family: var(--f-mono); font-size: 0.74rem; color: var(--muted); letter-spacing: 0.03em; }

/* ticker */
.hero-ticker {
  margin-top: clamp(2.4rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 0.85rem 0;
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 1.4rem;
  white-space: nowrap;
  font-family: var(--f-mono);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  color: var(--ink);
  animation: ticker 38s linear infinite;
  will-change: transform;
}
.tk-dot { color: var(--lime); font-weight: 600; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============================================================
   SECTION HEAD (shared)
   ============================================================ */
.sec-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6.5rem) var(--gut) 1.8rem;
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.sec-index { color: var(--lime); background: var(--ink); padding: 0.25em 0.5em; border-radius: 2px; align-self: center; }
.sec-title {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0;
  line-height: 1;
}
.sec-note {
  font-family: var(--f-mono);
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0 auto;
  letter-spacing: 0.02em;
  align-self: center;
}

/* ============================================================
   ABOUT / METHOD
   ============================================================ */
.about-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.2rem, 4vw, 3.5rem) var(--gut) 0;
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.about-lead {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.95rem);
  line-height: 1.32;
  letter-spacing: -0.02em;
  margin: 0 0 1.4rem;
}
.about-sub { color: var(--muted); margin: 0; max-width: 36ch; }

.about-protocol {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.proto {
  padding: 1.6rem 1.6rem 1.8rem;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--white);
  transition: background .35s var(--ease);
}
.proto:hover { background: var(--secondary); }
.proto-code { color: var(--muted); display: block; margin-bottom: 0.9rem; }
.proto-h {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 1.08rem;
  margin: 0 0 0.55rem;
  letter-spacing: -0.01em;
}
.proto p { margin: 0; color: var(--muted); font-size: 0.96rem; line-height: 1.6; }

/* ============================================================
   GALLERY / SPECIMENS
   ============================================================ */
.specimen-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.2rem, 4vw, 3.5rem) var(--gut) 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 1.1rem;
}
.spec {
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 9px 0;
  display: flex;
  flex-direction: column;
  transition: border-color .35s var(--ease), transform .35s var(--ease);
}
.spec:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.spec-frame { overflow: hidden; border-radius: 2px; flex: 1 1 auto; }
.spec-frame img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform .7s var(--ease), filter .5s var(--ease);
  filter: saturate(1.02);
}
.spec:hover .spec-frame img { transform: scale(1.045); }
.spec figcaption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.7rem 0.35rem 0.85rem;
}
.spec-code { color: var(--muted); }
.spec-name {
  font-family: var(--f-mono);
  font-size: 0.78rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-align: right;
}
.spec-tall { grid-row: span 2; }
.spec-tall .spec-frame img { aspect-ratio: 3 / 5; }

/* ============================================================
   SERVICES
   ============================================================ */
.svc-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.2rem, 4vw, 3.5rem) var(--gut) 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.svc-col {
  padding: 1.8rem 1.5rem 2.2rem;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transition: background .35s var(--ease);
}
.svc-col:hover { background: var(--white); }
.svc-col-code {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 1.7rem; height: 1.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--ink);
  margin-bottom: 1rem;
}
.svc-col-h {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
}
.svc-list li {
  padding: 0.55rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  transition: color .3s var(--ease), padding-left .3s var(--ease);
}
.svc-list li:hover { color: var(--ink); padding-left: 0.4rem; }
.svc-foot {
  max-width: var(--maxw);
  margin: 1.4rem auto 0;
  padding: 0 var(--gut);
  font-family: var(--f-mono);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.2rem, 4vw, 3.5rem) var(--gut) 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: stretch;
}
.contact-info { display: flex; flex-direction: column; gap: 1.4rem; }
.ci-block {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.ci-code { color: var(--muted); }
.ci-val { margin: 0; font-size: 1.05rem; line-height: 1.5; }
.ci-val a { border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; transition: border-color .3s var(--ease); }
.ci-val a:hover { border-color: var(--lime); }
.ci-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 0.4rem; }

.demo-form {
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 3px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.form-note {
  font-family: var(--f-mono);
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin: 0 0 0.3rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.demo-form label { display: flex; flex-direction: column; gap: 0.35rem; }
.demo-form label span {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.demo-form input,
.demo-form textarea {
  font-family: var(--f-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.65rem 0.75rem;
  resize: vertical;
  transition: border-color .3s var(--ease);
}
.demo-form input:focus,
.demo-form textarea:focus { outline: none; border-color: var(--ink); }
.form-btn { align-self: flex-start; }

.contact-map {
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  min-height: 420px;
  background: var(--secondary);
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
  filter: grayscale(1) contrast(1.05);
  transition: filter .5s var(--ease);
}
.contact-map:hover iframe { filter: grayscale(0); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  margin-top: clamp(4rem, 8vw, 7rem);
  background: var(--ink);
  color: var(--canvas);
  border-top: 3px solid var(--lime);
}
.footer-grid {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) var(--gut) 2.5rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 0.9fr;
  gap: 2rem;
}
.wordmark-foot .wm-main,
.wordmark-foot .wm-tick { color: var(--canvas); }
.foot-disc {
  margin: 1.1rem 0 0;
  color: rgba(242, 244, 245, 0.62);
  font-size: 0.9rem;
  max-width: 34ch;
  line-height: 1.6;
}
.foot-h { color: var(--lime); display: block; margin-bottom: 1rem; }
.foot-col p { margin: 0 0 0.5rem; color: rgba(242, 244, 245, 0.82); font-size: 0.94rem; line-height: 1.5; }
.foot-col a { border-bottom: 1px solid rgba(242,244,245,0.25); transition: border-color .3s var(--ease); }
.foot-col a:hover { border-color: var(--lime); }
.foot-col .btn-cta { background: var(--lime); color: var(--ink); border-color: var(--lime); margin-top: 0.2rem; }
.foot-col .btn-cta:hover { background: var(--canvas); border-color: var(--canvas); }

.foot-base {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.2rem var(--gut);
  border-top: 1px solid rgba(242, 244, 245, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(242, 244, 245, 0.55);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
  .hero-figure { max-width: 480px; }
  .about-grid { grid-template-columns: 1fr; }
  .specimen-grid { grid-template-columns: repeat(2, 1fr); }
  .spec-tall { grid-row: span 1; }
  .spec-tall .spec-frame img { aspect-ratio: 3 / 4; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .hdr-nav { display: none; }
  .sec-note { margin-left: 0; width: 100%; }
}

@media (max-width: 560px) {
  .specimen-grid { grid-template-columns: 1fr; }
  .about-protocol { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .ci-block { grid-template-columns: 1fr; gap: 0.3rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.6rem; }
  .foot-base { flex-direction: column; }
}

/* ============================================================
   MOTION GUARD
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .ticker-track { animation: none; }
}
