/* ==========================================================================
   Page sections
   ========================================================================== */

/* ---- Home hero ------------------------------------------------------------ */
.hero { padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(2rem, 1rem + 3vw, 4rem); overflow: hidden; }
.hero__grid-bg {
  position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgb(255 255 255 / 0.035) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero__inner { display: grid; gap: clamp(2.5rem, 1rem + 4vw, 4rem); align-items: center; }
@media (min-width: 1024px) { .hero__inner { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); } }
.hero__copy h1 { margin: 0.25rem 0 1.4rem; }
.hero__trust { display: flex; align-items: flex-start; gap: 0.6rem; margin-top: 2rem; max-width: 52ch; font-size: 0.9rem; color: var(--c-muted); }
.hero__trust .icon { width: 20px; height: 20px; color: var(--c-teal); flex: none; margin-top: 0.1rem; }

.hero-visual { position: relative; width: 100%; max-width: 560px; margin-inline: auto; aspect-ratio: 560 / 520; }
.hero-visual__web { position: absolute; inset: 0; width: 100%; height: 100%; }
.hv-nodes circle { fill: var(--c-obsidian); stroke: var(--c-cyan); stroke-width: 2; }
.hv-core { fill: url(#hv-line); }
.hero-visual__label { position: absolute; right: 0; bottom: -1.75rem; margin: 0; font-size: 0.75rem; color: var(--c-muted); }

.float-card {
  position: absolute;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  border: 1px solid rgb(255 255 255 / 0.14);
  background: rgb(14 18 44 / 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 50px -24px rgb(0 0 0 / 0.8);
  font-size: 0.8rem;
  max-width: 62%;
}
.float-card__kicker { display: flex; align-items: center; gap: 0.45rem; margin: 0 0 0.35rem; color: var(--c-muted); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; }
.float-card__title { margin: 0 0 0.45rem; font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; line-height: 1.3; color: #fff; }
.float-card__meta { margin: 0; color: var(--c-muted); font-size: 0.72rem; }
.float-card__lines { display: grid; gap: 5px; margin-bottom: 0.55rem; }
.float-card__lines span { height: 6px; border-radius: 4px; background: rgb(255 255 255 / 0.1); }
.float-card__lines .short { width: 60%; }
.float-card__chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.float-card__chips span { padding: 0.15rem 0.5rem; border-radius: 999px; background: rgb(244 114 182 / 0.14); color: #fbcfe8; font-size: 0.7rem; }
.float-card--article { left: 0; top: 4%; width: 255px; }
.float-card--wp { right: 0; top: 40%; width: 210px; }
.float-card--social { left: 6%; bottom: 2%; width: 250px; }
@media (max-width: 639px) {
  /* Small screens: the cards stack in a readable column over a faint web. */
  .hero-visual { aspect-ratio: auto; display: grid; gap: 0.75rem; padding: 1rem 0 2rem; }
  .hero-visual__web { opacity: 0.35; }
  .float-card { position: relative; inset: auto; width: auto; max-width: none; }
  .float-card--wp { margin-left: 18%; }
  .float-card--social { margin-right: 10%; }
  .hero-visual__label { bottom: 0; }
}

/* ---- Inner page hero ---------------------------------------------------- */
.page-hero { padding-block: clamp(3rem, 2rem + 5vw, 6rem) clamp(2.5rem, 2rem + 3vw, 4.5rem); overflow: hidden; }
.page-hero__inner { max-width: 900px; }
.page-hero h1 { margin-bottom: 1.2rem; }
.page-hero--error { min-height: 60vh; display: flex; align-items: center; }
.page-hero .eyebrow .status { margin-left: 0.25rem; }

/* ---- Interactive flow diagram -------------------------------------------- */
.flow__track { list-style: none; display: grid; gap: 1rem; }
@media (min-width: 900px) {
  .flow__track { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; }
}
.flow__step { position: relative; }
.flow__node {
  display: flex; align-items: center; gap: 0.85rem;
  width: 100%;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  color: var(--c-text);
  font: inherit; text-align: left;
  cursor: pointer;
}
.flow__num { font-family: var(--font-display); font-weight: 700; color: var(--c-muted); font-size: 0.85rem; }
.flow__title { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1.25; }
.flow__detail { padding: 1rem 0.25rem 0; color: var(--c-muted); font-size: 0.95rem; }
.flow__connector { display: none; }
@media (min-width: 900px) {
  .flow__connector {
    display: block;
    position: absolute; top: 2.05rem; left: calc(100% + 0.15rem);
    width: 1.2rem; height: 2px;
    background: var(--c-border-strong);
    border-radius: 2px;
    overflow: hidden;
  }
  .flow__connector::after {
    content: ""; position: absolute; inset: 0;
    background: var(--gradient-brand);
    transform: scaleX(0); transform-origin: left;
    transition: transform var(--dur-slow) var(--ease-out);
  }
  .flow__step.is-done .flow__connector::after { transform: scaleX(1); }
}
.flow__step.is-active .flow__node {
  border-color: rgb(139 92 246 / 0.6);
  background: linear-gradient(135deg, rgb(139 92 246 / 0.22), rgb(34 211 238 / 0.08));
  box-shadow: var(--shadow-glow);
}
.flow__step.is-active .flow__num { color: var(--c-cyan-soft); }
/* With JS, non-active details are dimmed (still readable). */
.js .flow__step:not(.is-active) .flow__detail { opacity: 0.5; }
.flow__detail { transition: opacity var(--dur) ease; }
.flow__controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
.flow__status { margin: 0; min-width: 7rem; text-align: center; font-size: 0.9rem; color: var(--c-muted); }

/* ---- Bento --------------------------------------------------------------- */
.bento { display: grid; gap: 1.25rem; }
@media (min-width: 760px) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .bento { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bento__card--wide { grid-column: span 2; }
  .bento__card--full { grid-column: 1 / -1; grid-template-columns: 1fr 1.2fr; }
}
@media (min-width: 760px) and (max-width: 1099px) { .bento__card--wide { grid-column: 1 / -1; } }
.bento__card {
  display: flex; flex-direction: column;
  min-height: 300px;
  padding: clamp(1.4rem, 1rem + 1.2vw, 2rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  background: linear-gradient(180deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.015));
  overflow: hidden;
}
.bento__card h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); }
.bento__card p:not(.eyebrow) { color: var(--c-muted); }
.bento__card .eyebrow { margin-bottom: 0.6rem; }
@media (min-width: 760px) {
  .bento__card--wide { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem; align-items: center; }
}
.bento__art { margin-top: auto; padding-top: 1.5rem; }
.bento__card--wide .bento__art { padding-top: 0; margin-top: 0; }

.bento-art-profile { position: relative; display: grid; gap: 0.6rem; padding: 1rem; border-radius: 16px; background: rgb(7 10 26 / 0.6); border: 1px solid var(--c-border); overflow: hidden; }
.mini-field { display: grid; gap: 0.15rem; padding: 0.55rem 0.7rem; border-radius: 10px; background: var(--c-surface-2); }
.mini-field span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--c-muted); }
.mini-field b { font-weight: 500; font-size: 0.85rem; color: var(--c-text); }
.scan-line { position: absolute; left: 0; right: 0; top: 0; height: 40%; background: linear-gradient(180deg, transparent, rgb(34 211 238 / 0.14), transparent); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .scan-line { animation: scan 4.5s ease-in-out infinite; } }
@keyframes scan { 0% { transform: translateY(-100%); } 100% { transform: translateY(260%); } }

.bento-art-doc { display: grid; gap: 7px; padding: 1rem; border-radius: 14px; background: rgb(7 10 26 / 0.55); border: 1px solid var(--c-border); }
.bento-art-doc span { height: 7px; border-radius: 4px; background: rgb(255 255 255 / 0.1); }
.bento-art-doc .h { height: 11px; width: 70%; background: linear-gradient(90deg, var(--c-violet), var(--c-cyan)); opacity: 0.8; }
.bento-art-doc .s { width: 75%; }

.bento-art-approve { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; }
.bento-art-approve .chip { padding: 0.35rem 0.75rem; border-radius: 999px; font-size: 0.8rem; font-weight: 600; background: var(--c-surface-2); border: 1px solid var(--c-border); }
.bento-art-approve .chip--ok { background: rgb(52 211 153 / 0.14); border-color: rgb(52 211 153 / 0.4); color: #a7f3d0; }
.bento-art-approve .arrow { color: var(--c-muted); }

.art-frame { position: relative; height: 120px; border-radius: 14px; overflow: hidden; background: linear-gradient(160deg, #312e81, #0e7490); border: 1px solid var(--c-border); }
.art-sun { position: absolute; width: 56px; height: 56px; border-radius: 50%; right: 22%; top: 18%; background: radial-gradient(circle, #fde68a, #f472b6); }
.art-hill { position: absolute; left: -10%; right: -10%; bottom: -40%; height: 90%; border-radius: 50%; background: linear-gradient(180deg, #8b5cf6, #1e1b4b); }
.art-logo { position: absolute; left: 10px; bottom: 10px; padding: 0.2rem 0.5rem; border-radius: 6px; font-size: 0.65rem; font-weight: 800; letter-spacing: 0.12em; color: var(--c-midnight); background: #fff; }

.bento-art-channels { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; padding: 2rem 1rem; }
.bento-art-channels .channel-chip { width: 48px; height: 48px; font-size: 1.25rem; border-radius: 14px; }
.orbit { position: absolute; inset: 10% 15%; border: 1px dashed rgb(255 255 255 / 0.14); border-radius: 50%; z-index: -1; }
@media (prefers-reduced-motion: no-preference) {
  .bento-art-channels .channel-chip { animation: bob 5s ease-in-out infinite; }
  .bento-art-channels .channel-chip:nth-child(2) { animation-delay: -1s; }
  .bento-art-channels .channel-chip:nth-child(3) { animation-delay: -2s; }
  .bento-art-channels .channel-chip:nth-child(4) { animation-delay: -3s; }
  .bento-art-channels .channel-chip:nth-child(5) { animation-delay: -4s; }
  .orbit { animation: spin 40s linear infinite; }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes spin { to { transform: rotate(360deg); } }

.bento-art-chart { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding: 0.75rem; border-radius: 14px; background: rgb(7 10 26 / 0.55); border: 1px solid var(--c-border); }
.bento-art-chart span { flex: 1; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--c-cyan), rgb(139 92 246 / 0.5)); transform-origin: bottom; }
.bento-art-chart span:nth-child(1) { height: 30%; }
.bento-art-chart span:nth-child(2) { height: 42%; }
.bento-art-chart span:nth-child(3) { height: 38%; }
.bento-art-chart span:nth-child(4) { height: 58%; }
.bento-art-chart span:nth-child(5) { height: 66%; }
.bento-art-chart span:nth-child(6) { height: 80%; }
@media (prefers-reduced-motion: no-preference) {
  .js .reveal.reveal-pending .bento-art-chart span { transform: scaleY(0.2); }
  .js .reveal.is-visible .bento-art-chart span { transform: scaleY(1); transition: transform 1.1s var(--ease-spring) 0.3s; }
}

/* ---- Walkthrough --------------------------------------------------------- */
.walkthrough { display: grid; gap: clamp(2.5rem, 1rem + 4vw, 4rem); }
@media (min-width: 1024px) { .walkthrough { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; } }
.walkthrough__visuals { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) { .walkthrough__visuals { position: sticky; top: 6rem; } }
section[id="how-it-works"]:focus { outline: none; }

/* ---- Dashboard mock ------------------------------------------------------- */
.dashboard { margin: 0; border-radius: var(--radius-lg); border: 1px solid var(--c-border); background: rgb(12 16 40 / 0.85); overflow: hidden; box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.9); }
.dashboard__bar { display: flex; align-items: center; gap: 6px; padding: 0.7rem 1rem; border-bottom: 1px solid var(--c-border); background: rgb(255 255 255 / 0.03); }
.dashboard__bar span { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / 0.15); }
.dashboard__bar p { margin: 0 0 0 0.75rem; font-size: 0.75rem; color: var(--c-muted); }
.dashboard__body { display: grid; grid-template-columns: 160px minmax(0, 1fr); min-height: 260px; }
.dashboard__side { padding: 1rem; border-right: 1px solid var(--c-border); font-size: 0.82rem; }
.dashboard__brand { font-weight: 600; margin-bottom: 1rem; }
.dashboard__brand small { display: block; font-weight: 400; color: var(--c-muted); font-size: 0.7rem; }
.dashboard__side ul { list-style: none; display: grid; gap: 0.2rem; color: var(--c-muted); }
.dashboard__side li { padding: 0.4rem 0.6rem; border-radius: 8px; }
.dashboard__side li.is-active { background: rgb(139 92 246 / 0.18); color: #fff; }
.dashboard__main { padding: 1rem 1.15rem; min-width: 0; }
.dashboard__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem; margin-bottom: 0.9rem; }
.dashboard__title { margin: 0; font-family: var(--font-display); font-weight: 600; }
.dashboard__rows { list-style: none; display: grid; gap: 0.55rem; }
.dashboard__rows li { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0.8rem; border-radius: 12px; background: var(--c-surface-2); font-size: 0.82rem; }
.dashboard__rows p { margin: 0; flex: 1; min-width: 0; }
.dashboard__rows strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard__rows p span { color: var(--c-muted); font-size: 0.74rem; }
.dashboard__channels { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 1rem; font-size: 0.76rem; color: var(--c-muted); }
.dashboard__channels .channel-chip { width: 26px; height: 26px; border-radius: 8px; font-size: 0.8rem; }
.dashboard__channels p { margin: 0 0 0 0.35rem; }
.dashboard figcaption { padding: 0 1rem 0.9rem; }
@media (max-width: 560px) {
  .dashboard__body { grid-template-columns: 1fr; }
  .dashboard__side { display: none; }
}

/* ---- Content-flow sequence (scroll triggered) ----------------------------- */
.sequence { display: grid; gap: 1rem; padding: 1.25rem; border-radius: var(--radius-lg); border: 1px solid var(--c-border); background: rgb(7 10 26 / 0.55); }
@media (min-width: 640px) { .sequence { grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1.1fr); align-items: center; } .sequence .concept-label { grid-column: 1 / -1; } }
.seq-tile { display: flex; gap: 0.7rem; align-items: center; padding: 0.8rem 0.9rem; border-radius: 14px; border: 1px solid var(--c-border); background: var(--c-surface-2); }
.seq-tile p { margin: 0; }
.seq-tile--article { display: block; background: linear-gradient(150deg, rgb(139 92 246 / 0.25), rgb(34 211 238 / 0.08)); border-color: rgb(139 92 246 / 0.4); }
.seq-tile__kicker { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-muted); }
.seq-tile__title { margin: 0.3rem 0 0.45rem; font-size: 1rem; line-height: 1.3; }
.seq-tile__meta, .seq-tile__body { font-size: 0.8rem; color: var(--c-muted); }
.sequence__targets { display: grid; gap: 0.55rem; }
.sequence__beam { position: relative; height: 2px; border-radius: 2px; background: var(--c-border-strong); overflow: hidden; }
@media (max-width: 639px) { .sequence__beam { width: 2px; height: 32px; margin-inline: auto; } }
.sequence__beam span { position: absolute; inset: 0; background: var(--gradient-brand); }
@media (prefers-reduced-motion: no-preference) {
  /* Targets fly in once (has-played); the beam only animates while on screen (is-playing). */
  .js .sequence.is-armed:not(.has-played) .sequence__targets > * { opacity: 0; transform: translateX(-14px); }
  .js .sequence.has-played .sequence__targets > * { opacity: 1; transform: none; transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
  .js .sequence.has-played .sequence__targets > :nth-child(1) { transition-delay: 0.45s; }
  .js .sequence.has-played .sequence__targets > :nth-child(2) { transition-delay: 0.7s; }
  .js .sequence.has-played .sequence__targets > :nth-child(3) { transition-delay: 0.95s; }
  .js .sequence.has-played .sequence__targets > :nth-child(4) { transition-delay: 1.2s; }
  .js .sequence:not(.is-playing) .sequence__beam span { transform: scaleX(0); }
  .js .sequence.is-playing .sequence__beam span { transform-origin: left; animation: beam 2.4s var(--ease-out) 0.1s infinite; }
  .js .sequence.is-playing .seq-tile--article { animation: glow-pulse 2.4s ease-in-out infinite; }
}
@keyframes beam { 0% { transform: scaleX(0); opacity: 1; } 60% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes glow-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgb(139 92 246 / 0); } 50% { box-shadow: 0 0 30px -4px rgb(139 92 246 / 0.6); } }

/* ---- WordPress plugin concept ------------------------------------------- */
.wp-plugin { margin: 0; padding: 1.4rem; border-radius: var(--radius-lg); border: 1px solid var(--c-border); background: rgb(12 16 40 / 0.85); }
.wp-plugin__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; padding-bottom: 1rem; border-bottom: 1px solid var(--c-border); }
.wp-plugin__head p { margin: 0; flex: 1; min-width: 10rem; display: grid; }
.wp-plugin__head p span { font-size: 0.8rem; color: var(--c-muted); }
.wp-plugin__fields { display: grid; gap: 0.85rem; margin: 1.1rem 0; }
.wp-plugin__fields div { display: grid; gap: 0.3rem; }
.wp-plugin__fields dt { font-size: 0.8rem; font-weight: 600; color: var(--c-muted); }
.wp-plugin__fields dd { margin: 0; }
.wp-plugin__fields code, .fake-select { display: block; padding: 0.6rem 0.8rem; border-radius: 10px; border: 1px solid var(--c-border-strong); background: rgb(7 10 26 / 0.7); font-size: 0.88rem; }
.fake-select { padding-right: 2.2rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 8 4 4 4-4' fill='none' stroke='%23a9b0d6' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.7rem center; background-size: 16px; }
.wp-plugin__foot { font-size: 0.78rem; color: var(--c-muted); margin: 0; }

/* ---- Agency preview -------------------------------------------------------- */
.agency-preview { margin: 0; padding: 1.4rem; border-radius: var(--radius-lg); border: 1px solid var(--c-border); background: rgb(12 16 40 / 0.85); }
.agency-preview__title { font-family: var(--font-display); font-weight: 600; margin-bottom: 1rem; }
.agency-preview__list { list-style: none; display: grid; gap: 0.6rem; }
.agency-preview__list li { display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem; border-radius: 14px; border: 1px solid var(--c-border); background: var(--c-surface); }
.agency-preview__list li.is-active { border-color: rgb(139 92 246 / 0.5); background: rgb(139 92 246 / 0.1); }
.agency-preview__list p { margin: 0; flex: 1; min-width: 0; display: grid; font-size: 0.9rem; }
.agency-preview__list p span { font-size: 0.78rem; color: var(--c-muted); }
.brand-swatch { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; font-weight: 700; font-size: 0.8rem; color: #fff; }
.brand-swatch--a { background: linear-gradient(135deg, #0ea5e9, #6366f1); }
.brand-swatch--b { background: linear-gradient(135deg, #22c55e, #0d9488); }
.brand-swatch--c { background: linear-gradient(135deg, #f59e0b, #db2777); }

/* ---- Final CTA ------------------------------------------------------------- */
.final-cta__panel {
  position: relative;
  padding: clamp(2.5rem, 1.5rem + 5vw, 5rem) clamp(1.25rem, 1rem + 3vw, 4rem);
  border-radius: calc(var(--radius-lg) + 8px);
  border: 1px solid rgb(255 255 255 / 0.12);
  background: linear-gradient(160deg, rgb(139 92 246 / 0.18), rgb(7 10 26 / 0.6) 55%, rgb(34 211 238 / 0.12));
  text-align: center;
  overflow: hidden;
}
.final-cta__panel .lead { margin-inline: auto; }
.final-cta__panel h2 { max-width: 20ch; margin-inline: auto; }
.final-cta__motif { position: absolute; right: -80px; bottom: -110px; width: 340px; opacity: 0.25; z-index: -1; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .final-cta__motif { animation: spin 90s linear infinite; } }
.final-cta .cta-note { text-align: center; }

/* Utilities for split sections on small screens */
@media (max-width: 959px) { .split--reverse > :first-child { order: 2; } }
