/* =========================================================================
   FrameReady — Stylesheet
   =========================================================================
   Brand tokens
     #1A1A1A   near-black (header, buttons)
     #FFD700   gold accent
     #F5F5F5   light gray page background
     #FFFFFF   card surfaces
     #4A4A4A   secondary text / labels
     #DDDDDD   borders
   ========================================================================= */

/* ── PARALLAX BACKGROUND ───────────────────────────────────────────────── */
.fr-parallax-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.fr-parallax-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.8s ease-in-out;
    transform: scale(1.04); /* slight zoom gives depth */
}
.fr-parallax-slide.active {
    opacity: 1;
    animation: fr-slow-zoom 14s ease-in-out forwards;
}
@keyframes fr-slow-zoom {
    from { transform: scale(1.04); }
    to   { transform: scale(1.00); }
}
.fr-parallax-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.50) 0%,
        rgba(10, 10, 10, 0.38) 50%,
        rgba(10, 10, 10, 0.50) 100%
    );
}

/* ── PARALLAX BREAK SECTIONS ───────────────────────────────────────────── */
.fr-break {
    position: relative;
    z-index: 1;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 -24px; /* bleed to edge */
}
.fr-break-caption {
    font-size: 17px;
    font-weight: 300;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 215, 0, 0.75);
    text-shadow: 0 2px 12px rgba(0,0,0,0.8);
    text-align: center;
}

/* ── RESET / ROOT ──────────────────────────────────────────────────────── */
:root {
    --accent:       #FFD700;
    --accent-dark:  #C8A800;
    --ink:          #1A1A1A;
    --ink-soft:     #4A4A4A;
    --ink-muted:    #888888;
    --surface:      #FFFFFF;
    --bg:           #F2F3F5;
    --border:       #E0E0E0;
    --border-focus: #FFD700;
    --danger:       #C0392B;
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md:    0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
    --radius:       6px;
    --transition:   0.18s ease;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: transparent; /* parallax bg shows through */
    color: var(--ink);
    font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* ── ACCESSIBILITY — Skip Link ─────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    background: var(--accent);
    color: var(--ink);
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 0 0 var(--radius) var(--radius);
    text-decoration: none;
    z-index: 9999;
    transition: top var(--transition);
}
.skip-link:focus {
    top: 0;
    outline: 3px solid var(--ink);
    outline-offset: 2px;
}

/* ── ACCESSIBILITY — Screen reader only ────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── HEADER ────────────────────────────────────────────────────────────── */
.fr-header {
    background: rgba(15, 15, 15, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 4px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0,0,0,0.5);
}
.fr-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.fr-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.fr-logo {
    height: 40px;
    width: auto;
}
.fr-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.fr-brand-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.06em;
    line-height: 1;
}
.fr-brand-tag {
    font-size: 10px;
    color: #888;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.fr-badge {
    background: rgba(255,215,0,0.15);
    border: 1px solid rgba(255,215,0,0.4);
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
}

/* ── HERO STRIP ────────────────────────────────────────────────────────── */
.fr-hero {
    background: transparent;
    padding: 56px 24px 44px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.fr-hero-title {
    color: #FFFFFF;
    font-size: 38px;
    font-weight: 800;
    letter-spacing: 0.03em;
    margin: 0 0 12px 0;
    text-shadow: 0 2px 16px rgba(0,0,0,0.6);
}
.fr-hero-sub {
    color: rgba(255,255,255,0.72);
    font-size: 15px;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
    text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

/* ── MAIN CONTAINER ────────────────────────────────────────────────────── */
.fr-main {
    max-width: 960px;
    padding-top: 32px;
    padding-bottom: 80px;
    position: relative;
    z-index: 1;
}

.fr-required-legend {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    margin-bottom: 24px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ── CARDS — glass float over parallax ─────────────────────────────────── */
.fr-card {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.16);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.6);
    transition: box-shadow var(--transition), transform var(--transition);
}
.fr-card:focus-within {
    box-shadow: 0 12px 40px rgba(0,0,0,0.32), 0 0 0 2px rgba(255,215,0,0.4);
}
.fr-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(0,0,0,0.32), 0 4px 12px rgba(0,0,0,0.18);
}

.fr-card-header {
    background: var(--ink);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 3px solid var(--accent);
}
.fr-card-header h2 {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    margin: 0;
}

.fr-step {
    background: var(--accent);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: 0;
}
.fr-step-sm {
    width: 24px;
    height: 24px;
    font-size: 11px;
}

.fr-card-body {
    padding: 24px;
}

/* ── OPTIONAL CARDS ────────────────────────────────────────────────────── */
.fr-optional-header {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: rgba(255,215,0,0.80);
    text-shadow: 0 1px 6px rgba(0,0,0,0.6);
    margin: 32px 0 12px 0;
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.fr-optional-sub {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink-muted);
}

.fr-optional-card .fr-card-header {
    background: #2a2a2a;
    border-bottom: 2px solid rgba(255,215,0,0.5);
    cursor: pointer;
}
.fr-opt-toggle-header {
    padding: 14px 20px;
}
.fr-opt-check {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0;
}
.fr-opt-label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}
.fr-opt-desc {
    font-size: 12px;
    font-weight: 400;
    color: #888;
    margin-left: 4px;
}
.fr-opt-body {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
}

/* ── FORM LABELS ───────────────────────────────────────────────────────── */
.fr-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.fr-unit {
    font-weight: 400;
    text-transform: none;
    color: var(--ink-muted);
    letter-spacing: 0;
}
.fr-label-opt {
    font-weight: 400;
    font-size: 11px;
    color: var(--ink-muted);
    text-transform: none;
    letter-spacing: 0;
}
.fr-req-star {
    color: var(--accent-dark);
    font-weight: 700;
}

/* ── INPUTS ────────────────────────────────────────────────────────────── */
.fr-input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 13px;
    font-size: 14px;
    color: var(--ink);
    background: #FAFAFA;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    -webkit-appearance: none;
}
.fr-input:focus {
    outline: none;
    border-color: var(--border-focus);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(255,215,0,0.20);
}
.fr-input:hover:not(:focus) {
    border-color: #BBBBBB;
}
.fr-input.fr-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(192,57,43,0.15);
}
.fr-input::placeholder {
    color: #B0B0B0;
    font-style: italic;
}
textarea.fr-input {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* Checkbox styling */
.fr-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 3px;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
}
.fr-checkbox:focus {
    outline: 3px solid rgba(255,215,0,0.5);
    outline-offset: 2px;
}

/* ── HINT TEXT ─────────────────────────────────────────────────────────── */
.fr-hint {
    font-size: 12px;
    color: var(--ink-muted);
    margin-top: 5px;
    line-height: 1.4;
}
.fr-hint-inline {
    font-size: 11px;
    font-weight: 400;
    color: var(--ink-muted);
    letter-spacing: 0;
    text-transform: none;
    margin-left: 6px;
}

/* ── PRICING TABLE ─────────────────────────────────────────────────────── */
.fr-price-table {
    background: #FAFAFA;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.fr-price-row {
    display: grid;
    grid-template-columns: 1fr 220px;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
}
.fr-price-row:last-child { border-bottom: none; }
.fr-price-row .fr-label { margin-bottom: 0; }
.fr-price-input-wrap {
    display: flex;
    align-items: center;
    position: relative;
}
.fr-currency {
    position: absolute;
    left: 13px;
    color: var(--ink-muted);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}
.fr-price-input {
    padding-left: 28px !important;
    text-align: right;
}
.fr-price-total-row {
    background: var(--ink);
    border-top: 3px solid var(--accent);
}
.fr-price-total-row .fr-label {
    color: #FFFFFF;
    font-weight: 700;
}
.fr-price-total-row .fr-currency {
    color: var(--accent);
}
.fr-price-total-row .fr-price-input {
    background: #2a2a2a;
    border-color: #444;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 16px;
}
.fr-price-total-row .fr-price-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255,215,0,0.25);
}

/* ── FRAMED OPENINGS TABLE ─────────────────────────────────────────────── */
.fr-opening-grid {
    display: grid;
    gap: 8px;
}
.fr-opening-head {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.7fr 2fr;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
    padding: 0 4px 6px;
    border-bottom: 1px solid var(--border);
}
.fr-opening-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.7fr 2fr;
    gap: 8px;
}
.fr-opening-row > div { display: flex; align-items: center; }

/* ── ACCESSORIES GRID ──────────────────────────────────────────────────── */
.fr-acc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px 16px;
    padding: 0;
    border: none;
    margin: 0;
}
.fr-acc-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    color: var(--ink-soft);
    cursor: pointer;
}
.fr-acc-item label { cursor: pointer; margin: 0; }

/* ── SUBMIT ────────────────────────────────────────────────────────────── */
.fr-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 0 8px;
    flex-wrap: wrap;
}
.fr-submit-note {
    font-size: 13px;
    color: var(--ink-muted);
    margin: 0;
    max-width: 480px;
    line-height: 1.5;
}
.fr-btn-submit {
    background: var(--ink);
    color: var(--accent);
    border: 2px solid var(--ink);
    padding: 14px 36px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform var(--transition);
    white-space: nowrap;
}
.fr-btn-submit:hover {
    background: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.fr-btn-submit:focus {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}
.fr-btn-submit:active {
    transform: translateY(0);
}

/* ── FOOTER ────────────────────────────────────────────────────────────── */
.fr-footer {
    background: rgba(10,10,10,0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 3px solid var(--accent);
    padding: 20px 24px;
    text-align: center;
    font-size: 12px;
    color: #666;
    letter-spacing: 0.06em;
    position: relative;
    z-index: 1;
}
.fr-footer-sep {
    margin: 0 8px;
    color: #333;
}

/* ══════════════════════════════════════════════════════════════════════════
   PROPOSAL PREVIEW PAGE (browser)
   ══════════════════════════════════════════════════════════════════════════ */
.preview-page {
    max-width: 850px;
    margin: 32px auto;
    background: var(--surface);
    padding: 40px 48px;
    border-top: 6px solid var(--accent);
    border-bottom: 6px solid var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: var(--radius);
}
.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1A1A1A;
    border-bottom: 3px solid var(--accent);
    padding: 14px 20px;
    margin: -40px -48px 28px -48px;
    border-radius: var(--radius) var(--radius) 0 0;
}
.preview-header .frameready-logo {
    height: 52px;
    width: auto;
    display: block;
}
.preview-header .header-right { text-align: right; }
.preview-header .header-company {
    color: var(--accent);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 2px 0;
    letter-spacing: 0.04em;
}
.preview-header h1 {
    margin: 0;
    font-size: 1.2rem;
    color: #FFFFFF;
    letter-spacing: 0.04em;
}
.preview-header .header-sub {
    color: #7A7A7A;
    font-size: 0.82rem;
    margin-top: 2px;
}
.preview-section {
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    background: var(--bg);
    padding: 14px 18px;
    margin: 16px 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}
.preview-section h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 8px 0;
}
.preview-section .narrative { color: var(--ink); margin-top: 8px; }
.kv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 24px;
    margin: 8px 0;
}
.kv-grid .label { color: var(--ink-soft); font-size: 0.85rem; }
.price-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.price-table th, .price-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.price-table tr.total-row { background: var(--accent); }
.price-table tr.total-row td { font-weight: 700; border-bottom: none; }
.preview-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* ── UTILITIES ─────────────────────────────────────────────────────────── */
.muted { color: var(--ink-soft); }
.muted-small { color: var(--ink-soft); font-size: 0.85rem; }
.text-right { text-align: right; }
@media print {
    .no-print { display: none !important; }
    .fr-header, .fr-hero, .fr-footer { display: none; }
}

/* ── RESPONSIVE ────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .fr-hero-title { font-size: 22px; }
    .fr-opening-head,
    .fr-opening-row { grid-template-columns: 1fr 1fr 1fr; }
    .fr-opening-head span:nth-child(4),
    .fr-opening-head span:nth-child(5),
    .fr-opening-row > div:nth-child(4),
    .fr-opening-row > div:nth-child(5) { display: none; }
    .fr-price-row { grid-template-columns: 1fr; }
    .fr-submit-row { flex-direction: column; align-items: stretch; }
    .fr-btn-submit { text-align: center; }
}
