/* RedHaze Group Portal · Apple-flavoured stylesheet.
 *
 * Goal: deliver an apple.com-style group landing page that visually sells
 * a pan-industry conglomerate (Entertainment / Finance / Energy) without
 * looking like a hacker-y benchmark dashboard. Pairs with carousel.js for
 * the three industry carousels and IntersectionObserver-driven reveals.
 */

:root {
    --hue-bg: #f5f5f7;
    --hue-bg-strong: #ffffff;
    --hue-bg-deep: #000000;
    --hue-ink: #1d1d1f;
    --hue-ink-soft: #515154;
    --hue-ink-muted: #86868b;
    --hue-line: rgba(0, 0, 0, 0.08);
    --hue-accent: #dc1e34;
    --hue-accent-soft: rgba(220, 30, 52, 0.12);
    --hue-blue: #0071e3;
    --hue-blue-hover: #0077ed;
    --hue-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.3);
    --hue-shadow-soft: 0 12px 30px -16px rgba(0, 0, 0, 0.18);

    --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Display",
        "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei UI", "Microsoft YaHei", Roboto, Helvetica, Arial,
        sans-serif;

    --pad-x: clamp(20px, 4vw, 64px);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--hue-bg);
    color: var(--hue-ink);
    font-family: var(--font-stack);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
}

a {
    color: var(--hue-blue);
    text-decoration: none;
    transition: opacity 0.15s ease, color 0.15s ease;
}

a:hover {
    color: var(--hue-blue-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
}

/* ---------- Glass nav (sticky) ---------- */

.apple-nav {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.apple-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--pad-x);
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.apple-nav .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--hue-ink);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.2px;
}

.apple-nav .nav-brand img {
    width: 26px;
    height: 26px;
    border-radius: 7px;
}

.apple-nav .nav-brand span.zh {
    font-weight: 600;
}

.apple-nav .nav-brand span.en {
    color: var(--hue-ink-muted);
    font-weight: 400;
    font-size: 12.5px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.apple-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.apple-nav .nav-links a {
    color: var(--hue-ink-soft);
    font-size: 13px;
    letter-spacing: 0.2px;
}

.apple-nav .nav-links a:hover {
    color: var(--hue-ink);
    text-decoration: none;
}

.apple-nav .nav-cta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.apple-nav .nav-meta {
    color: var(--hue-ink-muted);
    font-size: 11.5px;
    letter-spacing: 0.4px;
}

.btn-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--hue-ink);
    color: #ffffff;
    font-size: 12.5px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn-pill:hover {
    opacity: 0.88;
    text-decoration: none;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-pill.primary {
    background: var(--hue-blue);
}

.btn-pill.primary:hover {
    background: var(--hue-blue-hover);
}

.btn-pill.outline {
    background: transparent;
    color: var(--hue-ink);
    border: 1px solid var(--hue-line);
}

.btn-pill.outline:hover {
    background: rgba(0, 0, 0, 0.04);
}

.btn-pill.accent {
    background: var(--hue-accent);
}

@media (max-width: 720px) {
    .apple-nav .nav-links {
        display: none;
    }
}

/* ---------- Hero ---------- */

.apple-hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: clamp(70px, 12vh, 140px) var(--pad-x) clamp(60px, 10vh, 110px);
    background:
        radial-gradient(80vmin 60vmin at 18% 20%, rgba(220, 30, 52, 0.10), transparent 70%),
        radial-gradient(70vmin 50vmin at 82% 0%, rgba(0, 113, 227, 0.10), transparent 75%),
        linear-gradient(180deg, #ffffff 0%, var(--hue-bg) 100%);
}

.apple-hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--hue-accent);
    font-size: 13px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 18px;
}

.apple-hero .eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hue-accent);
    box-shadow: 0 0 14px rgba(220, 30, 52, 0.6);
}

.apple-hero h1 {
    margin: 0 auto 18px;
    max-width: 1000px;
    font-size: clamp(42px, 6.6vw, 92px);
    line-height: 1.04;
    letter-spacing: -0.025em;
    font-weight: 700;
    color: var(--hue-ink);
}

.apple-hero h1 .grad {
    background: linear-gradient(90deg, #dc1e34 0%, #ff6a3d 45%, #ffb648 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.apple-hero .lead {
    margin: 0 auto;
    max-width: 740px;
    font-size: clamp(15px, 1.6vw, 19px);
    line-height: 1.65;
    color: var(--hue-ink-soft);
}

.apple-hero .cta-row {
    margin-top: 28px;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.apple-hero .cta-row .btn-pill {
    padding: 11px 22px;
    font-size: 14px;
    border-radius: 999px;
}

/* ---------- Stat strip ---------- */

.apple-stats {
    background: var(--hue-bg);
    padding: 28px var(--pad-x) 8px;
}

.stat-grid {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--hue-line);
    border-radius: 22px;
    padding: 22px 24px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hue-shadow-soft);
}

.stat-card .stat-num {
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--hue-ink);
}

.stat-card .stat-num small {
    font-size: 16px;
    color: var(--hue-ink-muted);
    margin-left: 4px;
    font-weight: 500;
}

.stat-card .stat-label {
    margin-top: 6px;
    font-size: 13px;
    color: var(--hue-ink-soft);
    letter-spacing: 0.2px;
}

/* ---------- Section header ---------- */

.section-shell {
    padding: clamp(60px, 9vh, 110px) var(--pad-x);
    max-width: 1280px;
    margin: 0 auto;
}

.section-shell .section-eyebrow {
    color: var(--hue-accent);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-shell h2 {
    margin: 0 0 14px;
    font-size: clamp(32px, 4.2vw, 56px);
    line-height: 1.08;
    letter-spacing: -0.02em;
    font-weight: 700;
    color: var(--hue-ink);
}

.section-shell .section-lead {
    margin: 0 0 28px;
    max-width: 720px;
    color: var(--hue-ink-soft);
    font-size: clamp(14px, 1.4vw, 17px);
    line-height: 1.65;
}

/* ---------- Carousel ---------- */

.carousel {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 7;
    box-shadow: var(--hue-shadow);
}

.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.32, 0.72, 0, 1);
    will-change: transform;
}

.carousel-slide {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
    overflow: hidden;
    background: #111;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    transition: transform 7s ease-out, opacity 0.5s;
}

.carousel-slide.is-active img {
    transform: scale(1.0);
}

.carousel-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.05) 40%,
        rgba(0, 0, 0, 0.55) 80%,
        rgba(0, 0, 0, 0.75) 100%);
    pointer-events: none;
}

.carousel-caption {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    padding: clamp(22px, 4vw, 48px);
    color: #ffffff;
    pointer-events: none;
}

.carousel-caption .badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 12px;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.carousel-caption h3 {
    margin: 0 0 6px;
    font-size: clamp(22px, 3.2vw, 40px);
    letter-spacing: -0.015em;
    line-height: 1.1;
    font-weight: 700;
}

.carousel-caption p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(13px, 1.3vw, 16px);
    max-width: 620px;
    line-height: 1.6;
}

.carousel-controls {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    z-index: 3;
}

.carousel-arrow {
    pointer-events: auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.15s ease, transform 0.12s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.carousel-arrow:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.05);
}

.carousel-dots {
    position: absolute;
    z-index: 3;
    left: 0; right: 0;
    bottom: 14px;
    display: flex;
    justify-content: center;
    gap: 7px;
    pointer-events: none;
}

.carousel-dot {
    pointer-events: auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
    transition: width 0.25s ease, background 0.2s ease;
    padding: 0;
}

.carousel-dot.is-active {
    background: #ffffff;
    width: 22px;
    border-radius: 999px;
}

@media (max-width: 720px) {
    .carousel { aspect-ratio: 4 / 3; }
    .carousel-arrow { width: 36px; height: 36px; font-size: 14px; }
}

/* ---------- Industry section variants ---------- */

.industry-cards {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.industry-card {
    background: #ffffff;
    border: 1px solid var(--hue-line);
    border-radius: 18px;
    padding: 20px 22px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.industry-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: var(--hue-shadow-soft);
}

.industry-card .pill {
    display: inline-block;
    margin-bottom: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--hue-accent-soft);
    color: var(--hue-accent);
    font-size: 11.5px;
    letter-spacing: 0.4px;
    font-weight: 600;
    text-transform: uppercase;
}

.industry-card h4 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: var(--hue-ink);
}

.industry-card p {
    margin: 0;
    color: var(--hue-ink-soft);
    font-size: 13px;
    line-height: 1.6;
}

/* ---------- Live systems chips ---------- */

.live-systems {
    background: var(--hue-bg-strong);
}

.live-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.live-empty {
    color: var(--hue-ink-muted);
    font-size: 13px;
    background: var(--hue-bg);
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px dashed var(--hue-line);
    width: 100%;
}

.live-row {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border: 1px solid var(--hue-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--hue-ink);
    text-decoration: none;
    transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.live-row:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 0, 0, 0.18);
    box-shadow: var(--hue-shadow-soft);
    text-decoration: none;
    color: var(--hue-ink);
}

.live-row .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #34c759;
    box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.55);
    animation: live-pulse 1.6s infinite;
}

@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(52, 199, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

.live-row .name {
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.live-row .name small {
    color: var(--hue-ink-muted);
    font-weight: 400;
    margin-left: 6px;
}

/* ---------- Onboarding timeline ---------- */

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.timeline li {
    position: relative;
    padding: 14px 0 14px 28px;
    border-left: 2px solid var(--hue-line);
    color: var(--hue-ink-soft);
    font-size: 14px;
    line-height: 1.65;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 18px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--hue-accent);
    box-shadow: 0 0 0 4px var(--hue-bg-strong);
}

.timeline li b {
    color: var(--hue-ink);
    margin-right: 10px;
    font-weight: 700;
}

/* ---------- Footer ---------- */

.apple-footer {
    background: var(--hue-bg);
    padding: 36px var(--pad-x) 28px;
    border-top: 1px solid var(--hue-line);
    color: var(--hue-ink-muted);
    font-size: 12px;
    text-align: center;
}

.apple-footer .row {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.apple-footer a {
    color: var(--hue-ink-soft);
}

.apple-footer .copyright {
    letter-spacing: 0.4px;
}

/* ---------- IntersectionObserver reveal ---------- */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.21, 0.61, 0.35, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Section dark hero (large product-like blocks) ---------- */

.spotlight {
    margin: 0 var(--pad-x);
    border-radius: 28px;
    overflow: hidden;
    background: #0b0b0c;
    color: #ffffff;
    box-shadow: var(--hue-shadow);
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    min-height: 320px;
}

.spotlight .copy {
    padding: clamp(28px, 4vw, 56px);
}

.spotlight .copy .badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.86);
    font-size: 11.5px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.spotlight h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 3.6vw, 44px);
    letter-spacing: -0.02em;
    font-weight: 700;
    line-height: 1.12;
}

.spotlight p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.65;
    font-size: 15px;
}

.spotlight .visual {
    height: 100%;
    background-position: center;
    background-size: cover;
    min-height: 320px;
}

@media (max-width: 900px) {
    .spotlight { grid-template-columns: 1fr; }
    .spotlight .visual { min-height: 220px; }
}
