/* EulClavie homepage v2 sections. Owner: layout agent.
   Relies on index.html :root tokens (--bg --ink --muted --accent --num --navy2 --line --ease)
   and the existing .reveal / .is-in observer. */

:root {
  --gutter: clamp(18px, 6vw, 112px);
  --maxw: 1320px;
  --card: #ffffff;
  --card-line: rgba(15, 39, 57, .08);
  --shadow-soft: 0 1px 2px rgba(15, 39, 57, .04), 0 18px 50px -18px rgba(15, 39, 57, .14);
}

.v2-container { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.v2-section { position: relative; padding: clamp(120px, 14vw, 220px) 0; }

.v2-head { max-width: 820px; }
.v2-head--center { margin: 0 auto; text-align: center; }
.v2-head--center .v2-lead { margin-left: auto; margin-right: auto; }
.v2-h2 {
  font-family: 'Outfit', system-ui, sans-serif; font-weight: 700;
  font-size: clamp(38px, 4.6vw, 72px); line-height: 1.03; letter-spacing: -0.032em;
  text-wrap: balance;
}
.v2-lead {
  margin-top: 28px; max-width: 600px;
  font-size: clamp(16px, 1.3vw, 19px); line-height: 1.65; color: var(--muted);
}
main p { text-wrap: pretty; }
.v2-section h3 { font-family: 'Outfit', system-ui, sans-serif; font-weight: 600; letter-spacing: -0.015em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 56px; padding: 0 28px; border-radius: 999px;
  font-family: 'DM Sans', system-ui, sans-serif; font-weight: 700; font-size: 15px; letter-spacing: .005em;
  white-space: nowrap; cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn svg { width: 12px; height: 12px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 10px 30px -10px rgba(240, 90, 40, .6); }
.btn-primary:hover { background: #d94a1b; transform: translateY(-1px); box-shadow: 0 14px 36px -12px rgba(240, 90, 40, .7); }
.btn-secondary { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }
.btn-secondary:hover { background: var(--ink); color: #fff; }
.btn-lg { height: 64px; padding: 0 36px; font-size: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ---------- HERO ---------- */
.hero.v2-hero {
  height: auto; min-height: max(100vh, 760px); overflow: hidden;
  display: flex; align-items: flex-end;
  padding: 150px 0 clamp(72px, 9vh, 120px);
}
.v2-hero .hero__inner {
  display: grid; grid-template-columns: 1fr minmax(300px, 440px); column-gap: 64px; align-items: end;
}
.v2-hero .kicker {
  grid-column: 1 / -1;
  font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 28px;
  display: inline-flex; align-items: center; gap: 14px;
}
.v2-hero .kicker::before { content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--accent); }
/* overrides index.html's absolute .hero h1 */
.v2-hero h1.hero__title {
  position: relative; left: auto; top: auto; width: auto; transform: none;
  grid-column: 1; text-align: left;
  font-weight: 800; font-size: clamp(50px, 8.4vw, 136px); line-height: .96; letter-spacing: -0.045em;
}
.v2-hero h1 > .line { display: block; opacity: 0; transform: translate3d(0, .4em, 0); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
.v2-hero h1 > .line:nth-child(2) { transition-delay: .1s; }
.v2-hero h1 > .line:nth-child(3) { transition-delay: .2s; color: var(--accent); }
body.ready .v2-hero h1 > .line { opacity: 1; transform: none; }
.v2-hero .hero__side { grid-column: 2; padding-bottom: 10px; }
.v2-hero .hero__side p { font-size: 17px; line-height: 1.65; color: var(--muted); }
.v2-hero .btn-row { margin-top: 30px; }

/* ---------- PROBLEMS ---------- */
#problems .v2-head { margin-bottom: clamp(120px, 14vw, 200px); } /* open air for the paper hunt */
.problems { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: start; }
.problem {
  position: relative; background: var(--card); border: 1px solid var(--card-line); border-radius: 28px;
  padding: 40px 38px 44px; box-shadow: var(--shadow-soft);
}
.problem:nth-child(2) { margin-top: 64px; }
.problem:nth-child(3) { margin-top: 128px; }
.problem__top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 36px; }
.problem__num {
  position: relative; display: inline-block;
  font-family: 'Outfit', sans-serif; font-weight: 800; font-size: clamp(72px, 6.4vw, 104px); line-height: .85;
  letter-spacing: -0.045em; color: var(--num); transition: color .6s var(--ease);
}
/* story highlight hook: page agent adds .is-hit to .problem */
.problem__num::after {
  content: ""; position: absolute; left: 2px; right: 2px; bottom: -12px; height: 3px; border-radius: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: left center; transition: transform .7s cubic-bezier(.65, 0, .35, 1);
}
.problem.is-hit .problem__num { color: var(--accent); }
.problem.is-hit .problem__num::after { transform: scaleX(1); }
.problem__icon { width: 56px; height: 56px; display: block; }
.problem__title { font-size: 26px; line-height: 1.15; }
.problem__text { margin-top: 14px; font-size: 16px; line-height: 1.65; color: var(--muted); }

/* ---------- SERVICES (constellation 3 + 2) ---------- */
#services .v2-head { margin-bottom: clamp(90px, 10vw, 150px); }
#services-grid {
  position: relative;
  display: grid; grid-template-columns: repeat(6, 1fr);
  column-gap: 40px; row-gap: 120px;
}
#services-links { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.service { position: relative; z-index: 1; text-align: center; padding: 0 12px; }
.service[data-i="1"] { grid-column: 1 / 3; }
.service[data-i="2"] { grid-column: 3 / 5; margin-top: 90px; }
.service[data-i="3"] { grid-column: 5 / 7; }
.service[data-i="4"] { grid-column: 2 / 4; }
.service[data-i="5"] { grid-column: 4 / 6; }
.service__node {
  position: relative; display: grid; place-items: center;
  width: 96px; height: 96px; margin: 0 auto 28px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--card-line); box-shadow: var(--shadow-soft);
}
.service__node::after { /* soft halo the lines can meet */
  content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1px dashed rgba(240, 90, 40, .22);
}
.service__icon { width: 48px; height: 48px; display: block; }
.service__title { font-size: 22px; line-height: 1.2; max-width: 300px; margin: 0 auto; }
.service__text { margin: 12px auto 0; max-width: 320px; font-size: 15.5px; line-height: 1.65; color: var(--muted); }

/* ---------- WORK (dark) ---------- */
.v2-dark {
  color: #fff;
  background:
    radial-gradient(55% 60% at 20% 30%, rgba(31, 69, 106, .95) 0%, rgba(31, 69, 106, 0) 70%),
    radial-gradient(40% 50% at 90% 90%, rgba(240, 90, 40, .10) 0%, rgba(240, 90, 40, 0) 70%),
    var(--ink);
}
.v2-dark .v2-lead { color: rgba(255, 255, 255, .7); }
#work .v2-head { margin-bottom: clamp(100px, 11vw, 160px); }
.projects { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.project {
  position: relative; min-height: 380px; padding: 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  border-radius: 28px; border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(160deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, .03) 60%);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 30px 60px -30px rgba(0, 0, 0, .5);
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.project:nth-child(2) { margin-top: 80px; }
.project:hover, .project.is-lit { border-color: rgba(240, 90, 40, .55); }
.project__idx { font-family: 'Outfit', sans-serif; font-weight: 600; font-size: 14px; letter-spacing: .18em; color: rgba(240, 90, 40, .9); }
.project__title { font-size: clamp(32px, 3vw, 44px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 700; }
.project__text { margin-top: 16px; max-width: 440px; font-size: 16.5px; line-height: 1.65; color: rgba(255, 255, 255, .7); }
.work__cta { margin-top: 64px; }
.btn-work { border: 1.5px solid rgba(255, 255, 255, .35); color: #fff; background: rgba(255, 255, 255, .02); }
.btn-work:hover { background: var(--accent); border-color: var(--accent); }

/* ---------- PROCESS ---------- */
#process .v2-head { margin-bottom: clamp(110px, 12vw, 170px); }
#process-steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; }
#process-steps::before { /* faint base line through the numbers; the trail svg draws over it */
  content: ""; position: absolute; left: 0; right: 0; top: 48px; height: 1px;
  background: repeating-linear-gradient(90deg, rgba(15, 39, 57, .18) 0 6px, transparent 6px 14px);
}
#process-trail { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
.step { position: relative; z-index: 1; }
.step__num {
  display: inline-block; padding-right: 18px; background: var(--bg);
  font-family: 'Outfit', sans-serif; font-weight: 800; font-size: clamp(80px, 7vw, 112px); line-height: .86;
  letter-spacing: -0.045em; color: var(--num); transition: color .5s var(--ease);
}
.step.is-lit .step__num { color: var(--accent); }
.step__title { margin-top: 40px; font-size: 26px; line-height: 1.15; }
.step__text { margin-top: 14px; max-width: 360px; font-size: 16px; line-height: 1.65; color: var(--muted); }

/* ---------- FINAL ---------- */
.v2-final {
  min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between;
  padding-bottom: 48px;
  background: radial-gradient(60% 55% at 50% 40%, #ffffff 0%, rgba(255, 255, 255, 0) 70%), var(--bg);
}
.final__inner { text-align: center; padding-top: 8vh; padding-bottom: 22vh; }
.final__title { font-weight: 800; font-size: clamp(44px, 6.4vw, 104px); line-height: .98; letter-spacing: -0.04em; max-width: 1000px; margin: 0 auto; }
.v2-final .v2-lead { margin: 30px auto 0; max-width: 560px; }
.final__cta { margin-top: 48px; }
.final__bottom {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap;
  padding-top: 28px;
  background: linear-gradient(var(--line), var(--line)) center top / calc(100% - var(--gutter) * 2) 1px no-repeat;
}
.final__logo img { height: 34px; width: auto; display: block; }
.final__links { display: flex; flex-wrap: wrap; gap: 14px 34px; font-size: 14px; color: var(--muted); }
.final__links a { transition: color .2s; }
.final__links a:hover { color: var(--accent); }

/* reveal: index.html observer adds .is-in; also accept .in */
.reveal.in { opacity: 1; transform: none; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .v2-hero .hero__inner { grid-template-columns: 1fr; }
  .v2-hero .hero__side { grid-column: 1; max-width: 520px; margin-top: 40px; }
  .problems { grid-template-columns: 1fr 1fr; }
  .problem:nth-child(3) { margin-top: 0; }
  .problem__num { font-size: 72px; }
}

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .v2-section { padding: 110px 0; }
  .hero.v2-hero { min-height: 100svh; padding: 110px 0 56px; }
  .v2-hero .kicker { font-size: 11px; margin-bottom: 20px; }
  .v2-hero h1.hero__title { font-size: clamp(44px, 12.4vw, 64px); }
  .v2-hero .hero__side { margin-top: 28px; }
  .v2-hero .hero__side p { font-size: 16px; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn { height: 54px; }
  .btn-lg { height: 58px; padding: 0 28px; }

  #problems .v2-head { margin-bottom: 110px; }
  .problems { grid-template-columns: 1fr; gap: 20px; }
  .problem, .problem:nth-child(2), .problem:nth-child(3) { margin-top: 0; padding: 30px 26px 34px; border-radius: 22px; }
  .problem__top { margin-bottom: 26px; }
  .problem__num { font-size: 64px; }
  .problem__icon { width: 44px; height: 44px; }
  .problem__title { font-size: 23px; }

  #services .v2-head { margin-bottom: 80px; text-align: left; }
  #services .v2-head .v2-lead { margin-left: 0; }
  #services-grid { grid-template-columns: 1fr; row-gap: 64px; }
  .service, .service[data-i] { grid-column: 1; margin-top: 0; text-align: left; display: grid; grid-template-columns: 76px 1fr; column-gap: 20px; padding: 0; }
  .service:nth-child(odd) { padding-left: 34px; } /* zig zag so connecting lines read as a chain */
  .service__node { width: 68px; height: 68px; margin: 0; grid-row: 1 / span 2; }
  .service__icon { width: 36px; height: 36px; }
  .service__title { font-size: 20px; margin: 0; align-self: center; }
  .service__text { grid-column: 2; margin: 8px 0 0; font-size: 15px; }

  #work .v2-head { margin-bottom: 90px; }
  .projects { grid-template-columns: 1fr; gap: 22px; }
  .project, .project:nth-child(2) { margin-top: 0; min-height: 280px; padding: 30px 26px; border-radius: 22px; }
  .work__cta { margin-top: 44px; }
  .work__cta .btn { width: 100%; }

  #process .v2-head { margin-bottom: 90px; }
  #process-steps { grid-template-columns: 1fr; gap: 64px; padding-left: 0; }
  #process-steps::before { display: none; }
  .step__num { font-size: 72px; padding: 8px 0; }
  .step__title { margin-top: 18px; font-size: 23px; }

  .final__inner { text-align: left; padding-top: 4vh; padding-bottom: 18vh; }
  .final__title { font-size: clamp(42px, 11.6vw, 60px); }
  .v2-final .v2-lead { margin-left: 0; }
  .final__cta .btn { width: 100%; }
  .final__bottom { flex-direction: column; align-items: flex-start; }
  .final__links { gap: 12px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .v2-hero h1 > .line { transition: none !important; opacity: 1; transform: none !important; }
}

/* ---------- SERVICES compact (page agent, 24 Oct): whole constellation fits one screen so the connect beat
   finishes in view. Desktop/tablet only; phones keep the vertical chain above. ---------- */
@media (min-width: 761px) {
  #services.v2-section {
    min-height: 100vh; height: 100vh; box-sizing: border-box;
    padding: clamp(84px, 11vh, 112px) 0 clamp(20px, 4vh, 44px);
    display: flex; flex-direction: column; justify-content: center;
  }
  #services .v2-head { max-width: 980px; margin-bottom: clamp(26px, 5vh, 56px); }
  #services .v2-h2 { font-size: clamp(34px, 3.9vw, 58px); }
  #services .v2-lead { margin-top: clamp(10px, 1.6vh, 18px); max-width: 900px; font-size: clamp(15px, 1.15vw, 17px); }
  #services-grid { column-gap: 28px; row-gap: clamp(18px, 3.6vh, 40px); }
  #services .service[data-i="2"] { margin-top: clamp(20px, 4.4vh, 48px); }
  #services .service__node { width: 56px; height: 56px; margin: 0 auto 12px; }
  #services .service__node::after { inset: -7px; }
  #services .service__icon { width: 28px; height: 28px; }
  #services .service__title { font-size: clamp(17px, 1.3vw, 19px); max-width: 280px; }
  #services .service__text { margin-top: 6px; max-width: 290px; font-size: 14px; line-height: 1.5; }
}

/* ---------- WORK cards with screenshots (page agent, 24 Oct) ---------- */
#work.v2-section { padding: clamp(96px, 11vh, 120px) 0 clamp(64px, 8vh, 96px); }
#work .work__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-bottom: clamp(36px, 5.5vh, 56px); }
#work .v2-head { margin-bottom: 0; }
#work .v2-h2 { font-size: clamp(36px, 4vw, 60px); }
#work .work__cta { margin-top: 0; flex: none; }
.projects { align-items: stretch; gap: 28px; }
.project, .project:nth-child(2) { margin-top: 0; }
.project {
  min-height: 0; padding: 12px; justify-content: flex-start; color: #fff; text-decoration: none;
  transition: border-color .4s var(--ease), background .4s var(--ease), transform .45s var(--ease), box-shadow .45s var(--ease);
}
.project:hover { transform: translateY(-6px); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 40px 70px -30px rgba(0,0,0,.6); }
.project__shot { position: relative; margin: 0; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 8.2; background: #0b1d2b; }
.project__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: transform .7s var(--ease); }
.project:hover .project__shot img { transform: scale(1.03); }
.project__shot figcaption {
  position: absolute; right: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px;
  font: 600 11px/1.4 'DM Sans', sans-serif; letter-spacing: .02em; color: #fff; background: rgba(15, 39, 57, .72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.project__body { padding: 22px 18px 16px; display: grid; gap: 0; }
.project__idx { font-size: 12px; }
.project__title { margin-top: 8px; font-size: clamp(26px, 2.3vw, 34px); }
.project__text { margin-top: 10px; font-size: 15.5px; line-height: 1.6; max-width: 460px; }
.project__link { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; color: #fff; }
.project__link svg { width: 11px; height: 11px; color: var(--accent); transition: transform .25s var(--ease); }
.project:hover .project__link svg { transform: translateX(3px); }
@media (max-width: 760px) {
  #work .work__top { display: block; margin-bottom: 36px; }
  #work .work__cta { margin-top: 26px; }
  .project, .project:nth-child(2) { padding: 10px; min-height: 0; border-radius: 22px; }
  .project__body { padding: 18px 12px 12px; }
  .project__title { font-size: 26px; }
}

/* ---------- WORK: three cards, Colina featured (page agent, 24 Oct) ---------- */
#work.v2-section { min-height: 100vh; box-sizing: border-box; padding: clamp(92px, 11vh, 112px) 0 clamp(36px, 5vh, 56px); }
#work .v2-h2 { font-size: clamp(32px, 3.3vw, 50px); }
#work .v2-lead { margin-top: 14px; font-size: clamp(15px, 1.15vw, 17px); max-width: 640px; }
#work .work__top { margin-bottom: clamp(26px, 4vh, 40px); }
.projects--3 { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 22px; align-items: stretch; }
.projects--3 .project { padding: 10px; border-radius: 24px; display: flex; flex-direction: column; border-color: rgba(255,255,255,.12); }
.projects--3 .project:hover { transform: translateY(-6px); border-color: rgba(240, 90, 40, .5); }
.projects--3 .project__shot { aspect-ratio: auto; height: clamp(150px, 23vh, 210px); border-radius: 16px; }
.projects--3 .project__shot img { object-position: top left; }
.projects--3 .project__body { padding: 16px 12px 10px; display: flex; flex-direction: column; flex: 1; }
.project__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project__tag { font: 700 11px/1 'DM Sans', sans-serif; letter-spacing: .14em; text-transform: uppercase; color: rgba(240, 90, 40, .95); }
.project__live {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 8px; border-radius: 999px;
  font: 600 11px/1 'DM Sans', sans-serif; color: rgba(255,255,255,.85); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
}
.project__live i { width: 6px; height: 6px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 3px rgba(61,220,132,.18); }
.projects--3 .project__title { margin-top: 10px; font-size: clamp(22px, 1.8vw, 28px); }
.projects--3 .project__text { margin-top: 8px; font-size: 14.5px; line-height: 1.55; flex: 1; }
.project__proof { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13.5px; font-weight: 600; color: #fff; }
.projects--3 .project__link { margin-top: 10px; font-size: 13.5px; }
@media (max-width: 1100px) { .projects--3 { grid-template-columns: 1fr 1fr; } .projects--3 .project--feature { grid-column: 1 / -1; } }
@media (max-width: 760px) {
  #work.v2-section { min-height: 0; padding: 96px 0 72px; }
  .projects--3 { grid-template-columns: 1fr; gap: 18px; }
  .projects--3 .project__shot { height: 180px; }
}
