/* ============================================================
   PAPAYA ESTUDIO — Hoja de estilos
   Estética editorial inspirada en Gates Paper Co.
   Paleta crema + tinta, mucho aire, tipografía serif Made Mirage.
   ============================================================ */

@font-face {
    font-family: 'Made Mirage';
    src: url('../fonts/MADE-Mirage-Thin.otf') format('opentype');
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Made Mirage';
    src: url('../fonts/MADE-Mirage-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Made Mirage';
    src: url('../fonts/MADE-Mirage-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Made Mirage';
    src: url('../fonts/MADE-Mirage-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ----- Variables ----- */
:root {
    --bg: #f4ede2;          /* crema cálido */
    --bg-2: #ebe2d3;        /* crema un punto más oscuro */
    --ink: #1f1a16;         /* tinta casi negra */
    --ink-soft: #5a4e44;    /* texto secundario */
    --line: #d6c8b2;        /* líneas / bordes */
    --accent: #e08658;      /* coral papaya */
    --accent-dark: #b8623a;
    --focus: #1f1a16;

    --serif: 'Made Mirage', 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --sans: 'Made Mirage', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;

    --maxw: 760px;
    --radius: 0;
}

/* ----- Reset suave ----- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--serif);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Imagen de fondo fija (parallax simple) al 15% de opacidad.
   Usamos un pseudo-elemento con position: fixed en lugar de
   background-attachment: fixed porque este último falla en iOS Safari. */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('../img/invitaciones-de-boda-en-vigo-papaya-estudio.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.10;
    z-index: -1;
    pointer-events: none;
}

img, svg { display: block; max-width: 100%; height: auto; }

::selection { background: var(--accent); color: #fff; }

/* ----- Header ----- */
.site-header {
    padding: 40px 32px 0;
    display: flex;
    justify-content: center;
}
.site-header .logo img {
    width: 270px;
    height: auto;
}

/* ----- Layout ----- */
.page {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 24px 32px 80px;
}

/* ----- Intro ----- */
.intro { text-align: center; margin-bottom: 64px; }

.eyebrow {
    font-family: var(--sans);
    text-transform: uppercase;
    letter-spacing: 0.32em;
    font-size: 11px;
    color: var(--ink-soft);
    margin: 0 0 24px;
}

.intro h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(20px, 6vw, 50px);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0 0 24px;
    white-space: nowrap;
}

.intro .lead {
    max-width: 520px;
    margin: 0 auto;
    color: var(--ink-soft);
    font-size: 17px;
}

/* ----- Form ----- */
.inquiry { display: block; }

fieldset {
    border: none;
    margin: 0 0 56px;
    padding: 40px 0 0;
    border-top: 1px solid var(--line);
}

legend {
    font-family: var(--sans);
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 11px;
    color: var(--ink-soft);
    padding: 0 16px 0 0;
    margin-bottom: 32px;
}

.field { margin: 0 0 28px; }
.field:last-child { margin-bottom: 0; }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
}

.field label,
.label-as-span {
    display: block;
    font-family: var(--serif);
    font-weight: 400;
    font-size: 15px;
    color: var(--ink);
    margin-bottom: 10px;
}

.req { color: var(--accent-dark); margin-left: 2px; }

.hint {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--ink-soft);
    font-style: italic;
}

/* Inputs */
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="number"],
.field select,
.field textarea {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    padding: 10px 0;
    font-family: var(--serif);
    font-size: 17px;
    color: var(--ink);
    transition: border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.field select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path fill='none' stroke='%231f1a16' stroke-width='1.4' d='M1 1l5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 12px 8px;
    padding-right: 24px;
    cursor: pointer;
}

.field textarea {
    border: 1px solid var(--line);
    padding: 14px 16px;
    line-height: 1.55;
    resize: vertical;
    min-height: 140px;
}

.field input::placeholder,
.field textarea::placeholder { color: #9c8f80; }

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

.field input:focus,
.field select:focus {
    border-bottom-width: 2px;
    padding-bottom: 9px;
}

.field textarea:focus { border-width: 2px; padding: 13px 15px; }

/* Radios & checkboxes */
.radios,
.checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}
.checks { flex-direction: column; gap: 12px; }

.radio,
.check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 16px;
    color: var(--ink);
    user-select: none;
}

.radio input,
.check input {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--ink);
    background: transparent;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease;
}
.radio input { border-radius: 50%; }

.radio input:checked { background: var(--ink); box-shadow: inset 0 0 0 3px var(--bg); }
.check input:checked {
    background: var(--ink);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path fill='none' stroke='%23f4ede2' stroke-width='1.8' d='M2.5 6.5l2.5 2.5 4.5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
}

.radio input:focus-visible,
.check input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Honeypot oculto */
.hp {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ----- Submit ----- */
.actions {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.btn-primary {
    display: inline-block;
    font-family: var(--sans);
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 12px;
    font-weight: 500;
    color: var(--bg);
    background: var(--ink);
    border: 1px solid var(--ink);
    padding: 18px 48px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.btn-primary:hover,
.btn-primary:focus-visible {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    outline: none;
}

.legal {
    margin: 20px auto 0;
    max-width: 420px;
    font-size: 12px;
    color: var(--ink-soft);
    font-style: italic;
}

/* ----- Footer ----- */
.site-footer {
    text-align: center;
    padding: 32px 24px 40px;
    font-size: 12px;
    color: var(--ink-soft);
    font-family: var(--sans);
    letter-spacing: 0.08em;
}
.site-footer p { margin: 0; }

/* ----- Estados de error / éxito server-rendered ----- */
.form-message {
    max-width: var(--maxw);
    margin: 24px auto 0;
    padding: 16px 20px;
    background: var(--bg-2);
    border-left: 3px solid var(--accent);
    font-size: 15px;
    color: var(--ink);
}
.form-message.error { border-left-color: #b04444; }

/* ----- Página de gracias ----- */
.thanks {
    max-width: 560px;
    margin: 0 auto;
    padding: 120px 32px 80px;
    text-align: center;
}
.thanks h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(40px, 7vw, 64px);
    line-height: 1.1;
    margin: 0 0 24px;
}
.thanks p { color: var(--ink-soft); margin: 0 0 32px; }
.thanks .btn-primary { margin-top: 8px; }

/* ----- Responsive ----- */
@media (max-width: 640px) {
    .site-header { padding: 28px 20px 0; }
    .site-header .logo img { width: 210px; }
    .page { padding: 16px 20px 60px; }
    .intro { margin-bottom: 48px; }
    .grid-2 { grid-template-columns: 1fr; gap: 28px; margin-bottom: 0; }
    .grid-2 .field { margin-bottom: 28px; }
    fieldset { margin-bottom: 40px; padding-top: 32px; }
    .actions { margin-top: 40px; padding-top: 32px; }
    .btn-primary { padding: 16px 36px; width: 100%; max-width: 320px; }
}
