/* ── site.css ──
   Shared styles for every page of redtapestudio.dev: tokens, header, footer,
   language switch, buttons, cards and scroll reveal. Page-specific styles live
   next to each page (e.g. assets/css/home.css, sale-a-devolver/style.css). */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;0,900;1,700;1,900&family=Inter:wght@400;500;600;700&display=swap');

/* ── Tokens ── */
:root {
    --bg-color: #F8F9FA;
    --card-bg: #FFFFFF;
    --paper: #FBF7EE;
    --paper-border: #E6DCC6;
    --ink: #0B0B0C;
    --accent: #D32F2F;
    --accent-dark: #A00000;
    --accent-soft: rgba(211, 47, 47, 0.06);
    --accent-line: rgba(211, 47, 47, 0.25);
    --plan: #E67E22;
    --text-main: #1A1A1A;
    --text-muted: #4A4A4A;
    --text-on-dark: #F2F2F2;
    --text-on-dark-muted: #A8A8A8;
    --border-color: #E0E0E0;

    --font-heading: 'Playfair Display', Georgia, serif;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-card: 0 20px 40px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02);
    --shadow-card-hover: 0 30px 60px rgba(0,0,0,0.08), 0 2px 5px rgba(0,0,0,0.03);
    --header-h: 76px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

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

img, video { max-width: 100%; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    z-index: 300;
    background: var(--accent);
    color: #FFFFFF;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus { top: 1rem; }

/* ── Language: only the active one is shown ── */
html[data-lang="es"] [lang="en"],
html[data-lang="en"] [lang="es"] { display: none !important; }

/* ── Header ── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-h);
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(248, 249, 250, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
    text-decoration: none;
}

.brand img {
    height: 40px;
    width: auto;
    transition: opacity 0.4s ease;
}

.brand-name {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.brand-name b { color: var(--accent); font-weight: 900; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-nav {
    display: flex;
    gap: 1.75rem;
}

.site-nav a {
    position: relative;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.site-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s var(--ease-out);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--accent); }

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { transform: scaleX(1); }

.lang-toggle {
    display: flex;
    border: 1px solid rgba(211, 47, 47, 0.35);
    border-radius: 4px;
    overflow: hidden;
}

.lang-toggle button {
    background: none;
    border: none;
    padding: 0.35rem 0.7rem;
    font: 600 0.75rem var(--font-main);
    letter-spacing: 0.1em;
    color: var(--accent);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-toggle button[aria-pressed="true"] {
    background: var(--accent);
    color: #FFFFFF;
}

/* Header over a dark hero: light text, no light glass */
.site-header.on-dark {
    background: rgba(11, 11, 12, 0.35);
    border-bottom-color: rgba(255,255,255,0.06);
}

.site-header.on-dark .brand,
.site-header.on-dark .site-nav a { color: var(--text-on-dark); }
.site-header.on-dark .site-nav a:hover { color: #FFFFFF; }
.site-header.on-dark .brand img { opacity: 0; }

/* ── Sections ── */
.section {
    padding: 8rem 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.25rem);
    font-weight: 900;
    margin-bottom: 1.25rem;
    letter-spacing: -0.015em;
    line-height: 1.12;
}

.section-title em {
    color: var(--accent);
    font-style: italic;
}

.section-desc {
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    color: var(--text-muted);
    max-width: 720px;
    margin: 0 auto;
}

.eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border: 1px solid rgba(211, 47, 47, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ── Scroll reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ── Buttons ── */
.cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--accent);
    color: #FFFFFF;
    padding: 1rem 2.25rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.btn:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
    border-color: rgba(211, 47, 47, 0.4);
    box-shadow: none;
}

.btn-ghost:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.text-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.text-link:hover { color: var(--accent-dark); }

.text-link .arrow {
    display: inline-block;
    transition: transform 0.3s var(--ease-out);
}

.text-link:hover .arrow { transform: translateX(4px); }

/* ── Cards ── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
    margin-top: 3.5rem;
}

.card {
    background-color: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: left;
    box-shadow: var(--shadow-card);
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
    border-color: rgba(211, 47, 47, 0.3);
}

.card-num {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
}

.card h3 {
    font-family: var(--font-heading);
    margin-bottom: 0.9rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.75;
}

/* Status dot ("Active development", "Pre-production") */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    color: var(--accent);
}

.status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status-live::before { animation: pulse 2s ease-in-out infinite; }
.status-plan { color: var(--plan); }

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.45); }
    50% { box-shadow: 0 0 0 6px rgba(211, 47, 47, 0); }
}

/* ── Key / value facts ── */
.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.meta-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    font-weight: 600;
}

.meta-val {
    font-size: 0.95rem;
    font-weight: 600;
}

/* ── Lightbox (any [data-lightbox] button holding an img) ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(10,10,10,0.9);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    cursor: zoom-out;
}

.lightbox.open { display: flex; }

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 4rem 5% 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

.site-footer a { color: inherit; }

.footer-note {
    max-width: 760px;
    margin: 0 auto 2.5rem;
    font-size: 0.85rem;
    background: var(--paper);
    border: 1px solid var(--paper-border);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    text-align: left;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.footer-social a {
    color: var(--text-muted);
    transition: color 0.3s ease, transform 0.3s var(--ease-out);
}

.footer-social a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.social-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}

.footer-links {
    margin-top: 0.5rem;
}

.footer-links a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

/* ── Motion & small screens ── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .status-live::before { animation: none; }
}

@media (max-width: 860px) {
    :root { --header-h: 64px; }
    .site-nav { display: none; }
    .brand img { height: 34px; }
    .section { padding: 5.5rem 5%; }
    .grid { grid-template-columns: 1fr; }
}
