/* ─── RESET ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { text-decoration: none; }

/* ─── SKIP LINK ──────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 100;
  padding: 0.5em 1em;
  background: var(--home-bg);
  color: var(--home-text);
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--green-dark);
  border-radius: 2px;
  transition: top 0.1s;
}

.skip-link:focus { top: 1rem; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ─── PANELS ─────────────────────────────────────────────────────── */
#splash, #home {
  position: fixed;
  inset: 0;
  will-change: transform;
  transition: transform 0.65s cubic-bezier(0.77, 0, 0.175, 1);
}

#splash {
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: clamp(2rem, 7vw, 6rem);
  background-color: var(--splash-bg);
  overflow: hidden;
}

#home {
  z-index: 5;
  transform: translateX(100%);
  overflow-y: auto;
  background-color: var(--home-bg);
}

/* transition states */
#splash.exiting { transform: translateX(-100%); }
#home.entering  { transform: translateX(0); }

/* ─── SPLASH INNER ───────────────────────────────────────────────── */
.splash-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  user-select: none;
}

/* title row: eccolo + software design + button inline */
.splash-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4em;
  font-size: clamp(1rem, 2vw + 0.5rem, 2rem);
  padding: 36px 0;
}

@media (min-width: 621px) {
  .splash-title {
    flex-direction: row;
    align-items: baseline;
  }
}

.splash-sub-row {
  display: flex;
  align-items: baseline;
  gap: 0.4em;
}

/* ECCOLO gather animation */
.word-together {
  display: inline-flex;
  align-items: center;
  font-family: 'Poppins', sans-serif;
  font-size: 3.5em;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--splash-text);
  position: relative;
  z-index: 2;
}

.word-together span {
  display: inline-block;
  opacity: 0;
  animation: gatherLetter 1.3s cubic-bezier(0.34, 1.46, 0.64, 1) forwards;
}

.word-together span:nth-child(1) { --sx: -140px; --sy: -8px;   --sr: -25deg; animation-delay: 0s;    }
.word-together span:nth-child(2) { --sx: -60px;  --sy: 110px;  --sr: 15deg;  animation-delay: 0.05s; }
.word-together span:nth-child(3) { --sx: -110px; --sy: 30px;   --sr: -40deg; animation-delay: 0.1s;  }
.word-together span:nth-child(4) { --sx: 20px;   --sy: -120px; --sr: 30deg;  animation-delay: 0.15s; }
.word-together span:nth-child(5) { --sx: 130px;  --sy: -50px;  --sr: -18deg; animation-delay: 0.2s;  }
.word-together span:nth-child(6) { --sx: 70px;   --sy: 100px;  --sr: 45deg;  animation-delay: 0.25s; }

@keyframes gatherLetter {
  0%   { transform: translate(var(--sx), var(--sy)) rotate(var(--sr)); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
}

/* "software design" inline subtitle */
.splash-sub {
  font-family: 'Playwrite IS', cursive;
  font-size: 1.1em;
  color: var(--splash-text);
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  max-width: 0;
  animation: growWidth 1s cubic-bezier(0.4, 0, 0.2, 1) forwards 1.2s;
}

/* >> button */
.splash-btn {
  font-family: 'Poppins', sans-serif;
  font-size: 1.2em;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--splash-text);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  padding: 0.2em 0.2em;
  animation: fadeRight 0.4s ease forwards 1.2s;
  transition:
    letter-spacing 0.3s ease,
    color          0.25s ease;
}

.splash-btn:hover {
  letter-spacing: 0.45em;
  color: var(--btn-hover-color);
}

/* ─── KEYFRAMES ──────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeRight {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes growWidth {
  to { max-width: 20em; }
}

/* ─── LANGUAGE FLOAT ─────────────────────────────────────────────── */
.lang-float {
  display: flex;
  justify-content: flex-end;
  padding-top: 1.5rem;
  opacity: 0;
}

#home.entering .lang-float {
  animation: fadeIn 0.5s ease forwards 0.15s;
}

.lang-switcher {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.lang-trigger {
  display: flex;
  align-items: center;
  gap: 0.38em;
  font-family: 'Poppins', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--home-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3em 0;
  line-height: 1;
  transition: color 0.2s ease;
  user-select: none;
}

.lang-trigger:hover { color: var(--home-text); }

.lang-current { line-height: 1; }

.lang-caret {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-bottom: 2px;
  opacity: 0.55;
  transition: transform 0.25s ease, margin-bottom 0.25s ease;
}

.lang-switcher.is-open .lang-caret {
  transform: rotate(-135deg);
  margin-bottom: -2px;
}

.lang-options {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-switcher.is-open .lang-options {
  max-height: 120px;
}

.lang-btn {
  font-family: 'Poppins', sans-serif;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--home-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.28em 0;
  line-height: 1;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.lang-switcher.is-open .lang-btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-switcher.is-open .lang-btn:nth-child(1) { transition-delay: 0.06s; }
.lang-switcher.is-open .lang-btn:nth-child(2) { transition-delay: 0.11s; }
.lang-switcher.is-open .lang-btn:nth-child(3) { transition-delay: 0.16s; }
.lang-switcher.is-open .lang-btn:nth-child(4) { transition-delay: 0.21s; }

.lang-btn.is-active { color: var(--home-text); font-weight: 600; }
.lang-btn:hover     { color: var(--home-text); }

.lang-dot { display: none; }
.lang-sep { display: none; }

/* ─── HOME — BRAND BLOCK ─────────────────────────────────────────── */
.h-brand {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  padding-bottom: 2.5rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--green-dim);
  opacity: 0;
}

#home.entering .h-brand {
  animation: fadeUp 0.7s ease forwards;
}

.h-brand-name {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(3.2rem, 8vw, 5.8rem);
  font-weight: 600;
  color: var(--home-text);
  letter-spacing: 0.06em;
  line-height: 1;
}


/* ─── HOME — CONTENT WRAPPER ─────────────────────────────────────── */
.h-body {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.4rem 5rem;
}

@media (min-width: 621px) {
  .h-body { padding: 0 clamp(2rem, 5vw, 5rem) 7rem; }
}

/* ─── HOME — HERO ────────────────────────────────────────────────── */
.h-hero {
  padding: 3.5rem 0 3.5rem;
  border-bottom: 1px solid var(--green-dim);
}

@media (min-width: 621px) {
  .h-hero { padding: 5rem 0 5rem; }
}

.h-eyebrow {
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--green-dark);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  opacity: 0;
}

.eyebrow-break { display: inline; }

@media (max-width: 620px) {
  .eyebrow-break { display: block; }
}

#home.entering .h-eyebrow {
  animation: fadeUp 0.6s ease forwards 0.35s;
}

.h-heading {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 600;
  color: var(--home-text);
  line-height: 1.14;
  margin-bottom: 2rem;
  opacity: 0;
}

#home.entering .h-heading {
  animation: fadeUp 0.6s ease forwards 0.5s;
}

.h-heading em {
  font-style: italic;
  font-size: 0.78em;
  color: var(--green-dark);
}

.h-lead {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--home-muted);
  line-height: 1.8;
  max-width: 540px;
  opacity: 0;
}

#home.entering .h-lead {
  animation: fadeUp 0.6s ease forwards 0.65s;
}

.h-hero .btn-cta {
  margin-top: 2.5rem;
  display: inline-block;
}


/* ─── HOME — SECTION WRAPPER ─────────────────────────────────────── */
.h-section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--green-dim);
}

@media (min-width: 621px) {
  .h-section { padding: 4.5rem 0; }
}

.h-section--flush { padding-top: 0; }

.s-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--green-dark);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-bottom: 3.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}


/* ─── HOME — SERVICE PILLARS ─────────────────────────────────────── */
.svc-pillars {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .svc-pillars {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2px;
  }

  .svc-pillar.is-open,
  .svc-pillar {
    border: none;
    background-color: var(--home-text);
  }

  .svc-pillar .svc-pillar-body {
    grid-template-rows: 1fr;
    margin-bottom: 1.1rem;
    opacity: 1;
  }

  .svc-pillar .svc-pillar-num         { color: var(--green); }
  .svc-pillar .svc-pillar-title        { color: #ffffff; }
  .svc-pillar .svc-pillar-kicker       { color: var(--home-bg); }
  .svc-pillar .svc-pillar-body-inner   { color: rgba(240, 243, 189, 0.8); }
  .svc-pillar .svc-cap-line            { color: rgba(240, 243, 189, 0.55); }
  .svc-pillar .svc-cta                 { color: var(--green); }
  .svc-pillar .svc-cta:hover           { color: #ffffff; }
  .svc-pillar .svc-expand-btn          { display: none; }
}

.svc-pillar {
  padding: 2rem 1.8rem;
  border: 1px solid var(--green-dim);
  display: flex;
  flex-direction: column;
  gap: 0;
  cursor: pointer;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.svc-pillar:hover { border-color: var(--green-dark); }
.svc-pillar:hover .svc-pillar-title { background-size: 100% 1px; }

@media (min-width: 621px) {
  .svc-pillar { padding: 3.5rem; }
}

.svc-pillar-num {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green-dark);
  line-height: 1;
  transition: color 0.3s ease;
}

.svc-pillar-title {
  font-family: 'Quicksand', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--home-text);
  line-height: 1.3;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: left bottom;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: color 0.3s ease, background-size 0.35s ease;
}

.svc-pillar-kicker {
  font-family: 'Quicksand', sans-serif;
  font-weight: 400;
  font-style: italic;
  font-size: 0.92rem;
  color: var(--green-dark);
  transition: color 0.3s ease;
}

.svc-pillar-body {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  margin-bottom: 0;
  opacity: 0;
  transition:
    grid-template-rows 0.44s cubic-bezier(0.4, 0, 0.2, 1),
    margin-bottom      0.44s cubic-bezier(0.4, 0, 0.2, 1),
    opacity            0.32s ease;
}

.svc-pillar-body-inner {
  min-height: 0;
  font-family: 'Quicksand', sans-serif;
  font-size: 1rem;
  font-weight: 300;
  color: var(--home-muted);
  line-height: 1.75;
}

.svc-cap-line {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--home-muted);
  letter-spacing: 0.05em;
  line-height: 1.6;
  margin-top: auto;
}

.svc-cta {
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--green-dark);
  text-decoration: none;
  margin-top: 0.5rem;
  display: inline-block;
  transition: letter-spacing 0.25s ease, color 0.2s ease;
}

.svc-cta:hover {
  letter-spacing: 0.22em;
  color: var(--home-text);
}

/* ─── SVC-PILLAR — SPACING (gap replaced by margins) ────────────── */
.svc-pillar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
}

.svc-pillar-title  { margin-bottom: 1.1rem; }
.svc-pillar-kicker { margin-bottom: 1.1rem; }

/* ─── SVC-PILLAR — OPEN STATE ────────────────────────────────────── */
.svc-pillar.is-open {
  border-color: var(--home-text);
  background-color: var(--home-text);
}

.svc-pillar.is-open .svc-pillar-body {
  grid-template-rows: 1fr;
  margin-bottom: 1.1rem;
  opacity: 1;
}

.svc-pillar.is-open .svc-pillar-num         { color: var(--green); }
.svc-pillar.is-open .svc-pillar-title        { color: #ffffff; }
.svc-pillar.is-open .svc-pillar-kicker       { color: var(--home-bg); }
.svc-pillar.is-open .svc-pillar-body-inner   { color: rgba(240, 243, 189, 0.8); }
.svc-pillar.is-open .svc-cap-line            { color: rgba(240, 243, 189, 0.55); }
.svc-pillar.is-open .svc-cta                 { color: var(--green); }
.svc-pillar.is-open .svc-cta:hover           { color: #ffffff; }
.svc-pillar.is-open .svc-expand-btn          { color: var(--home-bg); opacity: 1; }

/* ─── SVC-PILLAR — EXPAND INDICATOR ─────────────────────────────── */
.svc-expand-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  color: var(--green-dark);
  opacity: 0.55;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.svc-expand-btn:hover,
.svc-pillar.is-open .svc-expand-btn { opacity: 1; }

.svc-expand-icon {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
}

.svc-expand-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: translateY(-50%);
}

.svc-expand-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1.5px;
  height: 100%;
  background: currentColor;
  transform: translateX(-50%);
  transition: opacity 0.38s ease;
}

.svc-pillar.is-open .svc-expand-icon::after { opacity: 0; }

@media (max-width: 620px) {
  .svc-expand-btn { padding: 0.5rem; margin-right: -0.3rem; }
}

/* ─── HOME — PROCESS TIMELINE ────────────────────────────────────── */
.process-steps {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}

.process-steps::-webkit-scrollbar { display: none; }

@media (min-width: 621px) {
  .process-steps {
    overflow-x: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }
}

.process-step {
  flex: 0 0 78vw;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding-right: 1.5rem;
}

@media (min-width: 621px) {
  .process-step {
    flex: 1;
    padding-right: 0;
  }
}

.process-connector { display: none; }

.process-step-num {
  font-family: 'Poppins', sans-serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--green);
  line-height: 1;
}

.process-step-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--home-text);
  letter-spacing: 0.01em;
}

.process-step-desc {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--home-muted);
  line-height: 1.75;
}

/* ─── HOME — CURRENT BUILD ───────────────────────────────────────── */
.current-build {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--green-dark);
  border-left: 3px solid var(--green-dark);
}

@media (min-width: 621px) {
  .current-build {
    flex-direction: row;
    align-items: baseline;
    gap: 2rem;
    padding: 1.6rem 2rem;
  }
}

.current-build-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--green-dark);
  white-space: nowrap;
}

.current-build-project {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--home-text);
  letter-spacing: 0.02em;
}

/* ─── HOME — CONTACT ─────────────────────────────────────────────── */
.h-contact {
  padding: 3.5rem 0 1.5rem;
}

@media (min-width: 621px) {
  .h-contact { padding: 5rem 0 2rem; }
}

.contact-layout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
}

@media (min-width: 621px) {
  .contact-layout {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 3rem;
    flex-wrap: wrap;
  }
}

.contact-headline {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--home-text);
  line-height: 1.18;
}

.contact-headline span { color: var(--green-dark); }

.contact-sub {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 1rem;
  font-weight: 300;
  color: var(--home-muted);
  line-height: 1.6;
}

.contact-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
}

@media (min-width: 621px) {
  .contact-side { align-items: flex-end; }
}

.btn-cta {
  display: inline-block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cta-bg);
  background-image: linear-gradient(var(--cta-bg), var(--cta-bg));
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 0% 100%;
  border: 1.5px solid var(--cta-bg);
  padding: 0.9em 2.2em;
  text-decoration: none;
  transition: color 0.35s ease, background-size 0.35s ease;
}

.btn-cta:hover {
  color: var(--cta-text);
  background-size: 100% 100%;
}

.contact-email {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--green-dark);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.contact-email:hover { color: var(--contact-hover); }

/* ─── HOME — FOOTER ──────────────────────────────────────────────── */
.h-footer {
  margin-top: 4rem;
  padding: 1.8rem 0 0;
  border-top: 1px solid var(--green-dim);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 621px) {
  .h-footer {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-copy {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 300;
  color: var(--footer-muted);
  letter-spacing: 0.04em;
}

.footer-links {
  display: flex;
  gap: 1.8rem;
}

.footer-link {
  font-family: 'Poppins', sans-serif;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--green-dark);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.footer-link:hover { color: var(--footer-hover); }

/* ─── FOCUS & MOTION ─────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--green-dark);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

