/* ============================================
   TWY MARKETING — Styles
   Inspired by Otoro Digital visual language
   ============================================ */

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

:root {
  --coral:       #c0392b;
  --coral-light: #e8604c;
  --navy:        #1a2744;
  --navy-mid:    #263660;
  --off-white:   #f8f7f4;
  --white:       #ffffff;
  --text-body:   #3d3d3d;
  --text-muted:  #7a7a7a;
  --border:      #dde3ef;
  --blue-tint:   #e8f0fb;
  --tan:         #D4B48C;
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Inter', system-ui, sans-serif;
  --max-w:       1160px;
  --section-pad: 96px 24px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

body {
  font-family: var(--font-sans);
  background-color: var(--off-white);
  color: var(--text-body);
  font-size: 16px;
  line-height: 1.6;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 50px;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--coral);
  color: var(--white);
  padding: 14px 32px;
}

.btn-primary:hover {
  background: var(--coral-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(192, 57, 43, 0.3);
}

/* ---- FOCUS STATES ---- */
.btn:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}
.hamburger:focus-visible,
.mobile-menu-close:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

/* ---- NAVIGATION ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--coral);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
}

.brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
  color: var(--navy);
}

.brand-logo-nav {
  height: 44px;
}

.brand-logo-footer {
  height: 50px;
}

.nav-links a.active {
  color: var(--coral);
}

.nav-right {
  display: flex;
  align-items: center;
}

/* ---- PAGE HEADER ---- */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 64px 24px;
  text-align: center;
}

.page-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
}

.page-header p {
  font-size: 16px;
  color: rgba(255,255,255,0.72);
}

/* ---- PAGE CTA ---- */
.page-cta {
  background: var(--navy);
  padding: 80px 24px;
  text-align: center;
}

.page-cta-inner {
  max-width: 600px;
  margin: 0 auto;
}

.page-cta h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
}

.page-cta p {
  font-size: 15px;
  color: rgba(255,255,255,0.72);
  margin-bottom: 32px;
}

/* ---- FOOTER LOGO AS LINK ---- */
.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}

/* ---- SECTION SHARED ---- */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--section-pad);
}

/* ---- HERO ---- */
.hero {
  background: var(--off-white);
  overflow: hidden;
}

.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 88px 24px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero-text h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 24px;
  text-wrap: balance;
}

.hero-text p {
  font-size: 15px;
  color: var(--text-body);
  max-width: 440px;
  margin-bottom: 36px;
  line-height: 1.75;
}

.hero-illustration svg {
  width: 100%;
  height: auto;
  max-height: 440px;
}

/* ---- TESTIMONIALS ---- */
.testimonials {
  background: var(--white);
  padding: 0;
}

.testimonials .section-inner {
  padding-top: 80px;
  padding-bottom: 80px;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.testimonial-card {
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px 28px;
  position: relative;
  background: var(--white);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.testimonial-avatar {
  position: absolute;
  top: -32px;
  left: 28px;
}

.avatar-circle,
.avatar-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--coral);
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: cover;
  border: 3px solid var(--white);
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  overflow: hidden;
}

.avatar-logo {
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 700;
  color: var(--white);
  text-align: center;
  line-height: 1.3;
  padding: 6px;
}

.testimonial-quote {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.75;
  margin-top: 28px;
  font-style: italic;
}

.testimonial-attr {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
}

.attr-name {
  font-size: 13px;
  color: var(--text-muted);
}

.attr-company {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

/* ---- SERVICES ---- */
.services {
  background: var(--off-white);
}

.services .section-inner {
  display: flex;
  flex-direction: column;
  gap: 80px;
  padding-top: 80px;
  padding-bottom: 80px;
}

.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
}

.service-block--reverse {
  direction: rtl;
}

.service-block--reverse > * {
  direction: ltr;
}

.service-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--coral);
  text-transform: none;
  margin-bottom: 12px;
}

.service-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 20px;
}

.service-text p {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 16px;
  max-width: 480px;
}

.service-illustration svg {
  width: 100%;
  height: auto;
}

/* ---- SUPERPOWER / ABOUT ---- */
.superpower {
  background: var(--white);
}

.superpower-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}

.superpower-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 24px;
}

.superpower-text p {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 18px;
  max-width: 520px;
  text-align: center;
}

.superpower-cta-text {
  text-align: center;
  margin-bottom: 24px !important;
}

.superpower-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.superpower-text .service-label {
  align-self: center;
}

.superpower-illustration svg {
  width: 100%;
  height: auto;
}

/* ---- CONTACT ---- */
.contact {
  background: var(--navy);
  color: var(--white);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 64px;
}

.contact-label {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.contact-text h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 20px;
  text-wrap: balance;
}

.contact-text p {
  font-size: 15px;
  color: rgba(255,255,255,0.72);
  line-height: 1.8;
  max-width: 400px;
}

/* ---- FORM ---- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
}

.required {
  color: rgba(255,255,255,0.45);
  font-weight: 400;
}

.form-group input,
.form-group textarea {
  background: var(--white);
  border: none;
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--navy);
  outline: none;
  transition: box-shadow 0.2s;
  width: 100%;
}

.form-group input:focus-visible,
.form-group textarea:focus-visible {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.35);
}

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

.select-wrap {
  position: relative;
}

.select-wrap select {
  width: 100%;
  background: var(--white);
  border: none;
  border-radius: 6px;
  padding: 12px 40px 12px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--navy);
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.select-wrap select:focus-visible {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.35);
}

.select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--navy);
  pointer-events: none;
  line-height: 1;
}

.form-success {
  font-size: 14px;
  font-weight: 600;
  color: #5dde8e;
  padding: 10px 0;
}

.form-error {
  font-size: 14px;
  font-weight: 600;
  color: #c0392b;
  padding: 10px 0;
}

/* ---- FORM NEXT STEPS ---- */
.form-next-steps {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.next-steps-title {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.next-step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}
.next-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--coral);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- FOOTER ---- */
.footer {
  background: #f0eeea;
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  gap: 28px;
  margin-top: 4px;
}

.footer-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--coral);
}

.footer-socials {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(26, 35, 77, 0.08);
  color: var(--navy);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.footer-social-link:hover {
  background: var(--coral);
  color: #fff;
  transform: translateY(-2px);
}

.footer-copy {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ---- PAGE TRANSITIONS ---- */
body {
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}
body.page-loaded {
  opacity: 1;
  transform: translateY(0);
}
body.page-leaving {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease-in, transform 0.15s ease-in;
}

/* ---- SCROLL ANIMATIONS ---- */
.animate {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate.visible {
  opacity: 1;
  transform: translateY(0);
}
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }

/* ---- BUTTONS (extended) ---- */
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
  padding: 12px 30px;
}

.btn-client-login {
  background: var(--navy);
  color: var(--white);
  border: 1.5px solid var(--navy);
  padding: 10px 20px;
  font-size: 12px;
  margin-right: 8px;
  transition: background 0.2s, box-shadow 0.2s;
}
.btn-client-login:hover {
  background: var(--navy-mid);
  border-color: var(--navy-mid);
  box-shadow: 0 4px 14px rgba(26,39,68,0.22);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 39, 68, 0.2);
}

/* ---- HAMBURGER ---- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 200;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ---- MOBILE MENU ---- */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 39, 68, 0.55);
  z-index: 300;
  backdrop-filter: blur(3px);
}
.mobile-menu.open {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}
.mobile-menu-panel {
  background: var(--white);
  width: min(320px, 85vw);
  height: 100%;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  box-shadow: -4px 0 32px rgba(0,0,0,0.15);
  animation: slideIn 0.26s ease;
  overscroll-behavior: contain;
}
@keyframes slideIn {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.mobile-menu-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 22px;
  color: var(--navy);
  cursor: pointer;
  line-height: 1;
}
.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mobile-nav-links li a {
  display: block;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-nav-links li a:hover,
.mobile-nav-links li a.active {
  color: var(--coral);
}
body.menu-open {
  overflow: hidden;
}

/* ---- HOME: STATS STRIP ---- */
.stats {
  background: #0f1f3d;
  padding: 40px 24px;
}
.stats-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
  text-align: center;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
}
.stat-number {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.stat-number--text {
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  letter-spacing: -0.5px;
}
.stat-suffix {
  font-family: var(--font-serif);
  font-size: 0.58em;
  color: var(--coral);
}
.stat-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: #a0aec0;
  text-transform: uppercase;
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,0.15);
}

/* ---- HOME: SERVICES SNAPSHOT ---- */
.home-services {
  background: var(--off-white);
}
.home-section-header {
  text-align: center;
  margin-bottom: 52px;
}
.home-section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--navy);
  margin-top: 8px;
  text-wrap: balance;
}
.home-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}
.home-service-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.home-service-card:hover {
  box-shadow: 0 8px 32px rgba(26,39,68,0.1);
  transform: translateY(-4px);
}
.home-service-icon {
  width: 48px;
  height: 48px;
  background: var(--blue-tint);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-service-icon svg {
  width: 24px;
  height: 24px;
}
.home-service-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
}
.home-service-card p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.7;
  flex: 1;
}
.home-services-cta {
  text-align: center;
}

/* ---- HOME: WHY TWY ---- */
.home-why {
  background: var(--navy);
}
.home-why .home-section-header h2,
.home-why .home-section-header .service-label {
  color: var(--white);
}
.home-why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.why-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.why-icon {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.12);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.why-icon svg {
  width: 26px;
  height: 26px;
}
.why-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
}
.why-card p {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  line-height: 1.75;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 64px 24px;
  }

  .hero-text p {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-illustration {
    order: -1;
  }

  .hero-illustration svg {
    max-height: 300px;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .service-block,
  .service-block--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .superpower-inner {
    grid-template-columns: 1fr;
  }

  .superpower-illustration {
    order: -1;
  }

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .stats-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px 24px;
  }
  .stat-divider {
    display: none;
  }

  .home-services-grid,
  .home-why-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  :root {
    --section-pad: 64px 20px;
  }

  .nav-inner {
    justify-content: space-between;
  }

  .brand-logo-nav {
    height: 36px;
  }

  .btn-primary {
    padding: 12px 22px;
    font-size: 12px;
  }

  .stats-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

/* ---- REDUCED MOTION ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .animate {
    transition: none;
    opacity: 1;
    transform: none;
  }
  body {
    transition: none;
  }
  .home-service-card,
  .btn,
  .nav-links a,
  .footer-social-link,
  .form-group input,
  .form-group textarea,
  .select-wrap select {
    transition: none;
  }
  .mobile-menu-panel {
    animation: none;
  }
  .btn:hover,
  .btn-outline:hover,
  .footer-social-link:hover {
    transform: none;
  }
}
