:root {
    --ink: #17120c;
    --ink-2: #1f1810;
    --surface: #221a11;
    --paper: #f2ead9;
    --paper-dim: #d9cfba;
    --muted: #9c8f78;
    --muted-2: #6f6451;
    --ember: #e57a39;
    --ember-soft: #f0a06a;
    --line: rgba(242, 234, 217, 0.10);
    --line-strong: rgba(242, 234, 217, 0.18);
    --serif: "Fraunces", Georgia, serif;
    --sans: "IBM Plex Sans", system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, monospace;
    --maxw: 1120px;
    --gutter: 32px;
}

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

h1,
h2,
h3,
h4 {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

html {
    scroll-behavior: smooth
}

body {
    background: var(--ink);
    color: var(--paper);
    font-family: var(--sans);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    counter-reset: section;
}

section {
    position: relative;
    counter-increment: section;
    padding: 120px 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
    opacity: 0.04;
    mix-blend-mode: overlay;
}

::selection {
    background: var(--ember);
    color: var(--ink)
}

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

img {
    max-width: 100%;
    height: auto
}

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    position: relative;
    z-index: 1;
}

/* nav */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: linear-gradient(to bottom, rgba(23, 18, 12, 0.92), rgba(23, 18, 12, 0.55));
    border-bottom: 1px solid transparent;
    transition: border-color .4s ease;
}

nav.scrolled {
    border-bottom: 1px solid var(--line)
}

.nav-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 16px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-family: var(--mono);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -.01em
}

.brand b {
    color: var(--ember)
}

.nav-links {
    display: flex;
    gap: 26px;
    align-items: center
}

.nav-links a {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--muted);
    transition: color .25s;
}

.nav-links a:hover {
    color: var(--paper)
}

.nav-links a.home-link {
    color: var(--paper-dim);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--paper);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.nav-cta {
    background: var(--ember);
    color: var(--ink) !important;
    padding: 8px 16px;
    border-radius: 2px;
    transition: background .2s, transform .2s !important;
}

.nav-cta:hover {
    background: var(--ember-soft);
    transform: translateY(-1px);
}

/* botones */
.btn-primary {
    background: var(--ember);
    color: var(--ink);
    font-family: var(--mono);
    font-weight: 500;
    font-size: 15px;
    padding: 15px 26px;
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: transform .2s, background .2s;
}

.btn-primary:hover {
    background: var(--ember-soft);
    transform: translateY(-2px)
}

.btn-ghost {
    font-family: var(--mono);
    font-size: 15px;
    color: var(--paper);
    padding: 15px 8px;
    border-bottom: 1px solid var(--line-strong);
    transition: border-color .25s, color .25s;
}

.btn-ghost:hover {
    border-color: var(--ember);
    color: var(--ember)
}

/* eyebrow */
.eyebrow {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--ember);
    letter-spacing: .05em;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.eyebrow.center {
    justify-content: center
}

.eyebrow.center::before,
.eyebrow.center::after {
    content: "";
    width: 30px;
    height: 1px;
    background: var(--ember);
    opacity: .7;
}

/* footer */
footer {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding: 50px 0 60px;
    position: relative;
    z-index: 1;
}

.foot-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.foot-line {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.2rem;
    color: var(--paper-dim)
}

.foot-meta {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted-2)
}

/* formulario de contacto — compartido por todas las páginas */
.hp-field { display: none; }

.form-field { margin-bottom: 18px; }

.form-field label {
    display: block;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: .03em;
}

.form-field input,
.form-field textarea {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 13px 14px;
    color: var(--paper);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 300;
    transition: border-color .25s;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--ember);
}

.form-field textarea { resize: vertical; min-height: 110px; }

.form-msg {
    margin-top: 14px;
    font-family: var(--mono);
    font-size: 13px;
    min-height: 1.5em;
}

.form-msg.ok         { color: var(--ember-soft); }
.form-msg.validation { color: var(--paper-dim); }
.form-msg.error      { color: var(--paper-dim); }
.form-msg.error a    { color: var(--ember); }

/* reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s ease;
}

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

.justify {
    text-align: justify;
    hyphens: auto;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(22px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

@media(max-width:880px) {
    section {
        padding: 84px 0;
    }

    .nav-links {
        display: none;
    }

    .nav-links.open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        background: var(--ink-2);
        padding: 20px var(--gutter);
        gap: 18px;
        border-bottom: 1px solid var(--line);
    }

    .nav-toggle {
        display: block;
    }
}

@media(max-width:640px) {
    :root {
        --gutter: 24px;
    }
}