/*
  _shared/styles.css

  Global styles for every page. All values reference variables from
  brand/tokens.css. Edit tokens, not this file, to change your visual
  identity. Edit this file to change layout patterns or add new
  reusable components.
*/

/* RESET */

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}
body {
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
button {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
}

/* LAYOUT */

.container {
  width: 100%;
  max-width: var(--container-default);
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}
.container-narrow { max-width: var(--container-narrow); }
.container-wide { max-width: var(--container-wide); }

.grid {
  display: grid;
  gap: var(--space-md);
}
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* TYPOGRAPHY */

h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem); margin: 0 0 var(--space-md); }
h2 { font-size: clamp(1.625rem, 2.5vw + 0.5rem, 2.5rem); margin: 0 0 var(--space-md); }
h3 { font-size: 1.25rem; margin: 0 0 var(--space-xs); font-weight: 600; }
p  { margin: 0 0 var(--space-sm); }

.text-muted { color: var(--color-text-muted); }
.text-accent {
  font-family: var(--font-accent);
  font-weight: var(--font-weight-accent);
}

/* BUTTONS */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.btn:hover { opacity: 0.92; transform: translateY(-1px); }
.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
}
.btn-primary:hover { background: var(--color-text); opacity: 1; }
.btn-secondary {
  background: var(--color-text);
  color: #ffffff;
}
.btn-ghost {
  background: var(--color-bg-soft);
  color: var(--color-text);
}
.btn-ghost:hover { background: var(--color-bg-warm); color: #ffffff; opacity: 1; }

/* CARDS */

.card {
  background: var(--color-bg);
  border-radius: var(--radius-card);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
}
.card h3 { margin-top: 0; }
.card p { color: var(--color-text-muted); }
.card p:last-child { margin-bottom: 0; }

/* QUOTES */

.quote {
  margin: 0 auto;
  max-width: 720px;
  padding: var(--space-lg);
  background: var(--color-bg);
  border-radius: var(--radius-card);
  text-align: center;
}
.quote p {
  font-size: 1.375rem;
  line-height: 1.5;
  font-weight: 400;
  margin-bottom: var(--space-md);
}
.quote footer { margin-top: var(--space-sm); }
.quote cite {
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  letter-spacing: 0.02em;
}

/* FORMS */

label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="search"],
textarea,
select {
  width: 100%;
  font: inherit;
  color: var(--color-text);
  background: var(--color-bg-soft);
  padding: 0.875rem 1rem;
  border: 0;
  border-radius: var(--radius-input);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
  border-color: var(--color-accent);
}
.field { margin-bottom: var(--space-sm); }
.field-error { color: var(--color-error); font-size: 0.875rem; margin-top: 0.25rem; }
.field-success { color: var(--color-success); font-size: 0.875rem; margin-top: 0.25rem; }

/* HEADER + NAV */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}
.site-header > div,
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: 1rem var(--space-md);
  max-width: var(--container-wide);
  margin: 0 auto;
}
.site-header .logo {
  height: 2rem;
  width: auto;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.nav-item-group { display: flex; align-items: center; }
.nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--color-text);
  text-decoration: none;
  padding: 0.5rem 0;
  letter-spacing: -0.005em;
}
.nav-link[aria-current="page"] {
  font-weight: 700;
}
.nav-link:hover { color: var(--color-accent); }

.btn-nav {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

.nav-item-group { position: relative; }
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  min-width: 220px;
  padding: 0.5rem;
  z-index: 60;
  flex-direction: column;
  gap: 0.125rem;
}
.nav-item-group.has-dropdown:hover > .nav-dropdown,
.nav-item-group.has-dropdown:focus-within > .nav-dropdown {
  display: flex;
}
.nav-dropdown a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-button);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--color-text);
  text-decoration: none;
}
.nav-dropdown a:hover {
  background: var(--color-bg-soft);
  color: var(--color-accent);
  opacity: 1;
}

.burger-menu {
  display: none;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  cursor: pointer;
  padding: 0;
}
.burger-menu svg {
  width: 24px;
  height: 24px;
  display: block;
}

/* FOOTER */

.site-footer {
  background: var(--color-bg-soft);
  color: var(--color-text);
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
}
.site-footer > div,
.site-footer .container {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
  text-align: left;
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.site-footer .footer-col h4 {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 var(--space-sm);
  font-weight: 700;
}
.site-footer .footer-col a {
  display: block;
  color: var(--color-text);
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  text-decoration: none;
}
.site-footer .footer-col a:hover { color: var(--color-accent); opacity: 1; }
.site-footer .footer-tagline {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0;
}
.site-footer .footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
  text-align: center;
}
.site-footer .footer-bottom p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* HERO */

/* HERO SPLIT — dark left / photo right */
.hero-split {
  display: grid;
  grid-template-columns: 1fr 42%;
  min-height: 90vh;
  background: var(--palette-charcoal);
  position: relative;
  z-index: 1;
  overflow: visible;
}
.hero-split-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 8vw, 6rem) clamp(2rem, 5vw, 5rem) clamp(3rem, 8vw, 6rem) clamp(2rem, 6vw, 6rem);
}
.hero-eyebrow {
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.6875rem;
  color: var(--palette-blush);
  margin: 0 0 var(--space-md);
}
.hero-split-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5.5vw + 1rem, 5.5rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.025em;
  color: var(--palette-white);
  margin: 0 0 var(--space-md);
}
.hero-split-title em {
  font-style: italic;
  color: var(--palette-blush);
}
.hero-split-lede {
  font-size: 1.125rem;
  line-height: 1.65;
  color: rgba(250,248,245,0.72);
  max-width: 34rem;
  margin: 0 0 var(--space-lg);
}
.hero-split-cta {
  display: flex;
  flex-direction: row;
  gap: 0.875rem;
  flex-wrap: wrap;
  align-items: center;
}
.btn-hero-primary {
  display: inline-block;
  background: var(--palette-blush);
  color: var(--palette-charcoal);
  border-radius: var(--radius-button);
  padding: 0.875rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: opacity 0.15s;
}
.btn-hero-primary:hover { opacity: 0.85; }
.btn-hero-ghost {
  display: inline-block;
  border: 1.5px solid rgba(250,248,245,0.35);
  color: var(--palette-white);
  border-radius: var(--radius-button);
  padding: 0.875rem 2rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: border-color 0.15s, opacity 0.15s;
}
.btn-hero-ghost:hover { border-color: rgba(250,248,245,0.65); opacity: 0.9; }

/* HERO PHOTO SIDE */
.hero-split-photo {
  position: relative;
  overflow: visible;
  background: linear-gradient(160deg, #4e6b71 0%, #2a3c40 100%);
}
.hero-photo-crop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}
.hero-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.hero-photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-photo-img + .hero-photo-fallback { display: none; }
.hero-photo-fallback span {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(250,248,245,0.35);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* HERO FLOATING BADGES */
.hero-badge {
  position: absolute;
  background: rgba(250,248,245,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 16px;
  padding: 0.875rem 1.125rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 10;
}
.hero-badge--nps {
  bottom: -1.75rem;
  left: -2.5rem;
}
.hero-badge--companies {
  top: 3.5rem;
  left: -2.5rem;
}
.hero-badge--quote {
  bottom: 5rem;
  right: 1rem;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.375rem;
  max-width: 200px;
}
.hero-badge-score {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--palette-charcoal);
  line-height: 1;
}
.hero-badge-icon {
  width: 2rem;
  height: 2rem;
  background: var(--palette-sage);
  color: var(--palette-charcoal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  flex-shrink: 0;
}
.hero-badge-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--palette-charcoal-mid);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  overflow-wrap: break-word;
}
.hero-badge-label span {
  color: var(--palette-charcoal);
  font-size: 0.8125rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}
.hero-badge-stars {
  color: #f5a623;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.hero-badge-quote {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--palette-charcoal);
  margin: 0;
  font-style: italic;
}
.hero-badge-author {
  font-family: var(--font-heading);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--palette-charcoal-mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* HERO RESPONSIVE */
@media (max-width: 768px), (orientation: portrait) and (max-width: 1024px) {
  .hero-split {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-split-content,
  .hero-split-photo {
    min-width: 0;
  }
  .hero-split-cta .btn {
    white-space: normal;
  }
  .hero-split-photo {
    height: 68vw;
    min-height: 300px;
    order: -1;
  }
  .hero-badge {
    padding: 0.375rem 0.5rem;
    border-radius: 10px;
    gap: 0.375rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.16);
  }
  .hero-badge--companies {
    top: 0.5rem;
    left: 0.5rem;
    max-width: 172px;
  }
  .hero-badge--companies .hero-badge-icon {
    display: none;
  }
  .hero-badge--quote {
    top: 2.75rem;
    bottom: auto;
    right: 0.5rem;
    max-width: 92px;
    gap: 0.1875rem;
  }
  .hero-badge--nps {
    bottom: -0.75rem;
    left: 0.5rem;
    max-width: 126px;
  }
  .hero-badge-score {
    font-size: 1rem;
  }
  .hero-badge-icon {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.625rem;
  }
  .hero-badge-label {
    font-size: 0.5rem;
    line-height: 1.2;
  }
  .hero-badge-label span {
    font-size: 0.5625rem;
  }
  .hero-badge-stars {
    font-size: 0.5rem;
  }
  .hero-badge-quote {
    font-size: 0.5625rem;
    line-height: 1.25;
  }
  .hero-badge-author {
    font-size: 0.4375rem;
  }
}

/* SECTIONS */

.section {
  padding: clamp(3rem, 7vw, 6rem) 0;
}
.section-soft {
  background: var(--color-bg-soft);
}
.section-cta {
  text-align: center;
  padding: clamp(4rem, 8vw, 7rem) 0;
  background: var(--color-bg-soft);
}
.section-title {
  text-align: center;
  margin-bottom: var(--space-lg);
}
.section-lede {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto var(--space-xl);
  color: var(--color-text-muted);
  font-size: 1.0625rem;
}

/* ACCESSIBILITY */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip-link:focus {
  left: 0;
  background: var(--color-bg);
  padding: 0.5rem 1rem;
  z-index: 100;
}
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* RESPONSIVE */

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .burger-menu { display: flex; }
  .nav-right {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    min-width: 220px;
  }
  .nav-right.open { display: flex; }
  .hero { padding: var(--space-xl) 0; }
  .section { padding: var(--space-lg) 0; }
}

/* TESTIMONIALS: auto-scrolling banner, pausable, always draggable */
.testi-scroller-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: var(--space-lg);
}
.testi-pause-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--palette-charcoal-mid);
  background: var(--color-bg);
  border: 1px solid var(--palette-sage-border);
  border-radius: 999px;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.testi-pause-btn:hover { color: var(--palette-charcoal); border-color: var(--palette-sage); }
.testi-pause-icon { font-size: 0.55rem; }

.testi-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  margin: 0 calc(var(--space-md) * -1);
  padding: 0.25rem var(--space-md) 0.75rem;
  -webkit-mask-image: linear-gradient(to right, transparent 0, black 80px, black calc(100% - 80px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, black 80px, black calc(100% - 80px), transparent 100%);
}
.testi-scroller::-webkit-scrollbar { display: none; }
.testi-scroller:active { cursor: grabbing; }

.testi-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: testi-scroll 90s linear infinite;
}
.testi-track.is-paused {
  animation-play-state: paused;
}
.testi-track .testi-card {
  flex: 0 0 380px;
  width: 380px;
}

@keyframes testi-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .testi-track { animation: none; }
}

@media (max-width: 768px) {
  .testi-scroller-head { margin-bottom: var(--space-md); }
  .testi-track .testi-card {
    flex: 0 0 82vw;
    width: 82vw;
  }
  .testi-scroller {
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 48px, black calc(100% - 48px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, black 48px, black calc(100% - 48px), transparent 100%);
  }
}
