/* Twiport — Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --brand-blue: #0094EF;
  --accent-blue: #11A4FF;
  --brand-blue-dark: #0078C8;
  --heading-navy: #0e1b4d;
  --text-body: #2f3138;
  --text-muted: #5a5d6a;
  --bg-white: #ffffff;
  --bg-soft: #f4f8fc;
  --bg-soft-blue: #e8f4fd;
  --wave-purple: #c4b5fd;
  --border: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(14, 27, 77, 0.06);
  --shadow-md: 0 8px 30px rgba(14, 27, 77, 0.08);
  --shadow-lg: 0 20px 50px rgba(14, 27, 77, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --max-width: 1200px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text-body);
  background: var(--bg-white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-blue-dark); }

h1, h2, h3, h4, h5, h6 {
  color: var(--heading-navy);
  font-weight: 700;
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }

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

.section { padding: 96px 0; position: relative; }
.section--soft { background: var(--bg-soft); }
.section--blue { background: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 100%); }

.section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 12px;
}

.section__title { margin-bottom: 16px; }

.section__desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin-bottom: 48px;
}

.section__desc--center { margin-left: auto; margin-right: auto; text-align: center; }
.text-center { text-align: center; }

.wave-bg { position: absolute; pointer-events: none; opacity: 0.35; z-index: 0; }
.wave-bg--left { left: 0; top: 0; width: 280px; }
.wave-bg--right { right: 0; bottom: 0; width: 320px; }
.section > .container { position: relative; z-index: 1; }

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}

.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo { display: flex; align-items: center; font-size: 1.5rem; font-weight: 600; color: var(--brand-blue); }
.logo img { height: 36px; width: auto; }
.logo:hover { color: var(--brand-blue); }

.nav { display: flex; align-items: center; gap: 8px; }
.nav__list { display: flex; align-items: center; gap: 4px; list-style: none; }

.nav__link {
  display: block;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--heading-navy);
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
}
.nav__link:hover, .nav__link.active { color: var(--brand-blue); background: var(--bg-soft-blue); }

.nav__dropdown { position: relative; }

.nav__accordion-input { display: none; }

.nav__dropdown-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font);
  text-align: left;
  user-select: none;
}

.nav__chevron {
  display: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--transition);
  flex-shrink: 0;
}

.nav__accordion-input:checked ~ .nav__dropdown-toggle .nav__chevron {
  transform: rotate(-135deg);
}

.nav__dropdown-menu {
  position: absolute;
  top: 100%; left: 0;
  min-width: 280px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  list-style: none;
}
@media (min-width: 769px) {
  .nav__dropdown:hover .nav__dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav__dropdown-toggle { pointer-events: none; }
  .nav__dropdown-menu { pointer-events: auto; }
}
.nav__dropdown-menu a { display: block; padding: 10px 14px; font-size: 0.875rem; color: var(--text-body); border-radius: 8px; }
.nav__dropdown-menu a:hover { background: var(--bg-soft); color: var(--brand-blue); }

.nav__toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: var(--heading-navy); margin: 5px 0; transition: var(--transition); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: var(--font);
}

.btn--primary { background: var(--brand-blue); color: white; border-color: var(--brand-blue); }
.btn--primary:hover { background: var(--brand-blue-dark); border-color: var(--brand-blue-dark); color: white; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0, 148, 239, 0.35); }
.btn--outline { background: transparent; color: var(--heading-navy); border-color: var(--border); }
.btn--outline:hover { border-color: var(--brand-blue); color: var(--brand-blue); background: var(--bg-soft-blue); }
.btn--white { background: white; color: var(--brand-blue); border-color: white; }
.btn--white:hover { background: var(--bg-soft); color: var(--brand-blue-dark); }
.btn--sm { padding: 8px 20px; font-size: 0.85rem; }
.btn-group { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn-group--left { justify-content: flex-start; }

.hero { padding: 160px 0 100px; background: linear-gradient(180deg, #f8fbff 0%, #ffffff 60%); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero__tagline { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-blue); margin-bottom: 16px; }
.hero__title { margin-bottom: 20px; }
.hero__subtitle { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 32px; line-height: 1.7; }
.hero__visual { position: relative; min-height: 420px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat-card { text-align: center; padding: 32px 20px; background: white; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform var(--transition), box-shadow var(--transition); }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.stat-card__number { font-size: 2.5rem; font-weight: 700; color: var(--brand-blue); line-height: 1; margin-bottom: 8px; }
.stat-card__label { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }

.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.card { background: white; border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 32px; transition: all var(--transition); display: flex; flex-direction: column; }
.card:hover { border-color: var(--brand-blue); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.card__icon { width: 48px; height: 48px; background: var(--bg-soft-blue); border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; font-size: 1.4rem; }
.card__title { margin-bottom: 12px; }
.card__text { color: var(--text-muted); font-size: 0.95rem; flex: 1; margin-bottom: 20px; }
.card__link { font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 6px; }
.card__link::after { content: '→'; transition: transform var(--transition); }
.card:hover .card__link::after { transform: translateX(4px); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature-item { display: flex; align-items: flex-start; gap: 12px; padding: 16px; background: white; border-radius: var(--radius); border: 1px solid var(--border); }
.feature-item__check { flex-shrink: 0; width: 22px; height: 22px; background: var(--brand-blue); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; margin-top: 2px; }
.feature-item__text { font-size: 0.9rem; font-weight: 500; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split--reverse .split__content { order: 2; }
.split--reverse .split__visual { order: 1; }

.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.portal-card { padding: 32px; border-radius: var(--radius-lg); border: 2px solid var(--border); }
.portal-card--admin { background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%); border-color: #86efac; }
.portal-card--client { background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%); border-color: #7dd3fc; }
.portal-card__badge { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 50px; margin-bottom: 16px; }
.portal-card--admin .portal-card__badge { background: #166534; color: white; }
.portal-card--client .portal-card__badge { background: var(--brand-blue); color: white; }
.portal-card h3 { margin-bottom: 16px; }
.portal-card ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.portal-card li { font-size: 0.9rem; padding-left: 20px; position: relative; }
.portal-card li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-blue); }

.clients-strip { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: center; }
.client-tag { padding: 10px 20px; background: white; border: 1px solid var(--border); border-radius: 50px; font-size: 0.85rem; font-weight: 600; color: var(--heading-navy); transition: all var(--transition); }
.client-tag:hover { border-color: var(--brand-blue); color: var(--brand-blue); box-shadow: var(--shadow-sm); }
.client-tag--link { text-decoration: none; }
.client-tag--link:hover { color: var(--brand-blue); }

.timeline { position: relative; padding-left: 40px; max-width: 700px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--brand-blue), var(--wave-purple)); }
.timeline__item { position: relative; padding-bottom: 40px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot { position: absolute; left: -40px; top: 4px; width: 24px; height: 24px; background: var(--brand-blue); border: 4px solid white; border-radius: 50%; box-shadow: var(--shadow-sm); }
.timeline__year { font-size: 0.8rem; font-weight: 700; color: var(--brand-blue); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.timeline__title { font-size: 1.1rem; margin-bottom: 6px; }
.timeline__desc { font-size: 0.9rem; color: var(--text-muted); }

.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.why-card { padding: 28px; background: white; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.why-card__num { font-size: 2rem; font-weight: 700; color: var(--bg-soft-blue); -webkit-text-stroke: 1px var(--brand-blue); margin-bottom: 12px; line-height: 1; }

.cta-band { background: linear-gradient(135deg, var(--heading-navy) 0%, #1a3a6e 100%); color: white; padding: 80px 0; text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 50%, rgba(0, 148, 239, 0.2), transparent 60%); }
.cta-band h2 { color: white; margin-bottom: 16px; position: relative; }
.cta-band p { color: rgba(255,255,255,0.8); font-size: 1.1rem; max-width: 600px; margin: 0 auto 32px; position: relative; }
.cta-band .btn-group { position: relative; }

.tech-stack { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.tech-pill { padding: 8px 18px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 50px; font-size: 0.85rem; font-weight: 600; color: var(--heading-navy); }

.page-hero { padding: 140px 0 80px; background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%); text-align: center; }
.page-hero .section__desc { margin-left: auto; margin-right: auto; }

.journey { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 40px 0; }
.journey__step { display: flex; align-items: center; gap: 8px; padding: 12px 20px; background: white; border: 1px solid var(--border); border-radius: 50px; font-size: 0.85rem; font-weight: 600; color: var(--heading-navy); }
.journey__arrow { color: var(--brand-blue); font-weight: 700; }

.footer { background: var(--heading-navy); color: rgba(255,255,255,0.75); padding: 64px 0 32px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer__brand .logo { color: white; margin-bottom: 16px; }
.footer__tagline { font-size: 0.9rem; color: rgba(255,255,255,0.6); margin-bottom: 20px; }
.footer__heading { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: white; margin-bottom: 16px; }
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer__links a { color: rgba(255,255,255,0.65); font-size: 0.9rem; }
.footer__links a:hover { color: var(--accent-blue); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 0.85rem; }

.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.compare-card { padding: 32px; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.compare-card--bad { background: #fef2f2; border-color: #fecaca; }
.compare-card--good { background: #f0fdf4; border-color: #86efac; }
.compare-card h3 { margin-bottom: 16px; font-size: 1.1rem; }
.compare-card ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.compare-card li { font-size: 0.9rem; padding-left: 24px; position: relative; }
.compare-card--bad li::before { content: '✕'; position: absolute; left: 0; color: #ef4444; font-weight: 700; }
.compare-card--good li::before { content: '✓'; position: absolute; left: 0; color: #16a34a; font-weight: 700; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-card { padding: 32px; background: white; border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.contact-card h3 { margin-bottom: 20px; }
.contact-item { display: flex; gap: 16px; margin-bottom: 20px; align-items: flex-start; }
.contact-item__icon { width: 40px; height: 40px; background: var(--bg-soft-blue); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.1rem; }
.contact-item__label { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 2px; }
.contact-item__value { font-weight: 600; color: var(--heading-navy); }
.contact-item__value a { color: inherit; }
.contact-item__value a:hover { color: var(--brand-blue); }

.case-study { padding: 32px; background: white; border-radius: var(--radius-lg); border: 1px solid var(--border); height: 100%; display: flex; flex-direction: column; }
.case-study__sector { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--brand-blue); margin-bottom: 12px; }
.case-study h3 { margin-bottom: 12px; }
.case-study p { color: var(--text-muted); font-size: 0.95rem; flex: 1; margin-bottom: 20px; }

@media (max-width: 1024px) {
  .hero__grid, .split, .portal-grid, .compare-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero__visual { min-height: 320px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .split--reverse .split__content, .split--reverse .split__visual { order: unset; }
}

@media (max-width: 768px) {
  .btn--sm { font-size: 0.6rem; }
  .nav { position: relative; }
  .section { padding: 64px 0; }
  .hero { padding: 120px 0 64px; }
  .nav__list {
    display: none;
    position: fixed;
    top: 72px;
    left: 10vw;
    width: 80vw;
    right: auto;
    background: white;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }
  .nav__list.open { display: flex; }
  .nav__list > li { width: 100%; }
  .nav__link { width: 100%; }
  .nav__toggle { display: block; }
  .nav__chevron { display: inline-block; }
  .nav__dropdown-menu {
    position: static;
    opacity: 0;
    visibility: hidden;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 12px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease, visibility 0.25s ease;
    list-style: none;
  }
  .nav__accordion-input:checked ~ .nav__dropdown-menu {
    max-height: 280px;
    opacity: 1;
    visibility: visible;
    padding-top: 4px;
    padding-bottom: 8px;
  }
  .nav__dropdown-menu a {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stats-grid > * { min-width: 0; }
  .stat-card { padding: 16px 10px; }
  .stat-card__number { font-size: 1.4rem; }
  .stat-card__label { font-size: 0.7rem; line-height: 1.35; }
  .footer__grid { grid-template-columns: 1fr; }
  .journey { flex-direction: column; }
  .journey__arrow { transform: rotate(90deg); }
}
