/* =============================================================
   Piece Of Slate — slate-stone variant.
   Nature-inspired palette: layered slate greys for surfaces,
   warm off-white text, soft steel-blue accent (think wet-slate
   sky, mountain streams). Same structural design system as the
   light variant — just retuned tokens and a few component tweaks
   that need explicit colors on a dark canvas.
   ============================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* Slate surfaces — three layered tones suggesting depth in stone */
  --bg:            #2d343c;          /* primary slate */
  --bg-alt:        #353c45;          /* slightly lifted slate (section--alt) */
  --bg-elev:       #3d444e;          /* raised surfaces — cards, inputs */

  /* Text — warm off-white, like chalk or limestone against slate */
  --ink:           #ebe9e3;
  --ink-soft:      #c4c1ba;
  --muted:         #8a8e94;
  --line:          rgba(255,255,255,.10);

  /* Accent — soft steel-blue, the colour of wet slate under sky */
  --accent:        #88a8c4;
  --accent-hover:  #a3bdd4;
  --accent-rgb:    136, 168, 196;

  --radius:        18px;
  --radius-sm:     10px;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.25);
  --shadow-md:     0 12px 32px rgba(0,0,0,.45);
  --ease:          cubic-bezier(.4,0,.2,1);

  --fs-hero:       clamp(3rem, 7vw, 5.75rem);
  --fs-h2:         clamp(2rem, 4vw, 3.25rem);
  --fs-body:       clamp(1rem, 1.2vw, 1.125rem);
  --fs-lead:       clamp(1.125rem, 1.5vw, 1.35rem);

  --max-w:         1200px;
  --pad-x:         clamp(1.25rem, 4vw, 3rem);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "Segoe UI", Roboto, Inter, Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  /* Subtle vertical gradient so the slate "layers" from cooler to warmer top-to-bottom */
  background-image:
    linear-gradient(180deg, #2a313a 0%, #2d343c 30%, #303841 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: var(--ink); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent); }

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

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: 48px;
  z-index: 100;
  background: rgba(30, 36, 42, .72);
  backdrop-filter: saturate(160%) blur(20px);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.is-scrolled {
  border-bottom-color: rgba(255,255,255,.10);
}
.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav__logo {
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -.01em;
}
.nav__links { display: flex; gap: 1.75rem; }
.nav__links a {
  font-size: .85rem;
  color: var(--ink-soft);
  transition: color .2s var(--ease);
}
.nav__links a:hover { color: var(--ink); }

@media (max-width: 560px) {
  .nav__links { gap: 1rem; }
  .nav__links a { font-size: .8rem; }
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem var(--pad-x) 4rem;
  position: relative;
  /* Soft top-down highlight, like daylight catching the top edge of a slab */
  background:
    radial-gradient(1100px 600px at 50% -10%, #4a5460 0%, transparent 60%);
}
.hero__content { max-width: 900px; }
.eyebrow {
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .14em;
  color: var(--accent);
  margin: 0 0 1rem;
  font-weight: 500;
}
.hero__title {
  font-size: var(--fs-hero);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.02;
  margin: 0 0 1.5rem;
}
.hero__sub {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto 2.5rem;
  line-height: 1.45;
}
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 36px;
  border: 1.5px solid var(--muted);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.hero__scroll span {
  width: 2px; height: 6px;
  background: var(--muted);
  border-radius: 2px;
  animation: scrollHint 1.8s var(--ease) infinite;
}
@keyframes scrollHint {
  0%   { transform: translateY(0); opacity: 1; }
  60%  { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(10px); opacity: 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .85rem 1.6rem;
  border-radius: 980px;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: -.01em;
  transition: transform .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.btn--primary {
  background: var(--accent);
  color: #14181d;                       /* deep slate text on light blue pill */
}
.btn--primary:hover {
  background: var(--accent-hover);
  color: #14181d;
  transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ---------- Sections ---------- */
.section {
  padding: clamp(5rem, 10vw, 8rem) var(--pad-x);
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;                /* anchor for corner brand stamp */
}
.section--narrow { max-width: 820px; }
.section--alt {
  background: var(--bg-alt);
  max-width: none;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section--alt > * {
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}
.section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}
.section__title {
  font-size: var(--fs-h2);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.08;
  margin: 0 0 1rem;
}
.section__body {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.5;
}

/* ---------- Filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 3rem;
}
.filter {
  padding: .55rem 1.2rem;
  border-radius: 980px;
  font-size: .9rem;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line);
  transition: all .2s var(--ease);
}
.filter:hover {
  color: var(--ink);
  border-color: rgba(255,255,255,.30);
}
.filter.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

/* ---------- Gallery grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), opacity .3s var(--ease), border-color .3s var(--ease);
  aspect-ratio: 3 / 2.3;
  position: relative;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255,255,255,.18);
}
.card.is-hidden { display: none; }
.card__media {
  flex: 1;
  overflow: hidden;
  background: #1f2429;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.card:hover .card__media img { transform: scale(1.04); }
.card__body { padding: 1rem 1.25rem 1.25rem; }
.card__title {
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 .2rem;
  letter-spacing: -.01em;
  color: var(--ink);
}
.card__meta {
  font-size: .8rem;
  color: var(--muted);
  margin: 0;
}

/* ---------- Vote form ---------- */
.vote-form { max-width: 960px; margin: 0 auto; }
.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.vote-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 3 / 2;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.vote-item:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.20); }
.vote-item input { position: absolute; opacity: 0; pointer-events: none; }
.vote-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s var(--ease);
}
.vote-item__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: .75rem;
  color: #fff;
  font-size: .85rem;
  font-weight: 500;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent 60%);
  transition: background .2s var(--ease);
}
.vote-item__check {
  position: absolute;
  top: .6rem; right: .6rem;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(20,24,29,.72);
  border: 1.5px solid rgba(255,255,255,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s var(--ease);
}
.vote-item__check::after {
  content: "";
  width: 10px; height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) translate(1px, -1px) scale(0);
  transition: transform .15s var(--ease);
}
.vote-item input:checked ~ .vote-item__check {
  background: var(--accent);
  border-color: var(--accent);
}
.vote-item input:checked ~ .vote-item__check::after {
  border-color: #14181d;
  transform: rotate(-45deg) translate(1px, -1px) scale(1);
}
.vote-item input:checked ~ .vote-item__label {
  background: linear-gradient(to top, rgba(var(--accent-rgb), .55), transparent 60%);
}

/* ---------- Shared form fields ---------- */
.field {
  margin-bottom: 1.25rem;
  max-width: 560px;
}
.field label {
  display: block;
  font-size: .85rem;
  color: var(--ink-soft);
  margin-bottom: .4rem;
  font-weight: 500;
}
.field .req { color: var(--accent); }
.field input,
.field textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(255,255,255,.30); }
.field input:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--accent);
  background: rgba(255,255,255,.06);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), .18);
}
.field textarea { resize: vertical; min-height: 120px; }
.field__hint {
  font-size: .8rem;
  color: var(--muted);
  margin: .4rem 0 0;
}

.feedback-form { max-width: 560px; margin: 0 auto; }

.form-status {
  margin-top: 1rem;
  font-size: .9rem;
  min-height: 1.4em;
}
.form-status.is-success { color: #8acaa4; }
.form-status.is-error   { color: #f08a8a; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem var(--pad-x);
  margin-top: 3rem;
  background: transparent;
}
.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
}
.footer__sub { margin-top: .35rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,12,15,.96);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.is-open {
  display: flex;
  animation: fadeIn .25s var(--ease);
}
.lightbox__figure {
  margin: 0;
  max-width: 90vw;
  max-height: 88vh;
  text-align: center;
}
.lightbox__figure img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  margin: 0 auto;
}
.lightbox__figure figcaption {
  color: var(--ink);
  margin-top: 1rem;
  font-size: .95rem;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  transition: background .2s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255,255,255,.18); }
.lightbox__close { top: 1.5rem; right: 1.5rem; }
.lightbox__nav--prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1.5rem; top: 50%; transform: translateY(-50%); }

@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 640px) {
  .nav__logo { font-size: .9rem; }
  .section { padding-top: 4.5rem; padding-bottom: 4.5rem; }
  .section__head { margin-bottom: 2.5rem; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
  .vote-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* =============================================================
   Brand corner stamp — Piece Of Slate wordmark
   Anchors bottom-right of the hero and again bottom-right of the
   feedback section, so the page opens and closes with the mark.
   The feedback rule uses a negative-right calc to break out of the
   .section max-width and land at the true viewport edge, so the
   two stamps line up visually.
   ============================================================= */
.hero::after,
#feedback::after {
  content: "";
  position: absolute;
  bottom: 2rem;
  width: clamp(140px, 18vw, 240px);
  aspect-ratio: 4.5 / 1;
  background: url("../images/pos-logo-light.png") center/contain no-repeat;
  opacity: .72;
  pointer-events: none;
}
.hero::after     { right: 2.5rem; }
#feedback::after { right: calc(2.5rem - max(0px, (100vw - var(--max-w)) / 2)); }
@media (max-width: 640px) {
  .hero::after     { right: 1.25rem; bottom: 5rem; }
  #feedback::after { right: 1.25rem; bottom: 1.5rem; }
}
