/* Silentbox EE — design system
   Brand palette: Silentbox purple #823494 / #6E2D89 on clean white (as the
   original silentbox.ee and Silentbox catalogues). Fraunces display + Inter body.
   1px borders, no gradients, no shadows-as-decoration. */

:root {
  --paper: #FCFBFD;
  --paper-2: #F4F1F6;
  --ink: #1E2230;
  --ink-soft: #3E4354;
  --ink-subtle: #5D6272;
  --line: #E3DEE8;
  --accent: #823494;
  --accent-dark: #6E2D89;
  --accent-deep: #2E1136;
  --white: #FFFFFF;
  --font-d: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-b: "Inter", -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --r: 2px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-b);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul { list-style: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; }

/* ---------- type ---------- */
h1, h2, h3, .page-h1 {
  font-family: var(--font-d);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.15rem; line-height: 1.3; }

.kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.kicker a { text-decoration: none; }
.kicker a:hover { color: var(--accent); }
.kicker-accent { color: var(--accent); }

.lead { font-size: 1.11rem; color: var(--ink-soft); max-width: 56ch; }
.muted { color: var(--ink-subtle); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-b);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.85rem 1.7rem;
  border-radius: var(--r);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn { border-color: var(--accent); }
.btn-solid { background: var(--accent); color: var(--white); }
.btn-solid:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-line { background: transparent; color: var(--accent); }
.btn-line:hover { background: var(--accent); color: var(--white); }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.88rem; }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* same surface as --paper (#FCFBFD) — translucent for sticky blur */
  background: rgba(252, 251, 253, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-in {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 76px;
}
.brand { flex: 0 0 auto; }
.brand img { height: 48px; width: auto; }
.main-nav { display: flex; gap: 1.5rem; margin-left: auto; }
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--accent); }
.header-tools { display: flex; align-items: center; gap: 1rem; }

.lang-switch { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 5px;
  font: 600 0.85rem var(--font-b);
  background: none; border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0.5rem 0.7rem;
  cursor: pointer; color: var(--ink);
  transition: border-color 0.2s;
}
.lang-btn:hover { border-color: var(--ink); }
.lang-menu {
  display: none;
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  min-width: 140px;
  z-index: 60;
}
.lang-switch.open .lang-menu { display: block; }
.lang-menu a {
  display: block;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background-color 0.15s;
}
.lang-menu a:hover { background: var(--paper); }
.lang-menu a[aria-current] { color: var(--accent); font-weight: 600; }

.nav-toggle { display: none; }

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 3rem;
  align-items: center;
  min-height: min(88vh, 780px);
  padding-top: 3rem;
  padding-bottom: 0;
}
/* full-bleed right: photo runs to the viewport edge on wide screens */
.hero .wrap.hero-grid {
  max-width: none;
  padding-left: max(24px, calc((100vw - var(--wrap)) / 2 + 24px));
  padding-right: 0;
}
.hero-copy { padding-bottom: 3rem; }
.hero h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.1rem);
  margin: 0 0 1.4rem;
}
.h1-a { display: block; }
.h1-b { display: block; font-style: normal; color: var(--accent); }
.hero .lead { margin-bottom: 2rem; }
.hero-ctas { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 2.2rem; }
.hero-badges { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.badge {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-subtle);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 0.35rem 0.7rem;
  background: var(--white);
}
.hero-media { align-self: stretch; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-left: 1px solid var(--line);
}

/* ---------- sections ---------- */
.section { padding: 6rem 0; border-bottom: 1px solid var(--line); }
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 3rem;
}
.split h2 { max-width: 22ch; }
.split-body p + p { margin-top: 1rem; }
.split-body { color: var(--ink-soft); }
.split-cta { justify-self: end; align-self: center; }

/* problem stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  background: var(--white);
}
.stat { padding: 1.8rem 1.5rem; border-left: 1px solid var(--line); }
.stat:first-child { border-left: none; }
.stat-n {
  font-family: var(--font-d);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: 0.5rem;
}
.stat p { font-size: 0.88rem; color: var(--ink-soft); }
.stats-note { margin-top: 0.8rem; font-size: 0.8rem; color: var(--ink-subtle); }

/* models */
.model-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.model-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s;
}
.model-card:hover { border-color: var(--ink-subtle); }
.model-img { background: var(--paper-2); padding: 1.5rem; }
.model-img img { width: 100%; height: 240px; object-fit: contain; }
.model-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.7rem; flex: 1; }
.model-type {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.model-body p { font-size: 0.92rem; color: var(--ink-soft); }
.model-specs { border-top: 1px solid var(--line); padding-top: 0.7rem; margin-top: auto; }
.model-specs summary {
  font-size: 0.82rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  cursor: pointer; color: var(--ink-subtle);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.model-specs summary::-webkit-details-marker { display: none; }
.model-specs summary::after { content: "+"; font-size: 1rem; }
.model-specs[open] summary::after { content: "–"; }
.model-specs ul { margin-top: 0.6rem; }
.model-specs li { font-size: 0.85rem; color: var(--ink-soft); padding: 0.25rem 0; border-bottom: 1px dotted var(--line); }
.model-specs li:last-child { border-bottom: none; }
.model-ctas { display: flex; gap: 0.6rem; }

/* workpod */
.workpod { background: var(--accent-deep); color: #EDE4F1; }
.workpod h2, .workpod h3 { color: var(--white); }
.workpod .kicker { color: #C79AD6; }
.workpod .lead { color: #CBB8D6; }
.wp-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 4rem;
  align-items: center;
}
.wp-media img {
  width: 100%;
  border-radius: var(--r);
  background: var(--white);
}
.wp-feats { display: grid; gap: 1.2rem; margin: 2rem 0 2.4rem; }
.wp-feat { border-left: 1px solid rgba(255, 255, 255, 0.22); padding-left: 1.2rem; }
.wp-feat h3 { font-size: 1.02rem; margin-bottom: 0.2rem; }
.wp-feat p { font-size: 0.92rem; color: #CBB8D6; }
.workpod .btn-solid { background: var(--white); color: var(--accent-dark); border-color: var(--white); }
.workpod .btn-solid:hover { background: #E9DFF0; border-color: #E9DFF0; color: var(--accent-deep); }

/* tech */
.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.tech-col {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 2rem;
}
.tech-col h3 { margin-bottom: 1.1rem; font-size: 1.3rem; }
.tech-list li {
  position: relative;
  padding: 0.65rem 0 0.65rem 1.6rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  border-bottom: 1px dotted var(--line);
}
.tech-list li:last-child { border-bottom: none; }
.tech-list li::before {
  content: "";
  position: absolute; left: 0; top: 1.18rem;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
}
.tech-custom {
  margin-top: 2rem;
  font-size: 1.02rem;
  color: var(--ink-soft);
  max-width: 68ch;
}

/* clients */
.clients h2 { margin-bottom: 2.5rem; max-width: 24ch; }
.client-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--white);
}
.client-logo {
  display: flex; align-items: center; justify-content: center;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.6rem 1.2rem;
  min-height: 96px;
}
.client-logo img {
  max-height: 40px; width: auto; max-width: min(120px, 100%);
  filter: grayscale(1);
  opacity: 0.65;
  transition: filter 0.25s, opacity 0.25s;
}
.client-logo:hover img { filter: none; opacity: 1; }

/* gallery */
.gallery { padding-bottom: 0; border-bottom: none; }
.gallery h2 { margin-bottom: 2.5rem; }
.g-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.g-item { overflow: hidden; aspect-ratio: 4 / 3; }
.g-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.g-item:hover img { transform: scale(1.03); }

/* care */
.care h2 { margin-bottom: 2.5rem; max-width: 24ch; }
.care-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.care-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.6rem;
}
.care-num {
  font-family: var(--font-d);
  font-size: 0.95rem;
  color: var(--accent);
  display: block;
  margin-bottom: 0.9rem;
}
.care-item h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.care-item p { font-size: 0.9rem; color: var(--ink-soft); }
.sb-line { margin-top: 2.2rem; font-size: 0.98rem; color: var(--ink-soft); }
.sb-line a { color: var(--accent); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sb-line a:hover { color: var(--accent-dark); }

/* blog teaser + list */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.post-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  transition: border-color 0.2s;
}
.post-card:hover { border-color: var(--ink-subtle); }
.post-card time { font-size: 0.8rem; color: var(--ink-subtle); }
.post-card h3 a, .post-card h2 a { text-decoration: none; transition: color 0.2s; }
.post-card h3 a:hover, .post-card h2 a:hover { color: var(--accent); }
.post-card p { font-size: 0.92rem; color: var(--ink-soft); flex: 1; }
.post-more {
  font-size: 0.88rem; font-weight: 600;
  text-decoration: none; color: var(--accent);
}
.post-more:hover { color: var(--accent-dark); }
.post-list { display: grid; gap: 1.5rem; max-width: 760px; margin-top: 2.5rem; }
.post-card-lg h2 { font-size: 1.5rem; }

/* faq */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 3rem;
  align-items: start;
}
.faq-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  font-family: var(--font-d);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 1.2rem 2rem 1.2rem 0;
  cursor: pointer;
  list-style: none;
  position: relative;
  transition: color 0.2s;
}
.faq-item summary:hover { color: var(--accent); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute; right: 0.2rem; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-b);
  font-size: 1.3rem;
  color: var(--ink-subtle);
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 2rem 1.3rem 0; color: var(--ink-soft); font-size: 0.96rem; }

/* contact */
.contact { border-bottom: none; }
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
}
.contact-list { margin-top: 1.6rem; display: grid; gap: 0.5rem; }
.contact-list a {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: 1.15rem;
  text-decoration: none;
  transition: color 0.2s;
}
.contact-list a:hover { color: var(--accent); }
.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 2rem;
  display: grid;
  gap: 1.1rem;
}
.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  font: 400 1rem var(--font-b);
  color: var(--ink);
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--paper);
  transition: border-color 0.2s;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.consent {
  display: flex !important;
  gap: 0.6rem;
  font-weight: 400 !important;
  font-size: 0.82rem !important;
  align-items: flex-start;
}
.consent input { margin-top: 3px; accent-color: var(--accent); }
.consent a { color: var(--accent); }
.form-msg { font-size: 0.92rem; font-weight: 600; }
.form-msg.ok { color: #1F7A3D; }
.form-msg.err { color: #B3261E; }

/* pages */
.page { padding: 4rem 0 6rem; }
.page-h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin-bottom: 1rem; }
.article-meta { color: var(--ink-subtle); font-size: 0.88rem; margin-bottom: 2.5rem; }
.article-body { font-size: 1.05rem; color: var(--ink-soft); }
.article-body p { margin-bottom: 1.2rem; }
.article-body h2 {
  color: var(--ink);
  font-size: 1.6rem;
  margin: 2.4rem 0 0.9rem;
}
.article-body ul { list-style: none; margin: 0 0 1.2rem; }
.article-body li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.5rem;
}
.article-body li::before {
  content: "";
  position: absolute; left: 0; top: 0.95rem;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
}
.article-body a { color: var(--accent); text-underline-offset: 3px; }
.article-body a:hover { color: var(--accent-dark); }
.article-body strong { color: var(--ink); }

/* footer */
.site-footer {
  background: var(--accent-dark);
  color: #DCC9E6;
  padding: 4rem 0 2rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.footer-brand img { height: 48px; width: auto; margin-bottom: 1rem; }
.site-footer h3 {
  color: var(--white);
  font-family: var(--font-b);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.site-footer ul { display: grid; gap: 0.45rem; }
.site-footer a { text-decoration: none; transition: color 0.2s; }
.site-footer a:hover { color: var(--white); }
.footer-bottom {
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: #D5C1E0;
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .model-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .client-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .care-grid { grid-template-columns: repeat(2, 1fr); }
  .g-strip { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 24px 1rem;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 0.75rem 0; border-bottom: 1px dotted var(--line); }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 0.3rem;
  }
  .nav-toggle span { width: 22px; height: 2px; background: var(--ink); transition: transform 0.2s, opacity 0.2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .header-in { gap: 0.8rem; }
  .brand img { height: 40px; }
  .header-tools { margin-left: auto; }
  .header-tools .btn { display: none; }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 3.5rem;
    gap: 2rem;
  }
  .hero .wrap.hero-grid { max-width: none; padding-left: 24px; padding-right: 24px; }
  .hero-copy { padding-bottom: 0; }
  .hero-media { margin: 0 -24px; }
  .hero-media img { height: 340px; border-left: none; border-top: 1px solid var(--line); }

  .section { padding: 4rem 0; }
  .split, .wp-grid, .tech-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; }
  .split { gap: 1rem; margin-bottom: 2.2rem; }
  .split-cta { justify-self: start; }
  .wp-grid { gap: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.4rem; }
}

@media (max-width: 560px) {
  .model-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-left: none; }
  .stat + .stat { border-top: 1px solid var(--line); }
  .client-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .care-grid { grid-template-columns: 1fr; }
  .g-strip { grid-template-columns: 1fr; }
  .contact-form { padding: 1.4rem; }
}

/* ---------- scroll reveals (added by JS only) ---------- */
.will-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.will-reveal.revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .will-reveal { opacity: 1; transform: none; }
}

/* ---------- model comparison table ---------- */
.compare-block { margin-top: 3rem; }
.compare-title { font-size: 1.3rem; margin-bottom: 1rem; }
.compare-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
.compare-table { border-collapse: collapse; width: 100%; min-width: 820px; font-size: 0.9rem; }
.compare-table th, .compare-table td { padding: 0.7rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
.compare-table thead th { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); border-bottom: 1px solid var(--ink-subtle); }
.compare-table tbody th { font-weight: 600; color: var(--ink); white-space: nowrap; }
.compare-table td { color: var(--ink-soft); }
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: none; }
