/* ============================================================
   Skryx feature pages — built on top of /landing/css/styles.css.
   Inherits all design tokens (--bg, --text, --muted, --blue, …)
   and primitives (.btn, .eyebrow, .wrap, .reveal). Everything
   here is feature-page-specific.
   ============================================================ */

main.feat-page {
    padding: 0 0 0;
}

/* ------------------------------------------------------------
   Mobile overflow guard — long URLs, JSON values, and code
   snippets inside the hero/detail visuals don't have natural
   break points. Without this they push grid cells wider than
   the viewport, breaking the layout on phones even with
   body { overflow-x: hidden } in place.
   ------------------------------------------------------------ */
.feat-page section { max-width: 100vw; overflow-x: clip; }
.feat-page .wrap { max-width: 100%; }

.feat-hero-visual,
.feat-detail-visual {
    min-width: 0;          /* allow shrinking inside CSS grid */
    max-width: 100%;
    overflow: hidden;      /* clip anything still too wide */
}
.feat-hero-visual pre,
.feat-detail-visual pre,
.feat-hero-visual > div,
.feat-detail-visual > div {
    min-width: 0;
    max-width: 100%;
}

/* feat-code blocks: wrap on narrow screens instead of forcing
   horizontal scroll. Desktop keeps the original mono layout. */
.feat-code {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

/* Inline mono blocks in visuals: same rules. */
.feat-hero-visual [style*="var(--mono)"],
.feat-detail-visual [style*="var(--mono)"],
.feat-hero-visual [style*="font-family:var(--mono)"],
.feat-detail-visual [style*="font-family:var(--mono)"] {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Long inline-code in prose (e.g. "t_demo_products_v3"). */
.feat-detail p code,
.feat-detail li code,
.feat-section-sub code {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Index/cross-sell cards: same defensive wrap. */
.feat-index-card .tag,
.feat-crosssell-card .feat-crosssell-tag {
    overflow-wrap: anywhere;
}

/* ---------- Hero ---------- */
.feat-hero {
    position: relative; overflow: hidden;
    padding: 100px 0 80px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.feat-hero::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 540px 360px at 30% 0%, rgba(37,99,235,0.18), transparent 70%),
        radial-gradient(ellipse 400px 300px at 80% 30%, rgba(124,58,237,0.14), transparent 70%);
    pointer-events: none; z-index: 0;
}
.feat-hero > .wrap { position: relative; z-index: 1; }
.feat-hero-inner {
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center;
}
.feat-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--muted); margin-bottom: 14px;
}
.feat-hero-eyebrow .ico { font-size: 16px; }
.feat-hero-title {
    font-size: clamp(34px, 5.4vw, 60px); line-height: 1.05; letter-spacing: -0.03em;
    font-weight: 700; color: var(--text); margin: 0 0 18px;
}
.feat-hero-title .grad {
    background: linear-gradient(110deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.feat-hero-tagline {
    font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--muted);
    max-width: 540px; margin: 0 0 26px;
}
.feat-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero visual — feature pages each render their own custom illustration
   inside .feat-hero-visual; this is just the frame. */
.feat-hero-visual {
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    backdrop-filter: blur(8px);
    box-shadow: 0 18px 50px -20px rgba(0,0,0,0.55);
    min-height: 320px;
    display: flex; align-items: center; justify-content: center;
}

/* ---------- Section primitives ---------- */
.feat-section { padding: 80px 0; }
.feat-section-soft { background: var(--bg-soft); border-block: 1px solid rgba(255,255,255,0.05); }
.feat-section-head { text-align: center; margin: 0 auto 48px; max-width: 720px; }
.feat-section-head .eyebrow {
    display: inline-flex; padding: 6px 12px; border-radius: 999px;
    background: rgba(59,130,246,0.10); color: #93c5fd;
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 14px;
}
.feat-section-title {
    font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -0.02em;
    font-weight: 700; color: var(--text); margin: 0 0 14px;
}
.feat-section-title .grad {
    background: linear-gradient(110deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.feat-section-sub {
    font-size: 17px; line-height: 1.6; color: var(--muted); margin: 0;
}

/* ---------- Problem / How-it-works strip ---------- */
.feat-problem {
    display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
    max-width: 940px; margin: 0 auto;
}
.feat-problem-card {
    padding: 26px; border-radius: 14px; border: 1px solid var(--border);
    background: var(--card);
}
.feat-problem-card.bad   { border-color: rgba(239,68,68,0.30); background: rgba(239,68,68,0.04); }
.feat-problem-card.good  { border-color: rgba(34,197,94,0.30); background: rgba(34,197,94,0.04); }
.feat-problem-label {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
    padding: 3px 9px; border-radius: 999px; margin-bottom: 12px;
}
.feat-problem-card.bad  .feat-problem-label { background: rgba(239,68,68,0.15); color: #fca5a5; }
.feat-problem-card.good .feat-problem-label { background: rgba(34,197,94,0.15); color: #86efac; }
.feat-problem-card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; color: var(--text); }
.feat-problem-card p  { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* ---------- How-it-works (3-step) ---------- */
.feat-steps {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
    max-width: 1080px; margin: 0 auto;
}
.feat-step {
    position: relative; padding: 28px; border-radius: 16px;
    background: var(--card); border: 1px solid var(--border);
    transition: transform .2s, border-color .2s;
}
.feat-step:hover { transform: translateY(-2px); border-color: var(--border-bright); }
.feat-step-num {
    width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #2563eb, #7c3aed); color: #fff;
    font-weight: 700; font-size: 14px; margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}
.feat-step h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; color: var(--text); }
.feat-step p  { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--muted); }

/* ---------- Detail blocks (alternating left/right) ---------- */
.feat-detail {
    display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
    margin: 0 auto; max-width: 1080px;
}
.feat-detail + .feat-detail { margin-top: 80px; }
.feat-detail.reverse { direction: rtl; }
.feat-detail.reverse > * { direction: ltr; }
.feat-detail-eyebrow {
    display: inline-flex; padding: 4px 10px; border-radius: 999px;
    background: rgba(124,58,237,0.12); color: #c4b5fd;
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em;
    margin-bottom: 12px;
}
.feat-detail h2 {
    font-size: clamp(24px, 2.6vw, 32px); line-height: 1.18; font-weight: 700;
    letter-spacing: -0.015em; color: var(--text); margin: 0 0 14px;
}
.feat-detail p {
    font-size: 16px; line-height: 1.65; color: var(--muted); margin: 0 0 12px;
}
.feat-detail ul.feat-bullets {
    list-style: none; padding: 0; margin: 18px 0 0;
}
.feat-detail ul.feat-bullets li {
    position: relative; padding-left: 26px;
    font-size: 15px; line-height: 1.55; color: var(--muted); margin-bottom: 10px;
}
.feat-detail ul.feat-bullets li::before {
    content: '✓'; position: absolute; left: 0; top: 0;
    width: 18px; height: 18px; border-radius: 50%;
    background: rgba(34,197,94,0.18); color: #86efac;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
}
.feat-detail strong { color: var(--text); font-weight: 600; }

/* Side visuals in detail blocks (custom per page). */
.feat-detail-visual {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 14px; padding: 22px; min-height: 240px;
    box-shadow: 0 14px 38px -18px rgba(0,0,0,0.5);
}

/* ---------- Cross-sell strip ---------- */
.feat-crosssell {
    padding: 70px 0; border-block: 1px solid rgba(255,255,255,0.05);
    background: var(--bg-soft);
}
.feat-crosssell-head { text-align: center; margin-bottom: 36px; }
.feat-crosssell-head .eyebrow {
    display: inline-block; padding: 6px 12px; border-radius: 999px;
    background: rgba(59,130,246,0.10); color: #93c5fd;
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 14px;
}
.feat-crosssell-title {
    font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; color: var(--text); margin: 0;
}
.feat-crosssell-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.feat-crosssell-card {
    display: flex; flex-direction: column; gap: 8px;
    padding: 18px; border-radius: 12px;
    background: var(--card); border: 1px solid var(--border);
    text-decoration: none; transition: transform .15s, border-color .15s, background .15s;
}
.feat-crosssell-card:hover {
    transform: translateY(-2px); border-color: var(--border-bright);
    background: rgba(255,255,255,0.04);
}
.feat-crosssell-ico { font-size: 22px; line-height: 1; }
.feat-crosssell-name { font-size: 14.5px; font-weight: 600; color: var(--text); }
.feat-crosssell-tag  { font-size: 12.5px; line-height: 1.4; color: var(--muted-dim); }

/* ---------- Final CTA ---------- */
.feat-final {
    padding: 90px 0 100px;
    background:
        radial-gradient(ellipse 520px 320px at 50% 30%, rgba(37,99,235,0.16), transparent 70%),
        radial-gradient(ellipse 360px 240px at 80% 70%, rgba(124,58,237,0.12), transparent 70%);
}
.feat-final-title {
    font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; line-height: 1.12;
    letter-spacing: -0.02em; color: var(--text); margin: 0 0 12px;
}
.feat-final-sub {
    font-size: 17px; color: var(--muted); margin: 0 0 26px;
}
.feat-final-cta { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- Index page (grid of all features) ---------- */
.feat-index-hero {
    padding: 100px 0 60px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    text-align: center;
}
.feat-index-hero h1 {
    font-size: clamp(36px, 5vw, 56px); line-height: 1.08; letter-spacing: -0.025em;
    font-weight: 700; color: var(--text); margin: 0 0 18px; max-width: 900px; margin-inline: auto;
}
.feat-index-hero h1 .grad {
    background: linear-gradient(110deg, #60a5fa 0%, #a78bfa 50%, #f472b6 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.feat-index-hero p {
    font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; color: var(--muted);
    max-width: 680px; margin: 0 auto;
}
.feat-index-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
    margin-top: 0;
}
.feat-index-card {
    display: flex; flex-direction: column; gap: 10px;
    padding: 26px; border-radius: 16px;
    background: var(--card); border: 1px solid var(--border);
    text-decoration: none; transition: transform .18s, border-color .18s, box-shadow .18s;
    min-height: 180px;
}
.feat-index-card:hover {
    transform: translateY(-3px); border-color: var(--border-bright);
    box-shadow: 0 14px 36px -18px rgba(37,99,235,0.45);
}
.feat-index-card .ico {
    width: 42px; height: 42px; border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, rgba(37,99,235,0.18), rgba(124,58,237,0.18));
    border: 1px solid rgba(59,130,246,0.30);
    font-size: 22px; line-height: 1;
}
.feat-index-card .name { font-size: 17px; font-weight: 600; color: var(--text); margin-top: 6px; }
.feat-index-card .tag  { font-size: 14px; line-height: 1.5; color: var(--muted); }
.feat-index-card .more {
    font-size: 13px; color: #93c5fd; font-weight: 600;
    margin-top: auto; display: inline-flex; align-items: center; gap: 4px;
}

/* ---------- Visuals shared across pages ---------- */

/* Code-snippet block (used by API + ranking pages). */
.feat-code {
    font-family: var(--mono); font-size: 13px; line-height: 1.7;
    color: #e4e4e7; background: #0d0d14;
    border: 1px solid var(--border); border-radius: 12px;
    padding: 18px 22px; overflow-x: auto;
}
.feat-code .k { color: #c4b5fd; }     /* keyword */
.feat-code .s { color: #86efac; }     /* string */
.feat-code .c { color: var(--muted); font-style: italic; } /* comment */
.feat-code .n { color: #fbbf24; }     /* number */
.feat-code .p { color: #93c5fd; }     /* prop */

/* Stat callouts. */
.feat-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
    max-width: 960px; margin: 0 auto;
}
.feat-stat {
    padding: 26px; border-radius: 14px;
    background: var(--card); border: 1px solid var(--border);
    text-align: center;
}
.feat-stat .big {
    font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; line-height: 1;
    letter-spacing: -0.02em; margin-bottom: 6px;
    background: linear-gradient(110deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.feat-stat .lbl { font-size: 13.5px; color: var(--muted); }

/* Tag chips for plan-availability blocks. */
.feat-plans {
    display: inline-flex; gap: 8px; flex-wrap: wrap; margin-top: 8px;
}
.feat-plan-chip {
    font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
    background: rgba(59,130,246,0.10); color: #93c5fd;
    border: 1px solid rgba(59,130,246,0.25);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.feat-plan-chip.muted {
    background: rgba(255,255,255,0.04); color: var(--muted);
    border-color: var(--border);
}

/* Breadcrumb back-to. */
.feat-breadcrumb {
    font-size: 13px; color: var(--muted); margin-bottom: 18px;
}
.feat-breadcrumb a { color: var(--muted); transition: color .15s; }
.feat-breadcrumb a:hover { color: var(--text); }
.feat-breadcrumb .sep { margin: 0 6px; color: var(--muted-dim); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .feat-index-grid    { grid-template-columns: repeat(3, 1fr); }
    .feat-crosssell-grid{ grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .feat-hero { padding: 70px 0 60px; }
    .feat-hero-inner    { grid-template-columns: 1fr; gap: 32px; }
    .feat-section       { padding: 60px 0; }
    .feat-problem       { grid-template-columns: 1fr; }
    .feat-steps         { grid-template-columns: 1fr; }
    .feat-detail        { grid-template-columns: 1fr; gap: 24px; }
    .feat-detail + .feat-detail { margin-top: 48px; }
    .feat-detail.reverse { direction: ltr; }
    .feat-stats         { grid-template-columns: 1fr; }
    .feat-index-grid    { grid-template-columns: repeat(2, 1fr); }
    .feat-crosssell-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .feat-index-grid    { grid-template-columns: 1fr; }
    .feat-crosssell-grid{ grid-template-columns: 1fr; }
    .feat-hero-title    { font-size: clamp(28px, 8vw, 36px); }
}
