/* W Espinoza Group — built on the InnovaOps design system
   (palette, type, eyebrow, hairlines, entanglement motion). */

:root {
  --bg:    #FFFFFF;
  --ice:   #F2F8F9;
  --ice2:  #E3EFF1;
  --line:  rgba(14,124,134,.18);
  --teal:  #0E7C86;
  --teald: #0A5C64;
  --star:  #E8A013;
  --ink:   #0B2B33;
  --muted: #587A83;
  --navy:  #0B2B5A;
  --radius: 10px;
  --wrap: 1180px;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-weight: 300; font-size: 1.02rem; line-height: 1.65;
  overflow-x: hidden;
}
img, svg { max-width: 100%; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teald); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.12; margin: 0; }
p { margin: 0 0 1em; }
b, strong { font-weight: 500; }
::selection { background: var(--star); color: #fff; }
:focus-visible { outline: 2px solid var(--star); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 16px; color: #fff; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }

/* ---------- header ---------- */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.8);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 12px rgba(11,43,51,.05);
}
.hdr .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 1.06rem; letter-spacing: -.01em; line-height: 1.05; }
.brand-name small { display: block; font-family: var(--mono); font-weight: 400; font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { font-family: var(--display); font-weight: 500; font-size: .92rem; color: var(--ink); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--teal); }
.nav .btn { padding: 9px 18px; }
.navtoggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; font-family: var(--display); font-weight: 600; color: var(--ink); cursor: pointer; }
@media (max-width: 860px) {
  .navtoggle { display: inline-flex; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; border-bottom: 1px solid rgba(14,124,134,.08); }
  .nav .btn { margin-top: 12px; justify-content: center; border-bottom: 1px solid var(--teal); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: .92rem;
  padding: 13px 26px; border-radius: 6px; border: 1px solid var(--teal);
  color: var(--teal); background: transparent; text-decoration: none; cursor: pointer;
  transition: background .25s, color .25s, transform .25s, border-color .25s;
}
.btn:hover { background: var(--teal); color: #fff; transform: translateY(-1px); }
.btn.solid { background: var(--teal); color: #fff; }
.btn.solid:hover { background: var(--ink); border-color: var(--ink); }

/* ---------- type helpers ---------- */
.eyebrow {
  font-family: var(--mono); font-size: .75rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--teal); display: flex; align-items: center; gap: 12px; font-weight: 400;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--teal); flex: none; }
.lt { color: var(--teal); }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 36em; }

/* ---------- sections ---------- */
section { padding: 104px 0; border-bottom: 1px solid rgba(14,124,134,.06); }
section.alt { background: var(--ice); }
.sec-head { max-width: 760px; margin-bottom: 56px; }
.sec-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin: 18px 0 18px; }
@media (max-width: 640px) { section { padding: 72px 0; } .sec-head { margin-bottom: 40px; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: calc(92vh - 68px); display: flex; align-items: center; overflow: hidden; padding: 0; border: 0; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.6) 48%, rgba(255,255,255,0) 80%); z-index: 1; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; max-width: 780px; padding: 80px 0; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.1rem); margin: 22px 0 24px; }
.hero .lede { margin-bottom: 36px; }
.cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-hint { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: .68rem; letter-spacing: .2em; color: var(--muted); text-transform: uppercase; z-index: 2; white-space: nowrap; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translate(-50%,0); } 50% { transform: translate(-50%,7px); } }
@media (max-width: 640px) { .hero::after { background: rgba(255,255,255,.78); } .hero-hint { display: none; } }

/* ---------- structure diagram (holdco → licensees) ---------- */
.structure { display: grid; grid-template-columns: 1fr 64px 1.5fr 64px 1fr; align-items: center; }
.s-col h3 { font-size: 1.05rem; margin-bottom: 6px; }
.s-sub { font-family: var(--mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 20px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--ice);
  padding: 16px 14px; font-size: .88rem; font-weight: 400; line-height: 1.5;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .3s, background .3s, transform .3s;
}
.tile b { font-family: var(--display); font-weight: 600; }
.tile svg { width: 22px; height: 22px; stroke: var(--teal); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tile.lit { border-color: var(--teal); background: var(--ice2); transform: translateY(-2px); }
.tile.lit svg { stroke: var(--star); }
.engine { border: 1px solid var(--teald); border-radius: 14px; background: linear-gradient(160deg, var(--ice2), var(--ice)); padding: 30px 20px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; position: relative; }
.engine::before { content: "W ESPINOZA GROUP"; position: absolute; top: -11px; left: 22px; background: #fff; padding: 0 10px; font-family: var(--mono); font-size: .68rem; letter-spacing: .24em; color: var(--teal); }
.engine .tile { background: rgba(255,255,255,.7); }
.conn svg { width: 100%; height: 60px; overflow: visible; display: block; }
.conn path { stroke: var(--teal); stroke-width: 1.5; fill: none; stroke-dasharray: 6 8; animation: dash 1.6s linear infinite; opacity: .75; }
.conn circle { fill: var(--star); }
@keyframes dash { to { stroke-dashoffset: -14; } }
@media (max-width: 1080px) {
  .structure { grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
  .conn { display: flex; justify-content: center; padding: 8px 0; }
  .conn svg { width: 64px; height: 64px; transform: rotate(90deg); }
}
@media (max-width: 420px) { .tiles, .engine { grid-template-columns: 1fr; } }

/* ---------- portfolio ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: all .2s; }
.chip:hover { border-color: var(--teal); color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
@media (max-width: 400px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px 26px 24px;
  display: flex; flex-direction: column; gap: 12px; position: relative;
  transition: border-color .25s, transform .25s, box-shadow .25s;
}
.card:hover { border-color: var(--teal); transform: translateY(-3px); box-shadow: 0 14px 34px -18px rgba(11,43,51,.28); }
.card[hidden] { display: none; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-ic { width: 44px; height: 44px; border-radius: 10px; background: var(--ice); display: grid; place-items: center; flex: none; }
.card-ic svg { width: 22px; height: 22px; stroke: var(--teal); stroke-width: 1.6; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.28rem; }
.card h3 sup { font-size: .55em; color: var(--muted); font-weight: 500; }
.card p { color: var(--muted); font-size: .95rem; margin: 0; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teald); background: var(--ice); border: 1px solid rgba(14,124,134,.12); padding: 3px 8px; border-radius: 4px; }
.status { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status.live::before { background: #1F9D6B; box-shadow: 0 0 0 3px rgba(31,157,107,.16); }
.status.dev::before { background: var(--star); box-shadow: 0 0 0 3px rgba(232,160,19,.18); }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid rgba(14,124,134,.1); padding-top: 14px; margin-top: 4px; font-size: .86rem; }
.card-foot a { font-family: var(--display); font-weight: 600; text-decoration: none; }
.card-foot .muted { color: var(--muted); font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; }

/* ---------- asset classes ---------- */
.classes { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.class { padding: 30px 26px; border-right: 1px solid var(--line); }
.class:last-child { border-right: 0; }
.class .k { font-family: var(--mono); font-size: .78rem; color: var(--teal); letter-spacing: .1em; }
.class h3 { font-size: 1.15rem; margin: 10px 0 8px; }
.class p { color: var(--muted); font-size: .93rem; margin: 0; }
@media (max-width: 960px) { .classes { grid-template-columns: 1fr 1fr; } .class:nth-child(2) { border-right: 0; } .class:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 560px) { .classes { grid-template-columns: 1fr; } .class { border-right: 0; border-bottom: 1px solid var(--line); } .class:last-child { border-bottom: 0; } }

/* ---------- license types ---------- */
.licenses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1100px) { .licenses { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .licenses { grid-template-columns: 1fr; } }
.lic { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 30px 26px; display: flex; flex-direction: column; gap: 12px; }
.lic.feature { border-color: var(--teald); background: linear-gradient(170deg, var(--ice2), #fff 60%); position: relative; }
.lic .who { font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.lic h3 { font-size: 1.3rem; }
.lic p { color: var(--muted); font-size: .95rem; margin: 0; }
.lic ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; font-size: .92rem; }
.lic li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.lic li::before { content: ""; width: 8px; height: 8px; margin-top: 8px; border-radius: 2px; background: var(--teal); transform: rotate(45deg); }

/* ---------- process rail ---------- */
.proc { max-width: 900px; display: grid; grid-template-columns: 56px 1fr; }
.rail { position: relative; }
.rail::before { content: ""; position: absolute; left: 27px; top: 14px; bottom: 14px; width: 2px; background: var(--line); }
.rail .fill { position: absolute; left: 27px; top: 14px; width: 2px; height: 0; background: linear-gradient(var(--teal), var(--star)); transition: height .25s linear; }
.step { display: grid; grid-template-columns: 56px 1fr; margin-left: -56px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--teal); background: #fff; margin: 8px auto 0; position: relative; z-index: 2; transition: background .3s, box-shadow .3s, border-color .3s; }
.step.active .dot { background: var(--star); border-color: var(--star); box-shadow: 0 0 0 6px rgba(232,160,19,.15); }
.step h3 { font-size: 1.3rem; display: flex; gap: 14px; align-items: baseline; }
.step h3 .k { font-family: var(--mono); font-size: .78rem; color: var(--teal); letter-spacing: .1em; }
.step p { color: var(--muted); margin: 8px 0 0; max-width: 44em; }

/* ---------- principles ---------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 40px; }
.pr h3 { font-size: 1.12rem; margin: 14px 0 8px; }
.pr p { color: var(--muted); font-size: .95rem; margin: 0; }
.pr svg { width: 28px; height: 28px; stroke: var(--teal); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .principles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .principles { grid-template-columns: 1fr; } }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; background: #fff; }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marq 40s linear infinite; }
.marquee span { font-family: var(--display); font-weight: 500; font-size: 1.05rem; white-space: nowrap; color: var(--ink); display: inline-flex; align-items: center; gap: 48px; }
.marquee span::after { content: "✦"; color: var(--star); font-size: .8rem; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 40px 22px 0; font-family: var(--display); font-weight: 600; font-size: 1.1rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 18px; font-size: 1.5rem; font-weight: 400; color: var(--teal); transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 22px; max-width: 46em; }

/* ---------- contact / form ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 64px; align-items: start; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; gap: 40px; } }
.contact-meta { display: grid; gap: 20px; margin-top: 32px; }
.contact-meta div { border-left: 2px solid var(--star); padding-left: 16px; }
.contact-meta .k { font-family: var(--mono); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); display: block; }
.contact-meta a, .contact-meta span.v { font-family: var(--display); font-weight: 500; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
form.inq { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px; display: grid; gap: 18px; }
@media (max-width: 560px) { form.inq { padding: 22px 18px; } }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }
label { display: grid; gap: 6px; font-family: var(--display); font-weight: 500; font-size: .88rem; }
label .opt { font-family: var(--body); font-weight: 300; color: var(--muted); }
input, select, textarea {
  font: inherit; font-family: var(--body); font-weight: 400; font-size: 1rem; color: var(--ink);
  border: 1px solid rgba(14,124,134,.28); border-radius: 8px; padding: 12px 14px; background: #fff; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,124,134,.14); }
textarea { min-height: 130px; resize: vertical; }
.fine { font-size: .82rem; color: var(--muted); margin: 0; }

/* ---------- page hero (inner pages) ---------- */
.phero { padding: 92px 0 72px; background: linear-gradient(180deg, var(--ice), #fff); position: relative; overflow: hidden; }
.phero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); margin: 20px 0 20px; max-width: 16em; }

/* ---------- prose (legal) ---------- */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.45rem; margin: 48px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #26474F; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.marks { width: 100%; border-collapse: collapse; margin: 12px 0 8px; font-size: .95rem; }
.marks th, .marks td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.marks th { font-family: var(--mono); font-weight: 400; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.table-scroll { overflow-x: auto; }
.note { background: var(--ice); border: 1px solid var(--line); border-left: 3px solid var(--star); border-radius: 8px; padding: 16px 18px; font-size: .93rem; color: var(--ink); }

/* ---------- footer ---------- */
.ftr { background: var(--ink); color: #C9DADE; padding: 72px 0 36px; }
.ftr a { color: #E6F1F3; text-decoration: none; }
.ftr a:hover { color: var(--star); }
.ftr-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .ftr-grid { grid-template-columns: 1fr 1fr; } .ftr-grid > :first-child { grid-column: 1 / -1; } }
.ftr .brand { color: #fff; }
.ftr .brand-name small { color: #8FB0B7; }
.ftr p { font-size: .92rem; max-width: 30em; margin-top: 18px; }
.ftr h4 { font-family: var(--mono); font-weight: 400; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #8FB0B7; margin-bottom: 14px; }
.ftr ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .94rem; }
.ftr-base { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .8rem; color: #8FB0B7; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-hint, .conn path, .marquee-track { animation: none; }
  .marquee-track { flex-wrap: wrap; width: auto; justify-content: center; row-gap: 12px; }
  .marquee-track [aria-hidden="true"] { display: none; }
}
