/* =========================================================
   MADLY Media — dark theme (MADLY Techcorp brand family)
   Sibling of the parent site; distinct amber accent.
   ========================================================= */

:root {
    --bg:        #070709;
    --bg-soft:   #0d0d12;
    --panel:     rgba(255, 255, 255, 0.035);
    --panel-bd:  rgba(255, 255, 255, 0.08);
    --text:      #e8e8ee;
    --muted:     #9b9bab;
    --faint:     #6a6a78;

    --accent:      #f5a524;   /* amber — Media's own accent */
    --accent-deep: #f5a524;   /* button fill */
    --accent-soft: rgba(245, 165, 36, 0.5);
    --accent-tint: rgba(245, 165, 36, 0.08);

    --maxw: 1140px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

::selection { background: rgba(245, 165, 36, 0.32); color: #fff; }

/* ---------- Animated background ---------- */
.bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: var(--bg);
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    will-change: transform;
    animation: float 28s infinite ease-in-out;
}
.orb-1 { width: 440px; height: 440px; background: var(--accent); top: -150px; right: -130px; }
.orb-2 { width: 360px; height: 360px; background: var(--accent); bottom: -130px; left: -110px; animation-delay: -10s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(36px, -30px) scale(1.05); }
    66%      { transform: translate(-22px, 22px) scale(0.96); }
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem clamp(1.25rem, 5vw, 3rem);
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(7, 7, 9, 0.7);
    border-bottom: 1px solid var(--panel-bd);
}

.brand { display: flex; align-items: center; }
.brand-logo {
    height: clamp(38px, 4.5vw, 50px);
    width: auto;
    display: block;
}

.nav { display: flex; align-items: center; gap: 1.6rem; font-size: 0.92rem; }
.nav a { color: var(--muted); transition: color 0.2s; }
.nav a:hover { color: var(--text); }
.nav-cta {
    color: var(--text) !important;
    border: 1px solid var(--panel-bd);
    padding: 0.45rem 1.05rem;
    border-radius: 999px;
    transition: border-color 0.2s, background 0.2s;
}
.nav-cta:hover { border-color: var(--accent-soft); background: var(--accent-tint); }

/* ---------- Layout ---------- */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 3rem); }

.section { padding: clamp(5rem, 12vw, 8.5rem) 0; }

.section-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.8rem, 4.5vw, 2.9rem);
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.15;
}
.section-lead {
    color: var(--muted);
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    max-width: 58ch;
    margin-top: 0.9rem;
}
.section-lead strong { color: var(--text); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.6rem;
    padding: 7rem 0 4rem;
}

.eyebrow {
    font-size: 0.82rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 500;
}

.hero-title {
    font-family: 'Sora', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5.4rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -2px;
    color: #fff;
    max-width: 18ch;
}
.hero-title .ac { color: var(--accent); }

.hero-sub {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    color: var(--muted);
    max-width: 60ch;
    font-weight: 300;
}
.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 0.6rem; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.95rem 1.9rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.98rem;
    transition: transform 0.25s var(--ease), background 0.25s, border-color 0.25s;
}
.btn-primary {
    background: var(--accent);
    color: #1a1205;
}
.btn-primary:hover { transform: translateY(-3px); background: #ffb73d; }
.btn-ghost {
    border: 1px solid var(--panel-bd);
    color: var(--text);
    background: var(--panel);
}
.btn-ghost:hover { border-color: var(--accent-soft); transform: translateY(-3px); }

.hero-note {
    color: var(--faint);
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

/* ---------- Cards ---------- */
.cards {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}
.card {
    position: relative;
    padding: 2.1rem 1.8rem;
    border-radius: 18px;
    background: var(--panel);
    border: 1px solid var(--panel-bd);
    overflow: hidden;
    transition: transform 0.3s var(--ease), border-color 0.3s, background 0.3s;
}
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--accent-tint);
    opacity: 0;
    transition: opacity 0.3s;
}
.card:hover { transform: translateY(-6px); border-color: var(--accent-soft); }
.card:hover::before { opacity: 1; }
.card-no {
    font-family: 'Sora', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent);
}
.card h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0.7rem 0 0.6rem;
    position: relative;
}
.card p { color: var(--muted); font-size: 0.97rem; position: relative; }

/* ---------- Steps ---------- */
.steps {
    margin-top: 3rem;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.step {
    display: flex;
    gap: 1.4rem;
    align-items: flex-start;
    padding: 1.7rem 1.8rem;
    border-radius: 16px;
    background: var(--panel);
    border: 1px solid var(--panel-bd);
    transition: border-color 0.3s, transform 0.3s var(--ease);
}
.step:hover { border-color: var(--accent-soft); transform: translateX(4px); }
.step-no {
    flex: none;
    width: 38px; height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    color: var(--accent);
    border: 1px solid var(--accent-soft);
}
.step h3 {
    font-family: 'Sora', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.step p { color: var(--muted); font-size: 0.97rem; }

/* ---------- Engine flow (1 episode -> a week) ---------- */
.engine-flow {
    margin-top: 3rem;
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 1.5rem;
    align-items: center;
}
.engine-in, .engine-out {
    padding: 1.8rem;
    border-radius: 16px;
    background: var(--panel);
    border: 1px solid var(--panel-bd);
}
.engine-in { text-align: center; }
.engine-in p {
    font-family: 'Sora', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0.5rem 0;
}
.engine-tag {
    font-size: 0.78rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}
.engine-sub { color: var(--faint); font-size: 0.9rem; }
.engine-arrow {
    font-size: 2rem;
    color: var(--accent);
    font-weight: 700;
}
.engine-out { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.engine-out li { color: var(--muted); font-size: 0.97rem; padding-left: 1.5rem; position: relative; }
.engine-out li:first-child {
    padding-left: 0;
    margin-bottom: 0.3rem;
    color: var(--accent);
}
.engine-out li:not(:first-child)::before {
    content: "+";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* ---------- Founder ---------- */
.founder-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: clamp(2rem, 6vw, 4.5rem);
    align-items: center;
}
.founder-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 20px;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--panel-bd);
    display: grid;
    place-items: center;
}
.founder-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 18%;
    z-index: 1;            /* photo always covers the fallback monogram */
}
.founder-initial {
    position: absolute;
    z-index: 0;            /* only visible if the <img> is removed onerror */
    font-family: 'Sora', sans-serif;
    font-size: 6rem;
    font-weight: 800;
    color: var(--accent);
    opacity: 0.85;
}
.founder .section-lead { margin-top: 1rem; }
.founder-mail {
    display: inline-block;
    margin-top: 1.4rem;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    color: var(--accent);
    transition: letter-spacing 0.25s var(--ease);
}
.founder-mail:hover { letter-spacing: 0.5px; }

/* ---------- Fit (about) ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}
.fit-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.fit-list {
    list-style: none;
    padding: 1.5rem;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid var(--panel-bd);
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    font-size: 0.95rem;
}
.fit-list li { padding-left: 1.6rem; position: relative; color: var(--muted); }
.fit-list li::before { position: absolute; left: 0; font-weight: 700; }
.fit-list.yes li::before { content: "✓"; color: var(--accent); }
.fit-list.no  li::before { content: "✕"; color: var(--faint); }
.fit-list.no li { text-decoration: line-through; text-decoration-color: var(--faint); }

/* ---------- Contact ---------- */
.contact { text-align: center; display: flex; flex-direction: column; align-items: center; }
.contact .eyebrow { margin-bottom: 0.6rem; }
.contact .section-lead { margin-left: auto; margin-right: auto; }

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 2.2rem;
    padding: 1.05rem 2.1rem;
    border-radius: 999px;
    background: var(--panel);
    border: 1px solid var(--panel-bd);
    color: var(--text);
    font-size: 1.02rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.25s var(--ease), border-color 0.25s, background 0.25s;
}
.email-link svg { stroke: var(--accent); transition: transform 0.25s; }
.email-link:hover {
    transform: translateY(-3px);
    border-color: var(--accent-soft);
    background: var(--accent-tint);
}
.email-link:hover svg { transform: scale(1.12); }
.email-link.copied { border-color: #22c55e; color: #d6ffe4; }
.email-link.copied svg { stroke: #22c55e; }
.contact-note { color: var(--faint); font-size: 0.9rem; margin-top: 1.3rem; }

/* ---------- Value banner ---------- */
.value-banner {
    margin-top: 2.5rem;
    padding: 1.8rem 2rem;
    border-radius: 16px;
    background: var(--accent-tint);
    border: 1px solid var(--accent-soft);
    border-left: 4px solid var(--accent);
    color: var(--text);
    font-family: 'Sora', sans-serif;
    font-size: clamp(1.05rem, 1.8vw, 1.3rem);
    font-weight: 600;
    line-height: 1.5;
    max-width: 70ch;
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--panel-bd);
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1.8rem clamp(1.25rem, 5vw, 3rem);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    color: var(--faint);
    font-size: 0.85rem;
}
.footer-slogan { color: var(--accent); font-weight: 600; }

/* ---------- Reveal animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .nav a:not(.nav-cta) { display: none; }
    .about-grid { grid-template-columns: 1fr; }
    .fit-cols { grid-template-columns: 1fr; }
    .hero { padding-top: 6rem; }
    .engine-flow { grid-template-columns: 1fr; }
    .engine-arrow { transform: rotate(90deg); justify-self: center; }
    .founder-grid { grid-template-columns: 1fr; justify-items: start; }
    .founder-photo { width: 200px; }
}

@media (prefers-reduced-motion: reduce) {
    .orb { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}
