/* ============================================
   Texas Real Estate Tools - Design System
   ============================================ */

:root {
    /* Dark Theme (Default) */
    --bg-primary: #1a1520;
    --bg-secondary: #231c28;
    --bg-card: #2d2533;
    --bg-input: #3a3142;
    --text-primary: #fff5f8;
    --text-secondary: #c9b8c4;
    --text-muted: #9a8a94;
    --accent: #fbbf24;
    --accent-hover: #f59e0b;
    --accent-light: rgba(251, 191, 36, 0.15);
    --pink: #e891a8;
    --pink-light: rgba(232, 145, 168, 0.15);
    --gradient-gold: linear-gradient(135deg, #fbbf24, #f59e0b);
    --gradient-pink: linear-gradient(135deg, #e891a8, #a78bfa);
    --border-color: rgba(255, 255, 255, 0.08);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    --success: #34d399;
    --success-light: rgba(52, 211, 153, 0.15);
}

[data-theme="light"] {
    --bg-primary: #fef7f9;
    --bg-secondary: #fff0f3;
    --bg-card: #ffffff;
    --bg-input: #f5f0f2;
    --text-primary: #2d1f27;
    --text-secondary: #5c4a54;
    --text-muted: #8a7a84;
    --accent: #d97706;
    --accent-hover: #b45309;
    --accent-light: rgba(217, 119, 6, 0.12);
    --pink: #d4688a;
    --pink-light: rgba(212, 104, 138, 0.12);
    --border-color: rgba(212, 104, 138, 0.15);
    --shadow: 0 20px 50px rgba(212, 104, 138, 0.15);
}

/* ============================================
   Base Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.4s ease, color 0.4s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Background Decoration
   ============================================ */

.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--accent);
    top: -150px;
    right: -150px;
    animation: float1 25s infinite ease-in-out;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: var(--pink);
    bottom: -100px;
    left: -100px;
    animation: float2 30s infinite ease-in-out;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-50px, 50px); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(30px, -30px); }
}

/* ============================================
   Navigation
   ============================================ */

nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 16px 0;
    background: rgba(26, 21, 32, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] nav {
    background: rgba(254, 247, 249, 0.9);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    fill: #1a1520;
}

.logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
}

.logo-text span {
    color: var(--accent);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

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

.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--accent-light);
    border-color: var(--accent);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    fill: var(--accent);
}

.sun-icon { display: none; }
.moon-icon { display: block; }
[data-theme="light"] .sun-icon { display: block; }
[data-theme="light"] .moon-icon { display: none; }

/* ============================================
   Hero Section
   ============================================ */

.hero {
    padding: 140px 0 80px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 24px;
}

.hero-badge svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero h1 .highlight {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.btn-primary {
    background: var(--gradient-gold);
    color: #1a1520;
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(251, 191, 36, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-large {
    padding: 20px 40px;
    font-size: 1.1rem;
}

/* ============================================
   Section Styles
   ============================================ */

section {
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-label-muted {
    color: var(--text-muted);
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* ============================================
   Tools Section
   ============================================ */

.tools-section {
    padding: 60px 0;
}

.coming-soon-header {
    margin-top: 80px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

/* ============================================
   Tool Cards
   ============================================ */

.tool-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 28px;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.tool-card-muted {
    opacity: 0.7;
}

.tool-card-muted:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-color);
}

.badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-live {
    background: var(--accent);
    color: #1a1520;
}

.badge-soon {
    background: var(--bg-input);
    color: var(--text-muted);
}

.tool-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.tool-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--accent);
}

.tool-card-muted .tool-icon {
    background: var(--bg-input);
}

.tool-card-muted .tool-icon svg {
    fill: var(--text-muted);
}

.tool-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    padding-right: 80px;
}

.tool-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--gradient-gold);
    border-radius: 10px;
    color: #1a1520;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tool-btn:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.tool-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.tool-btn-disabled {
    display: inline-block;
    padding: 12px 20px;
    background: var(--bg-input);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: not-allowed;
}

/* ============================================
   Benefits Section
   ============================================ */

.benefits-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
}

.benefit-item {
    text-align: center;
    padding: 24px;
}

.benefit-icon {
    width: 64px;
    height: 64px;
    background: var(--accent-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.benefit-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--accent);
}

.benefit-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.benefit-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ============================================
   Contact Section
   ============================================ */

.contact-section {
    padding: 80px 0;
}

.contact-card {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-card);
    border-radius: 24px;
    padding: 48px;
    border: 1px solid var(--border-color);
}

.contact-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 28px;
}

/* ============================================
   Footer
   ============================================ */

footer {
    padding: 48px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.disclaimer {
    color: var(--text-secondary) !important;
    font-weight: 500;
}

.privacy {
    font-size: 0.85rem !important;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 16px;
    transition: all 0.3s ease;
}

.back-link:hover {
    gap: 12px;
}

.back-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ============================================
   Calculator Page Styles
   ============================================ */

.calculator-page {
    padding: 120px 0 60px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 48px;
}

.calculator-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 12px;
}

.calculator-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.calculator-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 36px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-light);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--accent);
}

.card-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
}

/* ============================================
   Form Styles
   ============================================ */

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .prefix,
.input-wrapper .suffix {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-weight: 500;
    pointer-events: none;
}

.input-wrapper .prefix {
    left: 16px;
}

.input-wrapper .suffix {
    right: 16px;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 16px;
    padding-left: 36px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-wrapper input.has-suffix {
    padding-right: 50px;
}

.input-wrapper input.no-prefix {
    padding-left: 16px;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card);
}

.input-wrapper select {
    padding-left: 16px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%239a8a94' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 24px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.range-wrapper {
    margin-top: 8px;
}

.range-wrapper input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: var(--bg-input);
    border-radius: 3px;
    outline: none;
}

.range-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--gradient-gold);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.calculate-btn {
    width: 100%;
    padding: 18px 32px;
    background: var(--gradient-gold);
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1520;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.4);
}

.calculate-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ============================================
   Results Styles
   ============================================ */

.results-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 36px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.main-result {
    text-align: center;
    padding: 32px;
    background: var(--accent-light);
    border-radius: 16px;
    margin-bottom: 28px;
}

.main-result .label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.main-result .amount {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.main-result .sublabel {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.breakdown {
    margin-bottom: 28px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-color);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-item .label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.breakdown-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-gold { background: var(--accent); }
.dot-pink { background: var(--pink); }
.dot-green { background: var(--success); }
.dot-purple { background: #8b5cf6; }

.breakdown-item .value {
    font-weight: 600;
    font-size: 1.05rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--bg-input);
    border-radius: 12px;
    margin-bottom: 16px;
}

.total-row .label {
    font-weight: 500;
    color: var(--text-secondary);
}

.total-row .value {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
}

/* ============================================
   CTA Box
   ============================================ */

.cta-box {
    background: var(--pink-light);
    border: 1px solid var(--pink);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-top: 24px;
}

.cta-box h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--pink);
}

.cta-box p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient-pink);
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(232, 145, 168, 0.4);
}

.cta-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ============================================
   Tool Page Layout
   ============================================ */

.tool-page {
    padding: 100px 24px 60px;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.tool-header {
    margin-bottom: 2rem;
}

.tool-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    transition: gap 0.2s;
}

.tool-header .back-link:hover {
    gap: 10px;
}

.tool-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tool-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Tool Page Inputs */
.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-with-prefix,
.input-with-suffix {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix,
.input-suffix {
    position: absolute;
    color: var(--text-muted);
    font-weight: 500;
    pointer-events: none;
}

.input-prefix {
    left: 14px;
}

.input-suffix {
    right: 14px;
}

.input-with-prefix input {
    padding-left: 32px;
}

.input-with-suffix input {
    padding-right: 40px;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.2s;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card);
}

.input-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%239a8a94' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 24px;
}

.input-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Tool Page Footer */
.tool-footer {
    padding: 48px 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    z-index: 1;
}

.tool-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.tool-footer .footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 12px;
    transition: gap 0.2s;
}

.tool-footer .footer-link:hover {
    gap: 10px;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 900px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-link {
        display: none;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    .calculator-card,
    .results-card {
        padding: 24px;
    }

    .main-result .amount {
        font-size: 2.5rem;
    }

    .contact-card {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }
}
