/* ===== Pulsari Oy — dark minimal theme ===== */
:root {
  --bg: #000000;
  --bg-soft: #0a0a0a;
  --fg: #f4f4f4;
  --fg-dim: #9a9a9a;
  --fg-faint: #5c5c5c;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.06);
  --grid-line: rgba(255, 255, 255, 0.22);
  --accent: #eab000;
  --accent-ink: #1a1a1a;
  --maxw: 1280px;
  --pad: clamp(20px, 4vw, 56px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Lenis smooth scroll (active on desktop only) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Keep anchored sections clear of the fixed header */
section[id], #top { scroll-margin-top: 88px; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.02em; line-height: 1.08; }

/* Grid vignette background (pure CSS port of the GridVignetteBackground component) */
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .6;
  background-image:
    linear-gradient(to right, var(--grid-line), transparent 1px),
    linear-gradient(to bottom, var(--grid-line), transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 100% 90% at 50% 45%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 100% 90% at 50% 45%, #000 35%, transparent 100%);
}
.site-header, main, .site-footer, .cookie { position: relative; z-index: 1; }

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

.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  color: var(--fg-dim);
  margin: 0 0 1.4rem;
}
.eyebrow .idx { color: var(--fg-faint); }

.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: #fff; color: #000; padding: 10px 16px; }
.skip-link:focus { left: 0; }

.arrow { font-style: normal; display: inline-block; transition: transform .25s ease; }
.arrow-accent { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ===== Buttons / pills ===== */
.pill {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: 12px 20px; border-radius: 999px;
  border: 1px solid var(--line);
  font-size: .92rem; font-weight: 500; cursor: pointer;
  background: transparent; color: var(--fg);
  transition: background .25s, color .25s, border-color .25s, transform .2s;
}
.pill:hover { transform: translateY(-1px); }
.pill:hover .arrow { transform: translate(2px, -2px); }
.pill-solid { background: #fff; color: #000; border-color: #fff; }
.pill-solid:hover { background: var(--accent); border-color: var(--accent); }
.pill-ghost { background: transparent; }
.pill-ghost:hover { border-color: var(--fg); }
.btn-full { width: 100%; justify-content: center; }

/* ===== Header ===== */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 40; }
.hwrap {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start;
  padding: 22px var(--pad);
}
.nav-left { display: flex; flex-direction: column; gap: 2px; font-size: .9rem; }
.nav-left a { color: var(--fg-dim); width: max-content; transition: color .2s; }
.nav-left a:hover { color: var(--fg); }

.wordmark { font-size: 1.25rem; font-weight: 500; letter-spacing: -0.02em; justify-self: center; padding-top: 2px; }
.wordmark span { color: var(--fg-dim); font-size: .7em; vertical-align: top; }

.nav-right { display: flex; align-items: center; gap: 1.4rem; justify-self: end; }
.lang-switch { display: flex; align-items: center; gap: .35rem; color: var(--fg-faint); font-size: .85rem; font-family: var(--mono); }
.lang-btn { background: none; border: none; cursor: pointer; font: inherit; color: var(--fg-faint); padding: 0; }
.lang-btn.is-active { color: var(--fg); }
.cta-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; }
.cta-link:hover .arrow { transform: translate(2px,-2px); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 1.5px; background: var(--fg); transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.m-menu { display: none; }

/* ===== Hero ===== */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad) 0;
  max-width: var(--maxw); margin: 0 auto; width: 100%;
}
.hero-content { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 1000px; }
.hero-title { font-size: clamp(2.4rem, 7vw, 5.4rem); font-weight: 300; letter-spacing: -0.03em; }
.hero-sub { margin: 1.8rem 0 2.4rem; color: var(--fg-dim); font-size: clamp(.95rem, 1.4vw, 1.05rem); max-width: 620px; }
.pill { align-self: flex-start; }

.hero-foot {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: end;
  padding: 2.5rem 0; border-top: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: .74rem; color: var(--fg-dim);
}
.hf-center { text-align: center; }
.hf-right { text-align: right; }
.hf-label { margin: 0 0 .2rem; color: var(--fg-faint); text-transform: uppercase; letter-spacing: .1em; }
.hf-clock { margin: 0; color: var(--fg); }
.tag-list { list-style: none; margin: 0; padding: 0; }
.tag-list li { color: var(--fg-dim); }

/* ===== Hero entrance reveal ===== */
.hero.reveal .hero-title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.42em);
  filter: blur(8px);
  transition: opacity .7s ease, transform .85s cubic-bezier(.2,.75,.25,1), filter .7s ease;
  transition-delay: calc(var(--i) * 70ms + 80ms);
  will-change: transform, opacity, filter;
}
.hero.reveal.is-in .hero-title .word { opacity: 1; transform: translateY(0); filter: blur(0); }

.hero.reveal .hero-sub,
.hero.reveal .hero-content .pill,
.hero.reveal .hero-foot {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .85s cubic-bezier(.2,.75,.25,1);
}
.hero.reveal.is-in .hero-sub { opacity: 1; transform: none; transition-delay: .35s; }
.hero.reveal.is-in .hero-content .pill { opacity: 1; transform: none; transition-delay: .5s; }
.hero.reveal.is-in .hero-foot { opacity: 1; transform: none; transition-delay: .65s; }

/* ===== Sections ===== */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-line { border-top: 1px solid var(--line-soft); }
.section-head { max-width: 720px; margin-bottom: 3rem; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.8rem); font-weight: 300; }

/* ===== Cards ===== */
.cards { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
.card {
  background: var(--bg-soft); border: 1px solid var(--line); padding: 2rem 1.8rem 2.2rem; position: relative;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9);
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.card:hover { border-color: rgba(234,176,0,.4); box-shadow: 0 44px 80px -30px rgba(0,0,0,.95); background: #0d0d0d; }
.card-no { font-family: var(--mono); font-size: .75rem; color: var(--accent); }
.card-tag { font-family: var(--mono); font-size: .72rem; color: var(--fg-faint); text-transform: uppercase; letter-spacing: .08em; margin: 1.4rem 0 .8rem; }
.card h3 { font-size: 1.45rem; font-weight: 400; margin-bottom: .8rem; }
.card p { margin: 0; color: var(--fg-dim); font-size: .95rem; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.about-grid h2 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 300; margin-bottom: 1.4rem; }
.lead { color: var(--fg-dim); font-size: 1.02rem; }
.vm { display: grid; gap: 1.2rem; }
.vm-item {
  background: var(--bg-soft); border: 1px solid var(--line); padding: 1.6rem;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9); transition: border-color .3s, box-shadow .3s;
}
.vm-item:hover { border-color: rgba(234,176,0,.35); }
.vm-item h3 { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin-bottom: .7rem; }
.vm-item p { margin: 0; color: var(--fg-dim); font-size: .95rem; }

/* ===== Why ===== */
.why-grid { display: grid; grid-template-columns: 1fr; gap: 1.4rem; }
.why-item {
  background: var(--bg-soft); border: 1px solid var(--line); padding: 1.8rem 1.6rem;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.9); transition: border-color .3s;
}
.why-item:hover { border-color: rgba(234,176,0,.35); }
.why-no { font-family: var(--mono); color: var(--accent); font-size: 1.1rem; }
.why-item h3 { font-size: 1.2rem; font-weight: 400; margin: 1rem 0 .5rem; }
.why-item p { margin: 0; color: var(--fg-dim); font-size: .92rem; }

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 2.6rem; }
.contact-intro h2 { font-size: clamp(1.7rem, 3.6vw, 2.8rem); font-weight: 300; margin-bottom: 1.2rem; }
.contact-intro p { color: var(--fg-dim); }
.contact-list { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: .8rem; font-family: var(--mono); font-size: .9rem; }
.contact-list li { display: flex; gap: .6rem; align-items: center; }
.contact-list .ci { color: var(--accent); }
.contact-list a:hover { color: var(--accent); }

.contact-form { border: 1px solid var(--line); padding: 1.8rem; background: var(--bg-soft); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--fg-dim); margin-bottom: .5rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: .95rem;
  color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 0; transition: border-color .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field textarea { resize: vertical; }
.field select { appearance: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 1rem 0 0; font-size: .9rem; min-height: 1.2em; }
.form-status.ok { color: var(--accent); }
.form-status.err { color: #ff6b5e; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line-soft); padding: 4rem 0 1.6rem; }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 2.2rem; }
.footer-brand p { color: var(--fg-dim); max-width: 320px; margin: .9rem 0 0; font-size: .9rem; }
.wordmark-sm { font-size: 1.1rem; }
.footer-col { display: flex; flex-direction: column; gap: .55rem; font-size: .9rem; }
.footer-col .fh { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fg-faint); margin-bottom: .3rem; }
.footer-col a { color: var(--fg-dim); }
.footer-col a:hover { color: var(--fg); }
.footer-col span:not(.fh) { color: var(--fg-dim); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line-soft); font-family: var(--mono); font-size: .76rem; color: var(--fg-faint); }
.link-btn { background: none; border: none; color: var(--fg-faint); cursor: pointer; font: inherit; }
.link-btn:hover { color: var(--fg); }

/* ===== Cookie banner ===== */
.cookie {
  position: fixed; left: var(--pad); right: var(--pad); bottom: 18px; z-index: 60;
  max-width: 560px; margin: 0 auto;
  background: rgba(12,12,12,.92); backdrop-filter: blur(12px);
  border: 1px solid var(--line); padding: 1.2rem 1.3rem;
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
}
.cookie[hidden] { display: none; }
.cookie-text { margin: 0; font-size: .82rem; color: var(--fg-dim); flex: 1 1 260px; }
.cookie-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.cookie .pill { padding: 9px 16px; font-size: .85rem; }

/* ===== Floating boxes ===== */
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.card, .vm-item, .why-item, .contact-form {
  animation: floaty 7s ease-in-out infinite;
  will-change: transform;
}
.card:nth-child(1)    { animation-duration: 7s;   animation-delay: -0.5s; }
.card:nth-child(2)    { animation-duration: 8s;   animation-delay: -3s; }
.card:nth-child(3)    { animation-duration: 6.5s; animation-delay: -5.5s; }
.vm-item:nth-child(1) { animation-duration: 7.5s; animation-delay: -1.5s; }
.vm-item:nth-child(2) { animation-duration: 8.5s; animation-delay: -4.5s; }
.why-item:nth-child(1){ animation-duration: 7s;   animation-delay: -0.8s; }
.why-item:nth-child(2){ animation-duration: 8s;   animation-delay: -2.6s; }
.why-item:nth-child(3){ animation-duration: 6.8s; animation-delay: -4.2s; }
.why-item:nth-child(4){ animation-duration: 7.6s; animation-delay: -6s; }
.contact-form         { animation-duration: 9s;   animation-delay: -2s; }

/* ===== Responsive ===== */
@media (min-width: 760px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 1.05fr .95fr; gap: 4rem; align-items: start; }
  .why-grid { grid-template-columns: repeat(4, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
  .footer-inner { grid-template-columns: 2fr 1fr 1.4fr; }
}

@media (max-width: 820px) {
  .nav-left, .cta-link span { display: none; }
  .nav-toggle { display: flex; }
  .hwrap { grid-template-columns: auto 1fr auto; align-items: center; }
  .wordmark { justify-self: start; }
  .nav-right { gap: 1rem; }
  .site-header.open .m-menu {
    display: flex; flex-direction: column; gap: 1.1rem;
    padding: 1.4rem var(--pad) 1.8rem; background: rgba(0,0,0,.96);
    border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  }
  .m-menu a { color: var(--fg-dim); font-size: 1.05rem; }
  .hero-foot { grid-template-columns: 1fr; gap: 1.4rem; text-align: center; }
  .hf-center, .hf-right { text-align: center; }
  .site-header.open .m-menu { align-items: center; text-align: center; }
}

/* Mobile: center content so the page doesn't look one-sided */
@media (max-width: 760px) {
  .hero-content { align-items: center; text-align: center; }
  .hero-content .pill { align-self: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .section-head { text-align: center; margin-left: auto; margin-right: auto; }
  .about-grid, .about-grid h2, .lead { text-align: center; }
  .card, .vm-item, .why-item { text-align: center; }
  .contact-intro { text-align: center; }
  .contact-list { justify-items: center; }
  .contact-list li { justify-content: center; }
  .contact-form { text-align: left; }
  .footer-inner { text-align: center; }
  .footer-brand p { margin-left: auto; margin-right: auto; }
  .footer-col { align-items: center; }
}

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