/* elPagès Web hub. Shape rule: cards 20px, stage 28px, buttons pill. Brand colours from the elPagès logo: teal #00695C, yellow #FFC000 (yellow only on dark surfaces).
   Home: a dark studio stage (same in both themes) holding a CSS 3D render of three tool screens, then the directory. */
@font-face { font-family: "Outfit"; src: url("/fonts/outfit-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --f-sans: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: ui-monospace, "SF Mono", Consolas, monospace;
  --bg: #f5f4f1; --surface: #fdfcfa; --surface-2: #ebe9e4; --field: #fff;
  --ink: #161513; --muted: #5b5852; --line: #dddad3; --line-strong: #b9b5ac;
  --accent: #00695c; --accent-hover: #00564b; --accent-ink: #ffffff; --accent-text: #00695c;
  --danger: #b42318; --r-s: 12px; --r-m: 20px; --r-btn: 999px;
  --shadow: 0 30px 60px -32px rgb(40 30 20 / .35), 0 1px 3px rgb(40 30 20 / .06);
  --ease: cubic-bezier(.16,1,.3,1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100f0e; --surface: #191816; --surface-2: #141311; --field: #141311;
    --ink: #efede8; --muted: #a8a49b; --line: #2a2825; --line-strong: #403d38;
    --accent: #ffc000; --accent-hover: #ffcf3d; --accent-ink: #1a1500; --accent-text: #ffc000;
    --shadow: 0 30px 60px -26px rgb(0 0 0 / .75);
  }
}
.lg-bg { fill: var(--accent); } .lg-fg { fill: var(--accent-ink); }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.03em; }
.brand svg { border-radius: 8px; }
.brand-card { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; margin: 0 0 1.5em; padding: 18px; border-radius: var(--r-m); background: #004d43; color: #fff; }
.brand-card img { width: 96px; height: 96px; border-radius: 16px; }
.brand-card p { margin: 0; color: #e6f2f0; }
.brand-card strong { color: #ffc000; }
.kicker { margin: 0 0 10px; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }

/* ------------------------------------------------------------ studio stage */
.hub-stage {
  --s-ink: #f4f2ed; --s-muted: #a7b2ae; --s-line: rgb(255 255 255 / .1);
  position: relative; isolation: isolate; overflow: hidden; color: var(--s-ink);
  margin: 8px clamp(8px, 1.4vw, 20px) 0; border-radius: 28px;
  background: radial-gradient(120% 90% at 85% 15%, #12302b 0%, transparent 55%), linear-gradient(180deg, #0b0f0e 0%, #070908 100%);
  padding-block: clamp(40px, 7vw, 96px) 28px;
}
.stage-glow { position: absolute; inset: -20% -10% auto auto; width: 70%; aspect-ratio: 1; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgb(0 140 122 / .32), transparent 70%), radial-gradient(closest-side at 70% 60%, rgb(255 192 0 / .10), transparent 70%); filter: blur(10px); }
.stage-grid { display: grid; gap: 40px; align-items: center; }
.stage-copy { position: relative; z-index: 2; }
@media (min-width: 1024px) { .stage-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 6px 14px 6px 10px; border: 1px solid var(--s-line); border-radius: 999px;
  background: rgb(255 255 255 / .04); color: var(--s-muted); font-size: .9rem; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #ffc000; box-shadow: 0 0 0 4px rgb(255 192 0 / .16); }
.hub-stage h1 { font-size: clamp(2.6rem, 6.2vw, 4.9rem); line-height: .97; letter-spacing: -0.055em; max-width: 13ch; margin: 0 0 .4em; color: var(--s-ink); font-weight: 650; }
.hub-stage h1 em { font-style: normal; color: #ffc000; }
.hub-lead { color: var(--s-muted); font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.55; max-width: 42ch; margin: 0 0 30px; }
.stage-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-stage { background: #ffc000; color: #1a1500; }
.btn-stage:hover { background: #ffcf3d; }
.btn-stage .i { transition: transform .3s var(--ease); }
.btn-stage:hover .i { transform: translateX(3px); }
.btn-stage-ghost { border-color: rgb(255 255 255 / .26); color: var(--s-ink); background: transparent; }
.btn-stage-ghost:hover { border-color: var(--s-ink); }
.hub-stage .btn:focus-visible { outline: 2px solid #ffc000; outline-offset: 3px; }

/* CSS 3D render: three browser windows on a tilted plane, floating chips in front, a soft floor below. */
.h-render { position: relative; perspective: 1700px; perspective-origin: 40% 30%; }
.h-render-in { position: relative; aspect-ratio: 1.22; transform-style: preserve-3d; transform: rotateX(12deg) rotateY(-24deg) rotateZ(3deg); }
.scr { position: absolute; margin: 0; overflow: hidden; border-radius: 14px; background: #121715; border: 1px solid rgb(255 255 255 / .1);
  box-shadow: 0 50px 90px -30px rgb(0 0 0 / .9), 0 0 0 1px rgb(0 0 0 / .4), inset 0 1px 0 rgb(255 255 255 / .06);
  animation: h-float 9s ease-in-out infinite; }
.scr img { display: block; width: 100%; height: auto; }
.scr-bar { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: #1a201e; border-bottom: 1px solid rgb(255 255 255 / .06); }
.scr-bar i { width: 8px; height: 8px; border-radius: 50%; background: #3a423f; }
.scr-bar b { margin-left: 10px; font: 500 .7rem/1 var(--f-mono); color: #8d9995; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scr-a { left: 2%; top: 4%; width: 80%; transform: translateZ(0); }
.scr-b { right: -2%; top: 46%; width: 54%; transform: translateZ(110px); animation-delay: -3s; }
.scr-c { left: 3%; top: 58%; width: 46%; transform: translateZ(180px); animation-delay: -6s; }
.h-chip { position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; white-space: nowrap;
  background: rgb(18 24 22 / .82); border: 1px solid rgb(255 255 255 / .14); color: var(--s-ink); font-size: .85rem; font-weight: 500;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 20px 40px -18px rgb(0 0 0 / .8); animation: h-float 7s ease-in-out infinite; }
.h-chip .i { color: #ffc000; width: 16px; height: 16px; }
.h-chip-1 { right: 4%; top: -2%; transform: translateZ(220px); animation-delay: -1s; }
.h-chip-2 { left: 14%; bottom: -7%; transform: translateZ(260px); animation-delay: -4s; }
.h-chip-3 { right: 2%; bottom: -4%; transform: translateZ(240px); animation-delay: -2s; }
.h-floor { position: absolute; left: 6%; right: 6%; bottom: -10%; height: 22%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / .7), transparent), radial-gradient(closest-side, rgb(0 140 122 / .18), transparent 80%); filter: blur(8px); }
@keyframes h-float { 50% { translate: 0 -10px; } }
@media (max-width: 1023px) { .h-render { max-width: 600px; margin: 40px auto 36px; width: 88%; } .h-render-in { transform: rotateX(10deg) rotateY(-16deg) rotateZ(2deg); } }
@media (max-width: 560px) { .h-render { width: 84%; } .scr-c { left: 8%; } .h-render-in { transform: rotateX(8deg) rotateY(-10deg) rotateZ(1deg); } .h-chip-2 { display: none; } .h-chip { font-size: .72rem; padding: 6px 10px; } .h-chip .i { width: 13px; height: 13px; } .scr-bar { height: 20px; } .scr-bar b { display: none; } .scr { border-radius: 9px; } }
@media (prefers-reduced-motion: reduce) { .scr, .h-chip { animation: none; } }

.h-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; margin: clamp(32px, 5vw, 64px) 0 0; border-top: 1px solid var(--s-line); }
@media (min-width: 820px) { .h-facts { grid-template-columns: repeat(4, 1fr); } }
.h-facts div { padding: 22px 16px 8px 0; }
@media (min-width: 820px) { .h-facts div + div { padding-left: 24px; border-left: 1px solid var(--s-line); } }
.h-facts dt { font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.h-facts dd { margin: 8px 0 0; color: var(--s-muted); font-size: .95rem; }

/* ------------------------------------------------------------ directory */
.h-dir { padding-block: clamp(64px, 9vw, 120px) 0; scroll-margin-top: 72px; }
.h-dir-head { max-width: 720px; margin-bottom: 8px; }
.h-dir-head h2, .principles h2, .h-faq h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.02; letter-spacing: -0.045em; margin: 0 0 .35em; }
.h-dir-head p { color: var(--muted); font-size: 1.12rem; margin: 0; max-width: 56ch; }
.h-group { margin-top: clamp(40px, 6vw, 72px); }
.h-group-head { display: flex; align-items: center; gap: 16px; padding-top: 16px; margin-bottom: 20px; border-top: 1px solid var(--line-strong); }
.g-num { font: 500 .85rem/1 var(--f-mono); color: var(--muted); }
.h-group-title { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.h-group-title .i { color: var(--accent-text); }
.h-cards { display: grid; gap: 18px; }
@media (min-width: 900px) { .h-cards { grid-template-columns: repeat(2, 1fr); } }
.h-cards.h-cards-one { grid-template-columns: 1fr; }
.h-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface);
  transition: border-color .3s, box-shadow .4s var(--ease), transform .4s var(--ease); }
.h-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-3px); }
.h-shot { display: block; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.h-shot img { display: block; width: 100%; height: auto; aspect-ratio: 800 / 420; object-fit: cover; transition: transform .7s var(--ease); }
.h-card:hover .h-shot img { transform: scale(1.035); }
@media (min-width: 900px) {
  .h-card-wide { display: grid; grid-template-columns: 1.15fr 1fr; }
  .h-card-wide .h-shot { border-bottom: 0; border-right: 1px solid var(--line); }
  .h-card-wide .h-shot img { height: 100%; }
  .h-card-wide .h-body { align-content: center; padding: 32px 36px; }
}
.h-body { display: grid; gap: 10px; align-content: start; padding: 24px 26px 22px; }
.h-body h4 { margin: 0; font-size: 1.5rem; }
.h-body h4 a { color: var(--ink); text-decoration: none; }
.h-body h4 a:hover { color: var(--accent-text); }
.h-body > p { margin: 0; color: var(--muted); }
.h-deep { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line); }
.h-deep li { border-bottom: 1px solid var(--line); }
.h-deep li:last-child { border-bottom: 0; }
.h-deep a { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 10px 0; color: var(--ink); text-decoration: none; font-weight: 500; }
.h-deep a::after { content: "\2192"; color: var(--accent-text); transition: transform .3s var(--ease); }
.h-deep a:hover { color: var(--accent-text); }
.h-deep a:hover::after { transform: translateX(4px); }

/* ------------------------------------------------------------ method + FAQ */
.principles { padding-block: clamp(72px, 9vw, 120px) 0; scroll-margin-top: 72px; }
.p-grid { display: grid; gap: 28px; margin-top: 28px; }
@media (min-width: 820px) { .p-grid { grid-template-columns: repeat(3, 1fr); gap: 36px; } }
.p-grid > div { border-top: 1px solid var(--line-strong); padding-top: 20px; }
.p-ico { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 12px; background: var(--surface-2); color: var(--accent-text); }
.p-grid h3 { font-size: 1.2rem; margin: 0 0 6px; }
.p-grid p { color: var(--muted); margin: 0; }

.h-faq { padding-block: clamp(72px, 9vw, 120px) 24px; }
.h-faq-list { max-width: 860px; margin-top: 20px; border-top: 1px solid var(--line-strong); }
.h-faq details { border-bottom: 1px solid var(--line); }
.h-faq summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 0; cursor: pointer; list-style: none; font-size: 1.12rem; font-weight: 600; letter-spacing: -0.01em; }
.h-faq summary::-webkit-details-marker { display: none; }
.h-faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); font-weight: 400; font-size: 1.2rem; transition: transform .3s var(--ease); }
.h-faq details[open] summary::after { transform: rotate(45deg); }
.h-faq details p { margin: 0 0 22px; color: var(--muted); max-width: 70ch; }
.h-faq details a { color: var(--accent-text); }

/* ------------------------------------------------------------ article pages */
.article { padding-block: 56px 0; }
.article-head { max-width: 780px; margin-bottom: 32px; }
.article-head h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -0.045em; }
.article-head p { color: var(--muted); font-size: 1.15rem; }
