/* OpiTech — light, airy design system (Stripe-inspired, teal brand accent) */

:root {
  --ink: #0c1b33;          /* deep navy headings */
  --body: #42526b;         /* body text */
  --muted: #6b7a90;        /* secondary text */
  --teal: #0d9488;         /* brand accent (from logo) */
  --teal-dark: #0f766e;
  --teal-soft: #e6f7f4;    /* soft teal tint */
  --purple: #5b4ba0;
  --bg: #ffffff;
  --bg-alt: #f7f9fc;
  --border: #e5edf5;
  --radius: 10px;
  --radius-lg: 16px;
  --max-width: 1080px;
  --shadow-soft: 0 2px 10px rgba(50, 50, 93, 0.05);
  --shadow-lift: 0 12px 32px -12px rgba(50, 50, 93, 0.18), 0 4px 12px -6px rgba(0, 0, 0, 0.06);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.narrow { max-width: 760px; }

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); text-decoration: underline; }

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header--hero {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.site-header--hero .site-nav a { color: #fff; }
.site-header--hero .site-nav a:hover { color: rgba(255,255,255,0.75); }
.site-header--hero .cta-link { background: #fff; color: var(--ink) !important; }
.site-header--hero .cta-link:hover { background: rgba(255,255,255,0.9); }
.site-header--hero .nav-toggle span { background: #fff; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  position: relative;
  width: 130px;
  height: 60px;
}

.logo {
  position: absolute;
  top: 0;
  left: 0;
  height: 60px;
  width: auto;
  transition: opacity 0.3s ease;
}

.logo--hero { opacity: 0; }
.logo--scrolled { opacity: 1; }

.site-header--hero .logo--hero { opacity: 1; }
.site-header--hero .logo--scrolled { opacity: 0; }

.site-nav { display: flex; align-items: center; gap: 32px; }

.site-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  transition: color 0.2s;
}
.site-nav a:hover { color: var(--teal); text-decoration: none; }

.cta-link {
  padding: 9px 18px;
  background: var(--teal);
  border-radius: 8px;
  color: #fff !important;
  transition: background 0.2s;
}
.cta-link:hover { background: var(--teal-dark); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
}

.hero-stibbe {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 140px 0 100px;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18, 22, 34, 0.86) 0%, rgba(18, 22, 34, 0.62) 50%, rgba(18, 22, 34, 0.30) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  text-align: left;
}

.hero-stibbe h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 5.4rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 28px;
}

.hero-stibbe .lead {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  max-width: 580px;
  margin: 0 0 40px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-hero {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 14px 28px;
  font-size: 0.95rem;
  transition: background 0.2s, border-color 0.2s;
}

.btn-hero:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
}

.btn-hero::after {
  content: "›";
  margin-left: 8px;
  font-size: 1.1em;
  line-height: 1;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--teal-dark); color: #fff; }

.btn-ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--border);
  box-shadow: var(--shadow-soft);
}
.btn-ghost:hover { border-color: #c9d8e8; color: var(--teal); }

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-header { margin-bottom: 48px; }
.section-header.center { text-align: center; }

.section-eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}

.grid { display: grid; gap: 24px; }

.focus-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.focus-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 34px;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.focus-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: #d7e3f0;
}

.focus-visual {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
  margin-bottom: 24px;
}

.focus-visual svg { width: 28px; height: 28px; }

.focus-card h3 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 10px;
}

.focus-card p { color: var(--muted); margin: 0; font-size: 1rem; }

/* ---------- Services ---------- */

.services-list { display: flex; flex-direction: column; gap: 20px; }

.service-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: start;
  padding: 30px 32px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s, transform 0.2s;
}

.service-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }

.service-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, white);
  flex-shrink: 0;
}

.service-body h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin: 4px 0 6px;
}

.service-body p { margin: 0; color: var(--muted); }

p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }

/* ---------- Partners ---------- */

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}

.partner-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.partner-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
  border-color: #d7e3f0;
}

.partner-card img {
  display: block;
  height: 26px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.55;
  transition: filter 0.25s, opacity 0.25s;
}

.partner-card:hover img {
  filter: grayscale(0);
  opacity: 1;
}

/* ---------- About / Compliance ---------- */

.about-text {
  max-width: 720px;
  margin: 0 0 34px;
}

.partners-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}

.partners-grid {
  margin: 8px 0 0;
}

.legal-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  gap: 12px;
}

.legal-list li {
  padding: 14px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.legal-list strong { color: var(--ink); }

.compliance-links { text-align: center; margin-top: 8px; }

.compliance-compact { padding: 64px 0; }

.legal-line {
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 10px;
}

/* ---------- CTA ---------- */

.section-cta {
  background: linear-gradient(180deg, #fff 0%, var(--teal-soft) 100%);
  text-align: left;
}

.section-cta .section-title { color: var(--ink); }

.section-cta p { color: var(--muted); }

.contact-form {
  max-width: 540px;
  margin: 32px 0 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field { display: flex; flex-direction: column; gap: 6px; }

.form-field label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.form-field textarea { resize: vertical; min-height: 120px; }

.contact-form .btn-primary {
  align-self: flex-start;
  padding: 13px 28px;
}

.form-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 8px;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.site-footer .small {
  font-size: 0.78rem;
  max-width: 640px;
  margin: 12px auto 0;
}

.site-footer .legal-line {
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---------- Cookie consent ---------- */

.cookie-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 27, 51, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 220;
}

.cookie-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translate(-50%, 140%);
  width: min(680px, calc(100% - 32px));
  background: #fff;
  color: var(--body);
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  transition: transform 0.35s ease;
  z-index: 210;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  font-size: 0.92rem;
}

.cookie-banner.show { transform: translate(-50%, 0); }

.cookie-banner p { margin: 0; }

.cookie-banner__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-banner .btn { padding: 9px 18px; font-size: 0.88rem; }

.cookie-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  width: min(640px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(12, 27, 51, 0.22);
  z-index: 230;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cookie-modal.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}

.cookie-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--border);
}

.cookie-modal__header h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink);
  margin: 0;
}

.cookie-modal__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.cookie-modal__close:hover { color: var(--ink); background: var(--bg-alt); }

.cookie-modal__close svg { width: 22px; height: 22px; }

.cookie-tabs {
  display: flex;
  gap: 4px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
}

.cookie-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 0 10px;
  margin-bottom: -1px;
  margin-right: 24px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.cookie-tab:hover { color: var(--ink); }

.cookie-tab.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.cookie-modal__body {
  padding: 24px 28px;
  overflow-y: auto;
}

.cookie-panel { display: none; }

.cookie-panel.active { display: block; }

.cookie-intro {
  font-size: 0.95rem;
  color: var(--body);
  margin: 0 0 12px;
  line-height: 1.6;
}

.cookie-learn {
  display: inline-block;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 22px;
}

.cookie-learn:hover { color: var(--teal); }

.cookie-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.cookie-actions .btn,
.cookie-modal__footer .btn {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.cookie-actions .btn:hover,
.cookie-modal__footer .btn:hover {
  background: #1a2d4d;
  border-color: #1a2d4d;
  color: #fff;
}

.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cookie-category {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cookie-category summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  background: #fff;
  transition: background 0.2s;
}

.cookie-category summary::-webkit-details-marker { display: none; }

.cookie-category summary:hover { background: var(--bg-alt); }

.category-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 1rem;
}

.category-status {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.category-body {
  padding: 0 20px 18px;
  font-size: 0.92rem;
  color: var(--body);
  line-height: 1.6;
}

.category-body p { margin: 0; }

/* Toggle switch */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-track {
  width: 44px;
  height: 24px;
  background: #d1d9e0;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: transform 0.2s;
}

.toggle input:checked + .toggle-track { background: var(--teal); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(20px); }

.toggle input:focus-visible + .toggle-track { box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25); }

.toggle input:disabled + .toggle-track { opacity: 0.6; }

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.cookie-table th,
.cookie-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.cookie-table th {
  font-weight: 600;
  color: var(--ink);
  background: var(--bg-alt);
}

.cookie-table td { color: var(--body); }

.cookie-table code {
  font-size: 0.84rem;
  background: var(--bg-alt);
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--ink);
}

.cookie-modal__footer {
  display: flex;
  justify-content: flex-end;
  padding: 18px 28px;
  border-top: 1px solid var(--border);
}

.footer-links a { margin: 0 4px; }

.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;
}

/* ---------- Privacy page typography ---------- */

main h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 16px;
}

main h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  margin: 36px 0 10px;
}

main p { color: var(--body); }

/* ---------- Reveal animation ---------- */

/* Disabled: content must be visible even if JS fails or observers do not fire. */
[data-reveal] {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 24px 24px;
    border-bottom: 1px solid var(--border);
    display: none;
    box-shadow: var(--shadow-lift);
  }

  .site-nav.open { display: flex; }

  .site-nav a { padding: 13px 0; width: 100%; }

  .cta-link { padding: 13px 0; width: 100%; text-align: center; box-sizing: border-box; }

  .hero-stibbe { padding: 120px 0 80px; min-height: 90vh; }
  .hero-stibbe h1 { font-size: clamp(2.4rem, 10vw, 3.4rem); }
  .hero-overlay { background: linear-gradient(90deg, rgba(18, 22, 34, 0.88) 0%, rgba(18, 22, 34, 0.70) 100%); }

  .section { padding: 64px 0; }

  .focus-grid { grid-template-columns: 1fr; }

  .service-item { grid-template-columns: 1fr; gap: 16px; }
}
