/*
 * Custom stylesheet for the TORII Consulting landing page (2026 revision with animations).
 * Inspired by the v2 design provided by the client. This file centralises
 * variables for colours, spacing and sizing, and defines reusable
 * component classes such as cards, grids, and carousels. It also includes
 * responsive breakpoints and simple reveal animations via the Intersection
 * Observer API (see script.js).
 */

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

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7f8;
  --bg-mid: #eceff1;
  --card-bg: rgba(255,255,255,.92);
  --text: #141414;
  --muted: #5f6770;
  --line: rgba(20,20,20,.10);
  --brand: #ea2433;
  --brand-dark: #c51628;
  --shadow: 0 20px 60px rgba(20,20,20,.10);
  --radius: 24px;
  --header-h: 84px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 34%, #eef1f3 100%);
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4, p {
  margin: 0;
}

.container {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

.section {
  padding: 96px 0;
  position: relative;
  /* Offset anchor scrolling to account for the fixed header */
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.section-alt {
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(237,241,243,.9));
  border-top: 1px solid rgba(20,20,20,.05);
  border-bottom: 1px solid rgba(20,20,20,.05);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .74rem;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 36px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
}

h1 {
  font-size: clamp(2.7rem, 6vw, 5.5rem);
  line-height: .95;
  letter-spacing: -.05em;
  max-width: 900px;
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: -.03em;
  margin-bottom: 18px;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.2;
  margin-bottom: 10px;
}

.lead {
  font-size: clamp(1.04rem, 1.8vw, 1.2rem);
  color: var(--muted);
  max-width: 760px;
}

.muted {
  color: var(--muted);
}

.section-header {
  max-width: 760px;
  margin-bottom: 48px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.06fr .94fr;
  gap: 34px;
  align-items: center;
}

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

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(247,248,249,.86));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

/* Header styles */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: background .3s ease, box-shadow .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(16px);
  border-color: rgba(20,20,20,.08);
  box-shadow: 0 12px 40px rgba(20,20,20,.06);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  height: 44px;
  width: auto;
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.nav a {
  color: #353b43;
  font-size: .96rem;
  font-weight: 600;
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .22s ease;
  background: var(--brand);
  border-radius: 999px;
}

.nav a:hover::after,
.nav a.active::after {
  transform: scaleX(1);
}

.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), #f04863);
  color: white;
  box-shadow: 0 16px 32px rgba(215, 25, 56, .22);
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.5);
  transition: transform .2s ease, box-shadow .2s ease;
  white-space: nowrap;
}

.wa-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(215, 25, 56, .28);
}

.wa-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.8);
  width: 46px;
  height: 46px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: #23262a;
  border-radius: 999px;
  position: relative;
  transition: .25s ease;
}

.menu-toggle span::before { position: absolute; top: -6px; }
.menu-toggle span::after { position: absolute; top: 6px; }

/* Hero */
.hero {
  min-height: 100svh;
  position: relative;
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  
}

.hero-bg {
  position: absolute;
  inset: 0;
  /* Use the supplied hero image as the background */
  background: url('../images/hero.jpg') center center / cover no-repeat;
	background-size: 105%;
  transform: scale(1.04);
  z-index: -2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 30px;
  width: 100%;
  align-items: end;
  padding-top: calc(var(--header-h) + 48px);
  padding-bottom: 52px;
}

.hero-copy {
  padding: 44px 0;
  transform: translateY(-80px);

}

.hero-copy p {
  margin-top: 280px;
  margin-bottom: 30px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform .22s ease, background .22s ease, border-color .22s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--brand), #f04863);
  box-shadow: 0 16px 32px rgba(215,25,56,.2);
}

.btn-secondary {
  color: #20242a;
  background: rgba(255,255,255,.66);
  border-color: rgba(20,20,20,.10);
  backdrop-filter: blur(10px);
}

.hero-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #525b64;
  font-weight: 600;
  font-size: .95rem;
}

.hero-note::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 0 0 8px rgba(234,36,51,.12);
}

.hero-panel {
  margin-left: auto;
  width: min(100%, 410px);
  padding: 26px;
}

.hero-panel .logo-box {
  width: 110px;
  margin-bottom: 18px;
}

.hero-panel p {
  color: var(--muted);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.stat {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(244,246,248,.9));
  border: 1px solid rgba(20,20,20,.08);
}

.stat strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1;
  margin-bottom: 8px;
}

/* About section */
.about-layout {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 30px;
  align-items: start;
}

.about-side {
  padding: 26px;
  position: sticky;
  top: 108px;
}

.portrait {
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 18px;
  aspect-ratio: 4 / 4.6;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.role {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(234,36,51,.08);
  color: var(--brand);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .02em;
  margin-bottom: 12px;
}

.flag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.flag-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(243,245,247,.88));
  border: 1px solid rgba(20,20,20,.08);
  font-size: 1.4rem;
  box-shadow: 0 10px 24px rgba(20,20,20,.06);
}

.about-copy {
  display: grid;
  gap: 20px;
}

.split-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.value-card {
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(242,245,247,.88));
  border: 1px solid rgba(20,20,20,.08);
  box-shadow: 0 14px 36px rgba(20,20,20,.06);
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.service-card {
  padding: 26px;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

.service-card::after {
  content: "";
  position: absolute;
  inset: auto auto -50px -30px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(234,36,51,.08), transparent 70%);
  pointer-events: none;
}

.service-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(234,36,51,.08);
  color: var(--brand);
  font-weight: 800;
  margin-bottom: 18px;
}

/* Clients logos carousel */

.logo-carousel {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  margin-bottom: 34px;
}

.logo-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee 24s linear infinite;
}

.logo-carousel:hover .logo-track {
  animation-play-state: paused;
}

.logo-item {
  min-width: 180px;
  height: 92px;
  padding: 0 24px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #202020;
  background: #fff;
  border: 1px solid rgba(20,20,20,.08);
  box-shadow: 0 12px 28px rgba(20,20,20,.05);
}

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

/* Projects carousel */
.projects-wrap {
  display: grid;
  gap: 18px;
  margin-top: 16px;
}

.projects-text {
  max-width: 760px;
  margin-bottom: 10px;
}

.project-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(20,20,20,.08);
  box-shadow: var(--shadow);
  background: #fff;
}

.project-track {
  display: flex;
  transition: transform .5s ease;
  touch-action: pan-y;
}

.project-slide {
  min-width: 100%;
  position: relative;
  aspect-ratio: 16 / 8.5;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #eef1f3);
}

.project-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(20,20,20,.08);
  box-shadow: 0 14px 34px rgba(20,20,20,.08);
}

.project-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(20,20,20,.16);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.dot.active {
  background: var(--brand);
  transform: scale(1.15);
}

.arrow-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(20,20,20,.10);
  background: rgba(255,255,255,.92);
  cursor: pointer;
  font-size: 1.2rem;
  box-shadow: 0 10px 24px rgba(20,20,20,.06);
}

.controls-group {
  display: flex;
  gap: 10px;
}

/* Contact */
.contact-card {
  padding: 34px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 28px;
  align-items: center;
}

.contact-info {
  display: grid;
  gap: 14px;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #f4f4f4;
  border: 1px solid rgba(20,20,20,.08);
  font-weight: 600;
  width: fit-content;
}

/* Footer */
footer {
  padding: 28px 0 46px;
  background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(239,242,244,.9));
}

.footer-inner {
  border-top: 1px solid rgba(20,20,20,.08);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
}

.footer-logo {
  height: 36px;
  width: auto;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Media queries */
@media (max-width: 1080px) {
  .hero-grid,
  .about-layout,
  .contact-card,
  .services-grid {
    grid-template-columns: 1fr;
  }
  .about-side {
    position: static;
  }
  .hero-panel {
    margin-left: 0;
  }
  .split-text,
  .value-grid {
    grid-template-columns: 1fr;
  }
  .project-slide {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 840px) {

  .menu-toggle {

    display: inline-flex;

  }

  .nav-wrap {

    position: fixed;

    top: calc(var(--header-h) - 2px);

    left: 16px;

    right: 16px;

    background: rgba(255,255,255,.96);

    backdrop-filter: blur(16px);

    border: 1px solid rgba(20,20,20,.08);

    border-radius: 24px;

    padding: 18px;

    box-shadow: 0 24px 50px rgba(20,20,20,.12);

    flex-direction: column;

    align-items: stretch;

    opacity: 0;

    pointer-events: none;

    transform: translateY(-10px);

    transition: .25s ease;

  }

  .nav-wrap.open {

    opacity: 1;

    pointer-events: auto;

    transform: translateY(0);

  }

  .nav {

    flex-direction: column;

    align-items: flex-start;

    gap: 14px;

  }

  .nav a {

    font-size: 1rem;

  }

  .wa-btn {

    justify-content: center;

  }

  .hero {

    min-height: 100svh;

  }

  .hero-bg {

    background-size: cover;

    background-position: center center;

  }

  .hero-grid {

    padding-top: calc(var(--header-h) + 36px);

  }

  .grid-3,

  .value-grid {

    grid-template-columns: 1fr;

  }

  .logo-item {

    min-width: 150px;

    height: 78px;

  }

}

@media (max-width: 640px) {

  .section {

    padding: 72px 0;

  }

  .hero {

    min-height: 100svh;

  }

  .hero-bg {

    background-size: cover;

    background-position: center center;

  }

  .hero-copy {

    padding: 18px 0;

  }

  .hero-actions,

  .project-controls,

  .footer-inner {

    align-items: stretch;

  }

  .hero-actions .btn,

  .hero-actions .wa-btn,

  .controls-group,

  .contact-pill,

  .btn,

  .wa-btn {

    width: 100%;

  }

  .hero-stats {

    grid-template-columns: 1fr;

  }

  .service-card,

  .contact-card,

  .about-side {

    padding: 22px;

  }

  .project-slide {

    aspect-ratio: 4 / 3.4;

  }

  .project-caption {

    left: 14px;

    right: 14px;

    bottom: 14px;

    padding: 14px;

  }

  .arrow-btn {

    width: 44px;

    height: 44px;

  }

}