/* ===== RESET & BASE ===== */
*, *::before, *::after{ box-sizing: border-box; margin: 0; padding: 0; }
/* Design tokens: the ONLY place colour literals live (see docs/design-system.md).
   Warm, light luxury theme. Legacy aliases (--cyan, --gold, --ivory, --panel…) are remapped in platform.css. */
:root{
    color-scheme: light;
    /* Surfaces */
    --bg: #FAF7F2;              /* ivory page */
    --bg-card: #FFFFFF;         /* cards, inputs */
    --bg-card-hover: #F6F1E9;   /* hover wash */
    --sand: #F1ECE4;            /* raised panels, table heads (alias --panel-raised / --surface-2) */
    /* Text */
    --text: #1C1A17;            /* charcoal */
    --text-muted: #5F594F;
    --text-dim: #716A5E;        /* darkened from #7C7569 to keep >=4.5:1 on ivory and sand */
    /* Lines */
    --border: #E3DCD0;
    --border-strong: #C9BFAE;
    /* Gold */
    --accent: #8C6420;          /* text-safe gold: links, eyebrows, outlines */
    --accent-strong: #6E4E17;   /* hover/pressed gold; text on --accent-soft */
    --accent-display: #A27630;  /* large display gold (headline <em>, big numerals) >=3:1 */
    --accent-bright: #C9A04E;   /* decorative gold: rules, marks, accents on the dark band */
    --accent-soft: #F4EBDC;
    /* Actions */
    --primary: #1C1A17;
    --primary-hover: #2E2A25;
    --on-primary: #FAF7F2;
    --on-accent: #FFFFFF;
    /* States */
    --success: #2A7354;         /* darkened from #2E7D5B for 4.5:1 on --success-soft */
    --success-soft: #E6F2EC;
    --warning: #9A5B00;
    --warning-soft: #FBEFD9;
    --danger: #B3261E;
    --danger-soft: #F9E3E1;
    --info: #2F5D8A;
    --info-soft: #E4EDF5;
    --ai: #5B4B8A;
    --ai-soft: #ECE7F6;
    /* Charts (allocation_bars palette index 1..6) */
    --chart-1: #8C6420;
    --chart-2: #1C1A17;
    --chart-3: #2F5D8A;
    --chart-4: #2E7D5B;
    --chart-5: #C9A04E;
    --chart-6: #B3261E;
    /* Dark editorial band (.section-dark, final CTA, footer) */
    --ink: #1C1A17;
    --ink-raised: #28241F;
    --ink-border: #3D3830;
    --on-ink: #FAF7F2;
    --on-ink-muted: #B5AC9E;
    --ink-accent: #C9A04E;
    /* Overlays */
    --scrim: rgba(28, 26, 23, .78);
    --backdrop: rgba(28, 26, 23, .55);
    --hairline-light: rgba(255, 255, 255, .6);
    /* Shape & elevation */
    --radius: 6px;
    --radius-card: 10px;
    --shadow: 0 10px 30px rgba(28, 26, 23, .08);
    --shadow-sm: 0 1px 2px rgba(28, 26, 23, .06);
    /* Type */
    --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
html{ scroll-behavior: smooth; }
body{
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
a{ color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover{ color: var(--accent-strong); }
img{ max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4{ font-family: var(--font-heading); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
.container{ width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.text-muted{ color: var(--text-muted); font-size: 0.85rem; }
/* ===== BUTTONS ===== */
.btn{
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-align: center;
}
.btn-gold{ background: var(--primary); color: var(--on-primary); }
.btn-gold:hover{ background: var(--primary-hover); color: var(--on-primary); }
.btn-outline{ background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn-outline:hover{ background: var(--accent-soft); color: var(--accent-strong); }
.btn-sm{ padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-full{ width: 100%; }
/* ===== NAVBAR ===== */
.navbar{
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}
.navbar.scrolled{ background: var(--bg); }
.navbar-inner{ display: flex; align-items: center; justify-content: space-between; padding: 1rem 0; }
.logo{ font-family: var(--font-heading); font-size: 1.4rem; font-weight: 700; color: var(--text); }
.logo:hover{ color: var(--gold); }
.hamburger{
    display: flex; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 5px; z-index: 1001;
}
.hamburger span{ display: block; width: 24px; height: 2px; background: var(--text); transition: all 0.3s; }
.hamburger.active span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2){ opacity: 0; }
.hamburger.active span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }
.nav-links{
    position: fixed; top: 0; right: -100%; width: 75%; max-width: 320px; height: 100vh;
    background: var(--bg-card); padding: 5rem 2rem 2rem;
    list-style: none; transition: right 0.3s;
    display: flex; flex-direction: column; gap: 0.5rem;
    border-left: 1px solid var(--border);
}
.nav-links.active{ right: 0; }
.nav-links li a{
    display: block; padding: 0.75rem 0; color: var(--text); font-size: 1rem;
    border-bottom: 1px solid var(--border);
}
.nav-links li a:hover{ color: var(--gold); }
.nav-links li:last-child a{ border-bottom: none; }
/* ===== SECTIONS ===== */
.section{ padding: 4rem 0; }
/* ===== PAGE HEADER ===== */
.page-header{
    padding: 7rem 0 3rem;
    background: var(--bg);
    text-align: center;
}
.page-header h1{ font-size: 2.2rem; margin-bottom: 0.5rem; }
.page-header-sub{ color: var(--text-muted); max-width: 500px; margin: 0 auto; }
/* ===== PROPERTY CARD ===== */
.property-grid{ display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.property-card{
    display: block; background: var(--bg-card); border-radius: var(--radius);
    overflow: hidden; border: 1px solid var(--border); transition: all 0.3s;
    color: var(--text);
}
.property-card:hover{ border-color: var(--border-strong); box-shadow: var(--shadow); color: var(--text); }
.property-card-img{ position: relative; overflow: hidden; aspect-ratio: 16/10; }
.property-card-img img{ width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.property-card:hover .property-card-img img{ transform: scale(1.05); }
.property-badge{
    position: absolute; top: 0.75rem; left: 0.75rem;
    background: var(--bg-card); color: var(--text); padding: 0.25rem 0.75rem;
    border-radius: 4px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1px;
}
.property-status-badge{
    position: absolute; top: 0.75rem; right: 0.75rem;
    padding: 0.25rem 0.75rem; border-radius: 4px; font-size: 0.7rem; font-weight: 600;
    text-transform: uppercase;
}
.status-sold{ background: var(--danger); color: var(--on-accent); }
.property-status-badge.status-sold{ background: var(--danger-soft); color: var(--danger); }
.status-pending{ background: var(--warning-soft); color: var(--warning); }
.property-card-body{ padding: 1.25rem; }
.property-card-body h3{ font-size: 1.1rem; margin-bottom: 0.25rem; }
.property-location{ color: var(--text-muted); font-size: 0.85rem; margin-bottom: 0.75rem; }
.property-price{ display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.75rem; }
.price-usd{ font-family: var(--font-heading); font-size: 1.3rem; color: var(--text); font-weight: 500; }
.price-crypto{ font-size: 0.8rem; color: var(--text-muted); }
.property-specs{ display: flex; gap: 1rem; font-size: 0.8rem; color: var(--text-muted); }
.property-specs span{ padding-right: 1rem; border-right: 1px solid var(--border); }
.property-specs span:last-child{ border-right: none; padding-right: 0; }
/* ===== FOOTER ===== */
.footer{ background: var(--ink); color: var(--on-ink); padding: 3rem 0 1.5rem; }
.footer-grid{ display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-col h3, .footer-col h4{ margin-bottom: 1rem; font-size: 1rem; }
.footer-col p{ color: var(--on-ink-muted); font-size: 0.85rem; line-height: 1.7; }
.footer-col ul{ list-style: none; }
.footer-col ul li{ margin-bottom: 0.5rem; }
.footer-col ul li a{ color: var(--on-ink-muted); font-size: 0.85rem; }
.footer-col ul li a:hover{ color: var(--ink-accent); }
.footer-bottom{ text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--ink-border); }
.footer-bottom p{ color: var(--on-ink-muted); font-size: 0.8rem; }
/* ===== AUTH FORMS ===== */
.auth-section{ padding: 7rem 0 4rem; min-height: 80vh; display: flex; align-items: center; }
.auth-card{
    max-width: 480px; margin: 0 auto; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem 1.5rem;
    text-align: center;
}
.auth-card h1{ font-size: 1.8rem; margin-bottom: 0.5rem; }
.auth-sub{ color: var(--text-muted); margin-bottom: 2rem; }
.auth-form{ text-align: left; }
.auth-footer{ margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-muted); }
.form-group{ margin-bottom: 1.25rem; }
.form-group label{ display: block; margin-bottom: 0.4rem; font-size: 0.85rem; color: var(--text-muted); }
.form-input{
    width: 100%; padding: 0.75rem 1rem; background: var(--bg-card); border: 1px solid var(--border-strong);
    border-radius: var(--radius); color: var(--text); font-family: var(--font-body); font-size: 0.9rem;
    transition: border-color 0.2s;
}
.form-input:focus{ outline: none; border-color: var(--accent); }
.form-textarea{ resize: vertical; min-height: 100px; }
.form-error{ display: block; color: var(--danger); font-size: 0.8rem; margin-top: 0.25rem; }
.form-check{ display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem; }
.form-check label{ font-size: 0.85rem; color: var(--text-muted); }
/* ===== EMPTY STATE ===== */
.empty-state{ text-align: center; padding: 3rem 1rem; }
.empty-state h3{ margin-bottom: 0.5rem; }
.empty-state p{ color: var(--text-muted); margin-bottom: 1.5rem; }
.gallery-thumbs{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
/* ===== PROFILE ===== */
.profile-card{
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem; margin-bottom: 2rem;
}
.profile-header{ display: flex; gap: 1.5rem; align-items: flex-start; margin-bottom: 1.5rem; }
.profile-avatar{
    width: 60px; height: 60px; border-radius: 50%; background: var(--accent);
    color: var(--on-accent); display: flex; align-items: center; justify-content: center;
    font-family: var(--font-heading); font-size: 1.5rem; font-weight: 500; flex-shrink: 0;
}
.profile-info h2{ font-size: 1.3rem; margin-bottom: 0.25rem; }
.profile-info p{ color: var(--text-muted); font-size: 0.9rem; }
.profile-bio{ margin-top: 0.5rem; }
.profile-section{ margin-bottom: 3rem; }
.profile-section h2{ font-size: 1.3rem; margin-bottom: 1.5rem; }
.transactions-list{ display: flex; flex-direction: column; gap: 1rem; }
.transaction-card{
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem;
    display: flex; flex-direction: column; gap: 1rem;
}
.transaction-info h4{ font-size: 1rem; margin-bottom: 0.25rem; }
.transaction-info p{ color: var(--text-muted); font-size: 0.85rem; }
.transaction-status{ display: flex; align-items: center; gap: 1rem; }
.status-badge{
    padding: 0.25rem 0.75rem; border-radius: 4px; font-size: 0.75rem;
    font-weight: 600; text-transform: uppercase;
}
.status-confirmed{ background: var(--success-soft); color: var(--success); }
.status-pending{ background: var(--warning-soft); color: var(--warning); }
.status-failed{ background: var(--danger-soft); color: var(--danger); }
.tx-hash{ font-family: monospace; font-size: 0.8rem; color: var(--text-dim); word-break: break-all; }
.faq-item{ border-bottom: 1px solid var(--border); }
/* ===== FLASH MESSAGES ===== */
.flash-container{ position: fixed; top: 5rem; left: 50%; transform: translateX(-50%); z-index: 2000; width: 90%; max-width: 500px; }
.flash{
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem 1.25rem; border-radius: var(--radius); margin-bottom: 0.5rem;
    font-size: 0.9rem; transition: all 0.3s;
}
.flash-success{ background: var(--success-soft); border: 1px solid var(--success); color: var(--success); }
.flash-error{ background: var(--danger-soft); border: 1px solid var(--danger); color: var(--danger); }
.flash-info{ background: var(--info-soft); border: 1px solid var(--info); color: var(--info); }
.flash-close{ background: none; border: none; color: inherit; font-size: 1.2rem; cursor: pointer; padding: 0; }
/* ===== TABLET (768px+) ===== */
@media (min-width: 768px) {
body{ font-size: 16px; }
.property-grid{ grid-template-columns: repeat(2, 1fr); }
.footer-grid{ grid-template-columns: repeat(2, 1fr); }
.transaction-card{ flex-direction: row; justify-content: space-between; align-items: center; }
.auth-card{ padding: 3rem 2.5rem; }
}
/* ===== DESKTOP (1024px+) ===== */
@media (min-width: 1024px) {
.hamburger{ display: none; }
.nav-links{
        position: static; width: auto; max-width: none; height: auto;
        background: none; padding: 0; border-left: none;
        flex-direction: row; align-items: center; gap: 0;
    }
.nav-links li a{
        padding: 0.5rem 0.75rem; border-bottom: none; font-size: 0.85rem;
    }
.property-grid{ grid-template-columns: repeat(3, 1fr); }
.footer-grid{ grid-template-columns: repeat(4, 1fr); }
.page-header h1{ font-size: 2.8rem; }
}
/* Sign in with Google (templates/components/google_button.html) */
.auth-divider{ display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0; color: var(--text-muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.auth-divider::before, .auth-divider::after{ content: ""; flex: 1; border-top: 1px solid var(--border); }
.btn-google{ display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; }
.btn-google-icon{ flex: none; background: var(--bg-card); border-radius: 50%; padding: 2px; box-sizing: content-box; }