/* ========================================
   UNREPLUG.COM
   ======================================== */

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

:root {
    --bg: #0a0a0f;
    --bg-section: #111118;
    --bg-card: #16161f;
    --text: #e8e8ef;
    --text-muted: #888899;
    --accent: #00d4ff;
    --accent-glow: rgba(0, 212, 255, 0.3);
    --accent-dim: rgba(0, 212, 255, 0.1);
    --yellow: #ffd700;
    --green: #00ff88;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    overflow-x: hidden;
}

.container { max-width: 750px; margin: 0 auto; }

/* ---- HERO ---- */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

/* ---- TV UNIT + PLUG ANIMATION ---- */

.tv-unit {
    position: relative;
    margin-bottom: 2rem;
    width: 500px;
    padding-top: 100px; /* room for plug above */
}

/* The plug assembly */
.tv-plug {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: unreplug-pull 6s ease-in-out infinite;
    z-index: 3;
}

.tv-plug-cord {
    width: 6px;
    height: 35px;
    background: var(--text-muted);
}

.tv-plug-body {
    width: 60px;
    height: 28px;
    background: var(--text-muted);
    border-radius: 6px 6px 0 0;
}

.tv-plug-prongs {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.tv-plug-prong {
    width: 10px;
    height: 30px;
    background: var(--text);
    border-radius: 0 0 3px 3px;
}

/* Socket at top of screen */
.tv-socket {
    position: absolute;
    top: 78px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 20px;
    background: #1a1a24;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 2;
}

.tv-socket-slot {
    width: 8px;
    height: 14px;
    background: var(--bg);
    border-radius: 3px;
}

/* The screen */
.tv-screen {
    position: relative;
    width: 500px;
    height: 500px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.15);
    background: #000;
}

.tv-screen iframe {
    display: block;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

/* Static overlay - visible during flicker */
.tv-static {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 2px,
        rgba(255, 255, 255, 0.03) 4px
    );
    opacity: 0;
    animation: static-flicker 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* Black screen overlay - visible when "off" */
.tv-off {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0;
    animation: screen-off 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* Plug pulls up, pauses, comes back down */
@keyframes unreplug-pull {
    0%   { transform: translateX(-50%) translateY(0); }
    15%  { transform: translateX(-50%) translateY(0); }
    /* Pull out */
    22%  { transform: translateX(-50%) translateY(-65px); }
    /* Stay out */
    55%  { transform: translateX(-50%) translateY(-65px); }
    /* Plug back in */
    62%  { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(0); }
}

/* Static flickers when unplugging and replugging */
@keyframes static-flicker {
    0%   { opacity: 0; }
    15%  { opacity: 0; }
    /* Unplug flicker */
    18%  { opacity: 1; }
    20%  { opacity: 0.5; }
    21%  { opacity: 1; }
    22%  { opacity: 0; }
    /* Replug flicker */
    58%  { opacity: 0; }
    59%  { opacity: 1; }
    60%  { opacity: 0.3; }
    61%  { opacity: 1; }
    62%  { opacity: 0.5; }
    64%  { opacity: 0; }
    100% { opacity: 0; }
}

/* Screen goes dark while unplugged */
@keyframes screen-off {
    0%   { opacity: 0; }
    15%  { opacity: 0; }
    /* Flicker off */
    19%  { opacity: 0; }
    20%  { opacity: 0.7; }
    21%  { opacity: 0.4; }
    22%  { opacity: 1; }
    /* Stay off */
    58%  { opacity: 1; }
    /* Flicker back on */
    59%  { opacity: 0.6; }
    60%  { opacity: 1; }
    61%  { opacity: 0.3; }
    62%  { opacity: 0.7; }
    63%  { opacity: 0.2; }
    64%  { opacity: 0; }
    100% { opacity: 0; }
}

.rubin-caption {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.hero-title {
    font-size: clamp(4rem, 15vw, 10rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--accent), var(--green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 40px var(--accent-glow));
    margin-bottom: 0.5rem;
    animation: title-power 6s ease-in-out infinite;
}

@keyframes title-power {
    0%   { opacity: 1; filter: drop-shadow(0 0 40px var(--accent-glow)); }
    15%  { opacity: 1; filter: drop-shadow(0 0 40px var(--accent-glow)); }
    19%  { opacity: 0.5; }
    20%  { opacity: 0.2; }
    21%  { opacity: 0.1; }
    22%  { opacity: 0; filter: drop-shadow(0 0 0px transparent); }
    58%  { opacity: 0; filter: drop-shadow(0 0 0px transparent); }
    59%  { opacity: 0.3; }
    60%  { opacity: 0; }
    61%  { opacity: 0.6; }
    62%  { opacity: 0.2; }
    63%  { opacity: 0.8; }
    64%  { opacity: 1; filter: drop-shadow(0 0 40px var(--accent-glow)); }
    100% { opacity: 1; filter: drop-shadow(0 0 40px var(--accent-glow)); }
}

.hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--text);
    font-weight: 400;
    letter-spacing: 0.05em;
}

.hero-sub {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: var(--text-muted);
    font-weight: 300;
    margin-top: 0.5rem;
}

/* ---- PLUG ANIMATION ---- */

.plug-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
}

.plug {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: unreplug 4s ease-in-out infinite;
}

.plug-prong {
    width: 8px;
    height: 30px;
    background: var(--text);
    border-radius: 2px;
    display: inline-block;
    margin: 0 6px;
}

.plug-body {
    width: 40px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 0 0 6px 6px;
    margin: 0 auto;
}

.plug-cord {
    width: 4px;
    height: 25px;
    background: var(--text-muted);
    margin: 0 auto;
    border-radius: 0 0 2px 2px;
}

.outlet {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 40px;
    background: var(--bg-section);
    border: 2px solid var(--text-muted);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.outlet-slot {
    width: 6px;
    height: 18px;
    background: var(--bg);
    border-radius: 3px;
}

@keyframes unreplug {
    0%   { transform: translateX(-50%) translateY(0); }
    20%  { transform: translateX(-50%) translateY(0); }
    35%  { transform: translateX(-50%) translateY(-35px); }
    50%  { transform: translateX(-50%) translateY(-35px); }
    65%  { transform: translateX(-50%) translateY(0); }
    100% { transform: translateX(-50%) translateY(0); }
}

/* ---- SECTIONS ---- */

section {
    padding: 5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.section-sub {
    text-align: center;
    color: var(--text-muted);
    margin-top: -1rem;
    margin-bottom: 2rem;
}

.narrative p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* ---- REACTION QUOTE ---- */

.section-reaction {
    padding: 3rem 2rem;
    border-top: none;
}

.reaction-quote {
    text-align: center;
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.6;
}

/* ---- DICTIONARY ENTRY ---- */

.section-def {
    padding-top: 4rem;
}

.dict-entry {
    background: var(--bg-section);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 2.5rem;
}

.dict-word {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.dict-phonetic {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.dict-definitions {
    padding-left: 1.5rem;
}

.dict-definitions li {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.dict-example {
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 2px solid var(--accent-dim);
}

/* ---- THE MATH ---- */

.math-demo {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.math-before, .math-after {
    background: var(--bg-section);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.5rem 2rem;
}

.math-before p {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: rgba(255, 100, 100, 0.4);
}

.math-after {
    border-color: var(--accent-dim);
}

.math-after p {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green);
}

.math-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.word-count {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.5rem;
    opacity: 0.6;
}

.math-arrow-big {
    font-size: 2rem;
    color: var(--accent);
    margin: 1rem 0;
}

.math-footnote {
    text-align: center;
    color: var(--text-muted);
    margin-top: 1.5rem;
    font-size: 0.95rem;
}

/* ---- FUN FACTS ---- */

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.fact-card {
    background: var(--bg-section);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 2rem;
}

.fact-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.fact-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ---- CONJUGATION ---- */

.conj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.conj-item {
    background: var(--bg-section);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
}

.conj-form {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.15rem;
}

.conj-note {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.conj-example {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    opacity: 0.7;
}

.conj-bonus {
    text-align: center;
    color: var(--text-muted);
    margin-top: 1.5rem;
}

.conj-bonus strong {
    color: var(--green);
}

/* ---- USAGE EXAMPLES ---- */

.example-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.example-card {
    background: var(--bg-section);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 1.75rem;
    transition: transform 0.2s, border-color 0.2s;
}

.example-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-dim);
}

.example-quote {
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.example-context {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

/* ---- SCIENCE ---- */

.section-science .narrative p {
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- HARD FORK SHOUTOUT ---- */

.section-shoutout {
    border-top: none;
    padding: 2rem 2rem 0;
}

.shoutout-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem;
    border: 1px dashed rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    background: rgba(255, 215, 0, 0.03);
}

.shoutout-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.shoutout-tag {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--yellow);
    font-style: italic;
}

/* ---- BACKSTORY TEASER ---- */

.section-backstory {
    border-top: none;
    padding-top: 2rem;
}

.backstory-card {
    background: var(--bg-section);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
}

.backstory-card h2 {
    margin-bottom: 1rem;
}

.backstory-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.rabbit-hole {
    border-color: rgba(255, 255, 255, 0.03);
    background: rgba(255, 255, 255, 0.015);
}

.rabbit-hole-label {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.08);
    margin-bottom: 1.5rem;
    font-family: monospace;
}

.rabbit-hole-text {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.95rem;
}

.rabbit-hole:hover .rabbit-hole-text {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.8s ease;
}

.rabbit-hole:hover .rabbit-hole-label {
    color: rgba(255, 255, 255, 0.15);
    transition: color 0.8s ease;
}

.rabbit-hole-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.15);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    font-family: monospace;
    transition: color 0.5s ease;
}

.rabbit-hole:hover .rabbit-hole-link {
    color: var(--accent);
}

.btn-company {
    display: inline-block;
    padding: 0.75rem 2rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--accent);
    border-radius: 50px;
    transition: all 0.2s;
}

.btn-company:hover {
    background: var(--accent);
    color: var(--bg);
}

/* ---- AD SLOTS ---- */

.ad-slot {
    max-width: 728px;
    margin: 0 auto;
    padding: 1rem 2rem;
    border-top: none;
}

.ad-placeholder {
    border: 1px dashed var(--text-muted);
    border-radius: 8px;
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.2;
}

/* ---- SPREAD THE WORD ---- */

.spread { text-align: center; }

.spread-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, opacity 0.2s;
}

.share-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.share-twitter { background: #1d9bf0; color: #fff; }
.share-facebook { background: #1877f2; color: #fff; }
.share-reddit { background: #ff4500; color: #fff; }
.share-copy {
    background: var(--bg-section);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.merriam-cta {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.merriam-cta p { color: var(--text-muted); margin-bottom: 1rem; }

.btn-merriam {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--accent), var(--green));
    color: var(--bg);
    text-decoration: none;
    font-weight: 700;
    border-radius: 50px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-merriam:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

/* ---- FOOTER ---- */

.footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-credit { font-size: 1rem; color: var(--text-muted); margin-bottom: 0.5rem; }

.footer-links a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover { text-decoration: underline; }
.footer-copy { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.5rem; opacity: 0.5; }

/* ---- SCROLL REVEAL ---- */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

/* ---- RESPONSIVE ---- */

@media (max-width: 600px) {
    section { padding: 3rem 1.5rem; }
    .dict-entry { padding: 1.5rem; }
    .dict-word { font-size: 1.8rem; }
    .facts-grid { grid-template-columns: 1fr; }
    .example-cards { grid-template-columns: 1fr; }
    .conj-grid { grid-template-columns: repeat(2, 1fr); }
    .share-buttons { flex-direction: column; align-items: center; }
    .share-btn { width: 100%; max-width: 250px; justify-content: center; }
}
