/* ==========================================================
   threenet.ch – site-specific components on top of the
   threecode.ch design system (tokens.css + styles.css,
   ThreeNet accent via body.product-page--threenet).
   ========================================================== */

/* Amber glow in the home hero (styles.css only tints .page-hero) */
body.product-page--threenet .hero::before {
  background:
    radial-gradient(ellipse 55% 50% at 75% 45%, rgb(var(--brand-accent-rgb) / 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 15% 85%, rgb(96 165 250 / 0.10) 0%, transparent 55%);
}

.section-title, .hero__title, .page-hero__title, .cta-banner__title, .feature-detail__title { text-wrap: balance; }

/* Reveal animations only when main.js runs; no motion when unwanted */
html:not(.js) .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .service-card:hover, .btn:hover { transform: none !important; }
}

/* Dark text on the amber button also on hover (contrast) */
body.product-page--threenet .btn--primary:hover { color: var(--tc-color-primary); }

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }

/* Anchors land below the fixed header (and the sticky section nav) */
[id] { scroll-margin-top: calc(var(--nav-height) + 1rem); }
.catalog [id] { scroll-margin-top: calc(var(--nav-height) + 4.5rem); }

/* ----------------------------------------------------------
   Header logo (threenet.png: mark + light wordmark)
   ---------------------------------------------------------- */
/* the PNG has wide transparent padding around mark and wordmark */
.nav__logo img { height: 64px; margin-left: -18px; }
.nav__menu { justify-content: center; }

/* ----------------------------------------------------------
   Screenshot frames
   ---------------------------------------------------------- */
.shot {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #0b1222;
  border: 1px solid rgb(255 255 255 / 0.1);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.6), 0 0 0 1px rgb(0 0 0 / 0.2);
}

.shot__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding-inline: 12px;
  background: #131c31;
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
}

.shot__bar span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #334155;
}

.shot__bar em {
  margin-left: 10px;
  flex: 1;
  max-width: 300px;
  font-style: normal;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  background: rgb(255 255 255 / 0.05);
  border-radius: 6px;
  padding: 2px 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shot a, .phone a { display: block; cursor: zoom-in; }
.shot img { width: 100%; height: auto; }

.shot figcaption, .phone-wrap figcaption {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-align: center;
  padding: 0.6rem 1rem 0.75rem;
  background: #0b1222;
}

.phone {
  margin: 0;
  width: 100%;
  max-width: 250px;
  padding: 9px;
  border-radius: 34px;
  background: #0b1222;
  border: 1px solid rgb(255 255 255 / 0.14);
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.7);
}

.phone img { border-radius: 26px; width: 100%; height: auto; }

/* ----------------------------------------------------------
   Hero
   ---------------------------------------------------------- */
.hero { min-height: 0; }
.hero__container { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
/* +53px top and bottom: takes over the height of the former trust bar */
@media (min-width: 1025px) { .hero__container { padding-block: calc(var(--space-5xl) + 53px); } }
.hero__title { font-size: clamp(2.25rem, 4.2vw, 3.5rem); }
.hero__subtitle { max-width: 560px; }
.hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: var(--space-xl); }
.hero__stat-value { font-size: 1.35rem; }
.hero__stat-label { max-width: 19ch; line-height: 1.45; }

.hero__visual { position: relative; padding: 0 0 2.5rem 2.5rem; }
.hero__visual .shot { width: 100%; }

.hero__visual .phone {
  position: absolute;
  left: -1.5rem;
  bottom: -1rem;
  width: 31%;
  max-width: 190px;
  padding: 6px;
  border-radius: 26px;
}

.hero__visual .phone img { border-radius: 20px; }


@media (max-width: 1024px) {
  .hero__container { grid-template-columns: minmax(0, 1fr); padding-block: var(--space-3xl) var(--space-4xl); }
  .hero__visual { display: block; padding: 0 0 2rem 1.5rem; max-width: 720px; margin-inline: auto; width: 100%; }
  .hero__visual .phone { left: -0.5rem; }
  .hero__actions { margin-bottom: var(--space-2xl); }
}

@media (max-width: 480px) {
  .nav__logo img { height: 54px; margin-left: -14px; }
  .nav__actions .btn { display: none; }
  .hero__actions .btn { width: 100%; justify-content: center; }
  .hero__stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); }
  .hero__stat-label { font-size: 0.68rem; margin-inline: auto; }
}

/* ----------------------------------------------------------
   Module cards (whole card links to the feature catalogue)
   ---------------------------------------------------------- */
.modules__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
a.service-card { color: inherit; }
.service-card { padding: var(--space-xl); }
.service-card__icon { width: 48px; height: 48px; font-size: 1.25rem; margin-bottom: var(--space-md); }
.service-card__title { font-size: 1.125rem; margin-bottom: var(--space-sm); }
.service-card__desc { font-size: 0.9rem; line-height: 1.65; color: var(--color-text-muted); flex: 1; }

.service-card__more {
  margin-top: var(--space-md);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modules__group {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-accent);
  margin: 0 0 var(--space-lg);
}
.modules__grid + .modules__group { margin-top: var(--space-3xl); }
.modules__group-desc { color: var(--color-text-muted); max-width: 720px; margin: calc(-1 * var(--space-sm)) 0 var(--space-lg); }

/* A single card in the last row of three sits in the middle */
@media (min-width: 1025px) { .modules__grid > :last-child:nth-child(3n + 1) { grid-column: 2; } }
@media (max-width: 1024px) { .modules__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .modules__grid { grid-template-columns: minmax(0, 1fr); } }

/* ----------------------------------------------------------
   Feature blocks with screenshots
   ---------------------------------------------------------- */
.feature-detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--space-3xl); }
.feature-detail + .feature-detail { margin-top: var(--space-5xl); }
.feature-detail .feature-list { margin-bottom: 0; }
.feature-list__item i { color: var(--brand-accent); }
.feature-list__item strong { color: var(--color-heading); font-weight: 600; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-accent);
  margin-bottom: var(--space-md);
}

.shots-stack { display: grid; gap: var(--space-lg); }

.shots-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
}

@media (max-width: 1024px) {
  .feature-detail { grid-template-columns: minmax(0, 1fr); }
  .feature-detail + .feature-detail { margin-top: var(--space-4xl); }
}


/* ----------------------------------------------------------
   Phones row
   ---------------------------------------------------------- */
.phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 250px));
  justify-content: center;
  gap: var(--space-2xl);
}

.phone-wrap { margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--space-md); }
.phone-wrap figcaption { background: none; padding: 0; max-width: 250px; }
.phones--single { grid-template-columns: minmax(0, 230px); justify-content: center; }

@media (max-width: 768px) {
  .phones {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    justify-content: start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: var(--space-md);
    margin-inline: -1.5rem;
    padding-inline: 1.5rem;
  }
  .phone-wrap { scroll-snap-align: center; }
  .phones--single { grid-template-columns: minmax(0, 230px); justify-content: center; overflow: visible; margin-inline: 0; padding-inline: 0; }
}

/* ----------------------------------------------------------
   Facts grid (security & operations)
   ---------------------------------------------------------- */
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
}

.fact {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.fact i {
  width: 22px;
  height: 22px;
  color: var(--brand-accent);
  margin-bottom: var(--space-md);
}

.fact h3 { font-size: 1.0625rem; font-weight: 700; color: var(--color-heading); margin-bottom: var(--space-sm); }
.fact p { font-size: 0.9rem; line-height: 1.65; color: var(--color-text-muted); }

@media (max-width: 1024px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .facts { grid-template-columns: minmax(0, 1fr); } }

/* Process: four steps also fit on tablets */
.process-step__number { background: linear-gradient(135deg, #1e293b 0%, var(--brand-surface-tint) 100%); border: 1px solid rgb(var(--brand-accent-rgb) / 0.4); color: var(--brand-accent); }
/* Connector from circle centre to the next circle's centre, behind the
   circles (styles.css draws it at 36px from the top and over them) */
.process-step__number { position: relative; z-index: 1; }
.process-step::after {
  top: calc(var(--space-xl) + 31px);
  left: 50%;
  right: auto;
  width: calc(100% + var(--space-md));
  background: rgb(var(--brand-accent-rgb) / 0.35);
}

/* FAQ answers may contain links */
.faq__answer a { color: var(--brand-accent); text-decoration: underline; text-underline-offset: 3px; }

/* ----------------------------------------------------------
   Feature catalogue (funktionen.html)
   ---------------------------------------------------------- */
.page-hero__title { max-width: 860px; }

.subnav {
  position: sticky;
  top: var(--nav-height);
  z-index: 900;
  background: rgba(15 23 42 / 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgb(255 255 255 / 0.06);
}

.subnav__list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 10px;
}

.subnav__list::-webkit-scrollbar { display: none; }

.subnav__list a {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid rgb(255 255 255 / 0.08);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.subnav__list a:hover { color: var(--brand-accent); border-color: rgb(var(--brand-accent-rgb) / 0.4); }

.catalog__section { padding-block: var(--space-4xl); border-bottom: 1px solid rgb(255 255 255 / 0.05); }
.catalog__section:nth-child(even) { background: var(--color-bg-alt); }

.catalog__head {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.catalog__head i {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 13px;
  border-radius: var(--radius-md);
  background: rgb(var(--brand-accent-rgb) / 0.12);
  color: var(--brand-accent);
}

.catalog__title { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; color: var(--color-heading); letter-spacing: -0.02em; }
.catalog__intro { font-size: 1rem; color: var(--color-text-muted); line-height: 1.75; max-width: 760px; margin-bottom: var(--space-2xl); }

.catalog__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: var(--space-3xl);
  align-items: start;
}

.catalog__lists h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
  margin: var(--space-xl) 0 var(--space-md);
}

.catalog__lists h3:first-child { margin-top: 0; }

@media (max-width: 1024px) { .catalog__body { grid-template-columns: minmax(0, 1fr); } }

/* Note under the module catalogue */
.note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 760px;
  margin: var(--space-2xl) auto 0;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: rgb(var(--brand-accent-rgb) / 0.06);
  border: 1px solid rgb(var(--brand-accent-rgb) / 0.2);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.note i { color: var(--brand-accent); margin-top: 3px; }

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */
.footer__top { grid-template-columns: 2fr 1fr 1fr 1fr; }
.footer__brand-logo img { height: 60px; margin-left: -18px; }
.footer__note { margin-top: var(--space-md); font-size: 0.8125rem; color: rgb(255 255 255 / 0.45); }

@media (max-width: 1024px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) { .footer__top { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------
   Lightbox
   ---------------------------------------------------------- */
.lightbox {
  margin: auto;
  padding: 0;
  border: none;
  background: transparent;
  max-width: min(96vw, 1600px);
  max-height: 94vh;
  cursor: zoom-out;
}

.lightbox::backdrop { background: rgb(2 6 23 / 0.88); backdrop-filter: blur(4px); }
.lightbox figure { margin: 0; }

.lightbox img {
  max-width: min(96vw, 1600px);
  max-height: calc(94vh - 2.5rem);
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.6);
}

.lightbox figcaption { color: #e2e8f0; text-align: center; font-size: 0.875rem; padding-top: 0.75rem; }

/* 404 */
.notfound { min-height: calc(100vh - var(--nav-height) - 1px); display: flex; align-items: center; }
.notfound .page-hero__subtitle { margin-bottom: var(--space-xl); }
.notfound__actions { display: flex; flex-wrap: wrap; gap: var(--space-md); }
