/* ==========================================================================
   Design Tokens & Variables
   ========================================================================== */

:root {
  --bg: #010403;
  --panel: #0d0e0e;
  --line: #292c2a;
  --text: #f7f7f4;
  --muted: #b1b7b5;
  --mint: #b8e9d0;
  --green: #21b37e;
  --green-glow: rgba(29, 186, 128, 0.22);
  --shell: 1290px;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.shell {
  width: min(var(--shell), calc(100% - 48px));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Shared UI Components
   ========================================================================== */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 0;
  padding: 0 28px;
  background-color: #0a0b0b;
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 32px;
  background-color: #020504;
  color: #ffffff;
  border: 1px solid #176047;
  border-radius: 9999px;
  font-weight: 600;
  box-shadow: 0 0 16px var(--green-glow);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.btn:hover {
  border-color: var(--green);
  box-shadow: 0 0 22px rgba(33, 179, 126, 0.4);
  transform: translateY(-1px);
}

.section {
  padding: 100px 0;
}

.section > h2,
.services > h2,
.projects > h2,
.faq > h2 {
  margin: 24px 0 64px;
  text-align: center;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.3;
  background: linear-gradient(90deg, #92d6b4, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.header {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.75rem;
  font-weight: 700;
}

.logo b,
.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background-color: var(--green);
  color: #001b11;
  border-radius: 6px 14px 6px 14px;
  font-size: 1.2rem;
  font-weight: 800;
}

.header nav {
  display: flex;
  margin-left: auto;
  padding: 0 12px;
  border: 1px solid #4a4e4b;
  border-radius: 9999px;
  backdrop-filter: blur(8px);
}

.header nav a {
  padding: 14px 20px;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.header nav a:hover {
  color: var(--mint);
}

.tools,
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: 48px;
}

.tools > span,
.lang-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px;
  border: 1px solid #4a4e4b;
  border-radius: 9999px;
  font-size: 0.875rem;
}

.tools > span b,
.lang-selector strong {
  padding: 8px 14px;
  background-color: var(--green);
  color: #001b11;
  border-radius: 9999px;
}

.menu,
.menu-toggle {
  display: none;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  position: relative;
  min-height: 940px;
  display: flex;
  align-items: center;
  background: 
    linear-gradient(90deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.15)),
    url('assets/hero-reference.png') center / cover no-repeat;
}

.hero-inner {
  position: relative;
  width: 100%;
  min-height: 640px;
  padding-top: 120px;
}

.team-pill {
  position: absolute;
  top: 10px;
  left: 0;
  width: 330px;
  height: 110px;
  border-radius: 60px;
  overflow: hidden;
  z-index: 2;
}

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

.hero h1 {
  margin: 0;
  font-size: clamp(4rem, 11vw, 8.75rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, #9cddb9, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 span {
  display: block;
}

.hero h1 span:first-child {
  padding-left: 360px;
}

.hero-copy {
  max-width: 520px;
  margin-left: auto;
  margin-top: 24px;
}

.hero-copy p {
  font-size: 1.05rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--text);
}

.hero-copy .btn {
  margin-top: 16px;
}

/* ==========================================================================
   Trusted By Logos
   ========================================================================== */

.trusted {
  padding: 80px 0 110px;
  text-align: center;
}

.logos,
.client-logos {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  margin-top: 60px;
  overflow-x: auto;
  color: #606361;
  font-size: 1.75rem;
  white-space: nowrap;
}

.logos b:nth-child(4) {
  color: #eeeeee;
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 56px;
  padding-bottom: 120px;
}

.about-tag {
  padding-top: 56px;
}

.about-tag i {
  display: block;
  width: 240px;
  height: 200px;
  margin-left: 100px;
  border-left: 1px solid #313431;
  border-bottom: 1px solid #313431;
  border-radius: 0 0 0 100%;
}

.about h2 {
  margin: 40px 0;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1.4;
  font-weight: 600;
}

.about-row {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 32px;
}

.about-row img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 18px;
}

.about-row p,
.service-copy p,
.steps p,
.award-list p,
footer p {
  color: var(--muted);
  font-size: 0.925rem;
  line-height: 1.75;
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services {
  text-align: center;
  background: radial-gradient(circle at 100% 0, rgba(25, 135, 93, 0.25), transparent 35%);
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  text-align: left;
}

.service-grid article {
  overflow: hidden;
  border-radius: 18px;
  background-color: var(--panel);
  border: 1px solid var(--line);
}

.service-copy {
  min-height: 260px;
  padding: 40px;
}

.service-copy i,
.service-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid #21795c;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(38, 188, 132, 0.35);
  font-style: normal;
  font-size: 1.5rem;
  color: var(--mint);
}

.service-copy h3 {
  margin: 28px 0 12px;
  color: var(--mint);
  font-size: 1.75rem;
}

.service-art {
  height: 350px;
  background-repeat: no-repeat;
}

.art-a {
  background-image: url('assets/services-a.png');
  background-size: 200% auto;
}

.art-b {
  background-image: url('assets/services-b.png');
  background-size: 200% auto;
}

.service-art.left { background-position: left bottom; }
.service-art.right { background-position: right bottom; }

/* ==========================================================================
   Process (How We Work)
   ========================================================================== */

.process {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
  align-items: center;
}

.process h2 {
  margin: 24px 0 48px;
  font-size: clamp(2rem, 3.8vw, 2.85rem);
  line-height: 1.4;
  background: linear-gradient(90deg, #9ee0bf, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.steps details {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.steps details:last-child {
  border-bottom: 1px solid var(--line);
}

summary {
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

.steps summary,
.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.35rem;
  font-weight: 600;
}

.steps summary::after,
.faq-list summary::after {
  content: '⌄';
  font-size: 1.25rem;
  transition: transform 0.2s ease;
}

details[open] summary::after {
  transform: rotate(180deg);
}

.process-images {
  position: relative;
  height: 580px;
}

.process-images img {
  position: absolute;
  width: 300px;
  height: 350px;
  object-fit: cover;
  border-radius: 18px;
}

.process-images img:nth-child(1) { top: 0; left: 20px; }
.process-images img:nth-child(2) { top: 115px; left: 185px; }
.process-images img:nth-child(3) { top: 260px; left: 340px; }

/* ==========================================================================
   Stats Section
   ========================================================================== */

.stats {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0 140px;
}

.stats div {
  width: 290px;
  height: 290px;
  margin-left: -6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.stats div:nth-child(even) {
  margin-top: 80px;
  background-color: #101111;
}

.stats strong {
  font-size: 3.85rem;
  line-height: 1;
}

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

/* ==========================================================================
   Featured Projects
   ========================================================================== */

.projects {
  text-align: center;
}

.project-grid {
  width: calc(100% - 48px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: left;
}

.project-image {
  height: 480px;
  border-radius: 18px;
  background-image: url('assets/projects.png');
  background-size: 300% auto;
  background-repeat: no-repeat;
}

.p1 { background-position: left center; }
.p2 { background-position: center center; }
.p3 { background-position: right center; }

.project-grid article > div:nth-child(2) {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}

.project-grid .pill {
  min-height: 36px;
  padding: 0 18px;
}

.project-grid h3 {
  margin: 12px 0 0;
  font-size: 1.35rem;
}

/* ==========================================================================
   Gallery Showcase
   ========================================================================== */

.gallery {
  height: 780px;
  overflow: hidden;
}

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

/* ==========================================================================
   Awards Section
   ========================================================================== */

.awards {
  background-color: #0c0d0d;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.section-head h2 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  background: linear-gradient(90deg, #9ddfbd, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.award-list article {
  display: grid;
  grid-template-columns: 260px 1fr 1.3fr;
  align-items: center;
  gap: 40px;
  min-height: 120px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  text-align: left;
}

.award-list article:last-child {
  border-bottom: 1px solid var(--line);
}

.award-list i {
  color: var(--mint);
  font-size: 2rem;
  font-style: normal;
}

.award-list h3 {
  font-size: 1.6rem;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */

.testimonials {
  background: radial-gradient(circle at 0 100%, rgba(29, 158, 111, 0.3), transparent 35%);
}

.testimonial-card {
  width: min(var(--shell), calc(100% - 48px));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  border-radius: 20px;
  overflow: hidden;
}

.testimonial-card > * {
  min-height: 480px;
  margin: 0;
  padding: 44px;
}

.testimonial-intro {
  background-color: #0d0e0e;
  border-radius: 20px 0 0 20px;
}

.testimonial-intro h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.7rem);
  line-height: 1.35;
  background: linear-gradient(90deg, #9ddfbd, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.arrows {
  margin-top: 96px;
  display: flex;
  gap: 12px;
}

.arrows button {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background-color: #242525;
  color: #ffffff;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.arrows button:hover {
  background-color: var(--green);
}

.testimonial-card blockquote {
  background-color: var(--panel);
  border-left: 1px solid var(--line);
}

.testimonial-card blockquote.active {
  background-color: #ffffff;
  color: #111111;
}

.testimonial-card blockquote.active p {
  color: #111111;
}

.testimonial-card cite {
  display: flex;
  align-items: center;
  gap: 16px;
  font-style: normal;
  font-size: 1.15rem;
}

.testimonial-card cite b {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #1c2521;
  color: #ffffff;
  font-size: 0.8rem;
}

.testimonial-card cite small {
  display: block;
  font-size: 0.85rem;
  margin-top: 4px;
  opacity: 0.7;
}

.testimonial-card blockquote > p {
  font-size: 1.45rem;
  line-height: 1.5;
  margin-top: 24px;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.faq {
  text-align: center;
  background: radial-gradient(circle at 100% 100%, rgba(31, 167, 117, 0.28), transparent 30%), #0c0d0d;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 56px;
}

.tabs button {
  min-width: 120px;
  padding: 12px 24px;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background-color: transparent;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tabs button:hover,
.tabs .selected {
  background-color: #ffffff;
  color: #111111;
}

.faq-list {
  max-width: 840px;
  margin-inline: auto;
  text-align: left;
}

.faq-list details {
  margin-bottom: 16px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: background-color 0.2s ease;
}

.faq-list details[open] {
  background: radial-gradient(circle at 70% 0, rgba(38, 128, 95, 0.15), transparent 60%);
}

.faq-list p {
  max-width: 720px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ==========================================================================
   Footer & Newsletter
   ========================================================================== */

footer {
  position: relative;
  overflow: hidden;
  background: 
    radial-gradient(circle at 90% 105%, rgba(47, 204, 145, 0.45), transparent 32%),
    radial-gradient(circle at 18% 110%, rgba(202, 111, 91, 0.25), transparent 25%);
}

footer::after {
  content: 'Kavio';
  position: absolute;
  bottom: -0.35em;
  left: 0;
  z-index: 0;
  font-size: 40vw;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.footer-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}

.footer-cta h2 {
  margin: 0;
  font-size: clamp(3.5rem, 11vw, 12rem);
  line-height: 1;
  background: linear-gradient(90deg, #99ddb9, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.7fr) minmax(0, 1.1fr) minmax(0, 1.4fr);
  gap: clamp(24px, 4vw, 56px);
  padding: 52px 0 40px;
}

.footer-col h3 {
  margin: 0 0 18px;
  font-size: 1.25rem;
}

.footer-main a:not(.logo) {
  display: block;
  color: var(--muted);
  font-size: 0.925rem;
  transition: color 0.2s ease;
}

.footer-main a:not(.logo):hover {
  color: var(--mint);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li + li {
  margin-top: 10px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 16px;
}

.contact-info {
  display: grid;
  gap: 12px;
  font-style: normal;
}

.contact-info p,
.brand-col p,
.newsletter-col p {
  margin: 0;
}

.footer-col .logo + p {
  margin-top: 16px;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.input-group input {
  min-width: 0;
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background-color: transparent;
  color: var(--text);
  transition: border-color 0.2s ease;
}

.input-group input::placeholder {
  color: var(--muted);
}

.input-group input:focus-visible {
  border-color: var(--green);
  outline: 2px solid var(--green-glow);
  outline-offset: 2px;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0 clamp(150px, 24.5vw, 470px);
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1000px) {
  .header nav,
  .tools {
    display: none;
  }

  .menu,
  .menu-toggle {
    display: block;
    margin-left: auto;
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: 9999px;
    background-color: #090b0a;
    color: #ffffff;
    cursor: pointer;
  }

  .header nav.open {
    display: flex;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    flex-direction: column;
    margin: 0;
    background-color: #090b0a;
    border-radius: 16px;
    padding: 12px;
  }

  .hero,
  .hero-inner {
    min-height: 720px;
  }

  .hero h1 span:first-child {
    padding-left: 0;
  }

  .team-pill {
    display: none;
  }

  .hero-copy {
    margin-top: 36px;
    max-width: 100%;
  }

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

  .about-tag i {
    display: none;
  }

  .service-grid,
  .process {
    grid-template-columns: 1fr;
  }

  .process-images {
    display: none;
  }

  .stats {
    flex-wrap: wrap;
    gap: 16px;
  }

  .stats div {
    width: 220px;
    height: 220px;
  }

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

  .project-image {
    height: 440px;
  }

  .award-list article {
    grid-template-columns: 80px 1fr;
  }

  .award-list p {
    grid-column: 2;
  }

  .testimonial-card {
    grid-template-columns: 1fr;
  }

  .testimonial-intro {
    border-radius: 20px 20px 0 0;
  }

  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .shell {
    width: calc(100% - 32px);
  }

  .header {
    top: 18px;
  }

  .hero,
  .hero-inner {
    min-height: 600px;
    padding-top: 80px;
  }

  .trusted {
    padding-bottom: 72px;
  }

  .logos {
    font-size: 1.35rem;
  }

  .about {
    padding-bottom: 60px;
  }

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

  .service-copy {
    min-height: auto;
    padding: 28px;
  }

  .service-art {
    height: 250px;
  }

  .process {
    gap: 32px;
  }

  .stats div {
    width: 150px;
    height: 150px;
    margin: 0;
  }

  .stats div:nth-child(even) {
    margin-top: 20px;
  }

  .stats strong {
    font-size: 2.25rem;
  }

  .project-image {
    height: 300px;
  }

  .gallery {
    height: 380px;
  }

  .section-head .btn {
    display: none;
  }

  .award-list article {
    grid-template-columns: 48px 1fr;
    gap: 16px;
  }

  .testimonial-card > * {
    padding: 28px;
  }

  .arrows {
    margin-top: 40px;
  }

  .footer-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .footer-cta {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
    padding: 40px 0;
  }

  .footer-cta h2 {
    font-size: clamp(2.75rem, 12vw, 4.5rem);
  }

  .footer-cta .btn {
    padding-inline: 18px;
    white-space: nowrap;
  }

  .footer-bottom {
    flex-direction: column;
    padding-bottom: 32px;
  }
}
