/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg:        #1a1a1a;
    --bg-soft:   #242424;
    --text:     #f2f2f2;
    --text-dim: #a0a0a0;
    --accent:   #d70010;
    --accent-hover: #ff1a2b;
    --max-width: 960px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    position: relative;
    overflow-x: hidden;
}

/* ---------- Scan line effect ---------- */
body::before {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(215, 0, 16, 0.15) 20%,
        var(--accent) 50%,
        rgba(215, 0, 16, 0.15) 80%,
        transparent 100%
    );
    box-shadow: 0 0 12px rgba(215, 0, 16, 0.6),
                0 0 24px rgba(215, 0, 16, 0.3);
    pointer-events: none;
    z-index: 9999;
    animation: scan 6s linear infinite;
}

@keyframes scan {
    0%   { transform: translateY(0); opacity: 0; }
    5%   { opacity: 1; }
    95%  { opacity: 1; }
    100% { transform: translateY(100vh); opacity: 0; }
}

/* ---------- Layout ---------- */
header,
main,
footer {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4rem;
    padding-block: 4rem;
}

/* ---------- Header ---------- */
header {
    text-align: center;
    animation: fadeDown 0.8s ease-out;
}

header h1 {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    letter-spacing: 0.15em;
    color: var(--text);
}

header h1::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent);
    margin: 1rem auto 1.25rem;
    border-radius: 2px;
    transition: width 0.4s ease;
}

header:hover h1::after {
    width: 160px;
}

header p {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

/* ---------- Main sections ---------- */
main section {
    text-align: center;
    animation: fadeUp 0.9s ease-out;
}

main section h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 600;
    margin-bottom: 1rem;
}

main section h3 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

main section p {
    color: var(--text-dim);
    font-size: 1.1rem;
}

/* Animated dots after "Muy pronto" */
main section p::after {
    content: "";
    display: inline-block;
    width: 1.2em;
    text-align: left;
    animation: dots 1.6s steps(4, end) infinite;
}

/* ---------- Contact list ---------- */
main section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

main section ul li {
    color: var(--text-dim);
}

main section ul a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}

main section ul a:hover,
main section ul a:focus {
    color: var(--accent-hover);
    border-bottom-color: var(--accent-hover);
}

/* ---------- Footer ---------- */
footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--bg-soft);
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* ---------- Animations ---------- */
@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes dots {
    0%   { content: ""; }
    25%  { content: "."; }
    50%  { content: ".."; }
    75%  { content: "..."; }
    100% { content: ""; }
}

/* ---------- Responsive tweaks ---------- */
@media (max-width: 480px) {
    body { padding: 1.5rem 1rem; }
    main { gap: 3rem; padding-block: 2rem; }
}

/* ---------- Reduce motion for accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
