/* ============================================
   Ohmlify Website Styles
   ============================================ */

/* CSS Variables */
:root {
    --primary: #0066FF;
    --primary-dark: #0052CC;
    --secondary: #FFD700;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a68;
    --text-light: #8888a0;
    --background: #ffffff;
    --background-alt: #f8f9fc;
    --border: #e8e8f0;
    --success: #00c853;
    --warning: #ffab00;
    --error: #ff5252;

    --wire-brown: #8B4513;
    --wire-blue: #0066CC;
    --wire-green: #228B22;
    --wire-yellow: #FFD700;

    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --border-radius: 12px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

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

ul, ol {
    padding-left: 1.5em;
}

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

/* ============================================
   Navigation
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.1rem;
}

.apple-icon {
    width: 24px;
    height: 24px;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    padding: 160px 0 100px;
    background: linear-gradient(180deg, #f8f9fc 0%, #ffffff 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-content .highlight {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 500px;
}

.hero-buttons {
    margin-bottom: 16px;
}

.hero-note {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Phone Mockup */
.phone-mockup {
    background: #1a1a2e;
    border-radius: 40px;
    padding: 12px;
    max-width: 300px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}

.phone-screen {
    background: white;
    border-radius: 30px;
    padding: 20px;
    min-height: 500px;
}

.app-preview {
    padding: 20px 0;
}

.preview-header {
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--background-alt);
    border-radius: 12px;
    margin-bottom: 12px;
    font-weight: 500;
}

.wire-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wire-dot.brown { background: var(--wire-brown); }
.wire-dot.blue { background: var(--wire-blue); }
.wire-dot.green-yellow {
    background: linear-gradient(135deg, var(--wire-green) 50%, var(--wire-yellow) 50%);
}

/* ============================================
   Features Section
   ============================================ */
.features {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--background-alt);
    border-radius: var(--border-radius);
    padding: 32px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

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

/* ============================================
   Pro Section
   ============================================ */
.pro-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d4a 100%);
    color: white;
}

.pro-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.pro-badge {
    display: inline-block;
    background: var(--secondary);
    color: #1a1a2e;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.pro-content h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.pro-content > p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 32px;
}

.pro-features-list {
    list-style: none;
    padding: 0;
    margin-bottom: 40px;
}

.pro-features-list li {
    padding: 12px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pro-features-list li::before {
    content: "\2713";
    color: var(--secondary);
    margin-right: 12px;
    font-weight: bold;
}

.pricing {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.price-option {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 24px 32px;
    text-align: center;
    position: relative;
}

.price-option.featured {
    background: var(--primary);
    transform: scale(1.05);
}

.save-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: #1a1a2e;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.price {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
}

.period {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ============================================
   Languages Section
   ============================================ */
.languages {
    padding: 80px 0;
    text-align: center;
}

.language-flags {
    display: flex;
    justify-content: center;
    gap: 24px;
    font-size: 2.5rem;
    margin-top: 32px;
}

/* ============================================
   Download Section
   ============================================ */
.download {
    padding: 100px 0;
    text-align: center;
    background: var(--background-alt);
}

.download h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.download p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: #1a1a2e;
    color: white;
    padding: 60px 0 40px;
}

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

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-brand .logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.5);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 8px;
}

.footer-bottom a:hover {
    color: white;
}

/* ============================================
   Legal Pages (Privacy, Terms)
   ============================================ */
.legal-page {
    padding: 120px 0 80px;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.last-updated {
    color: var(--text-light);
    margin-bottom: 48px;
}

.legal-content section {
    margin-bottom: 40px;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.legal-content h3 {
    font-size: 1.2rem;
    margin: 24px 0 12px;
}

.legal-content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.legal-content ul, .legal-content ol {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.legal-content li {
    margin-bottom: 8px;
}

.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    margin-bottom: 12px;
}

.company-info {
    background: var(--background-alt);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-top: 24px;
}

.summary-box {
    background: var(--background-alt);
    padding: 32px;
    border-radius: var(--border-radius);
    margin-top: 48px;
}

.summary-box h2 {
    border: none;
    padding-top: 0;
    margin-bottom: 24px;
}

.privacy-summary {
    width: 100%;
    border-collapse: collapse;
}

.privacy-summary td {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.privacy-summary td:last-child {
    text-align: right;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-green {
    background: #e6f7ed;
    color: #00873c;
}

.badge-blue {
    background: #e6f0ff;
    color: #0052cc;
}

.warning-box {
    background: #fff8e6;
    border-left: 4px solid var(--warning);
    padding: 20px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin: 24px 0;
}

.warning-box h3 {
    color: #996600;
    margin: 0 0 8px 0;
}

.warning-box p {
    margin: 0;
    color: #664400;
}

/* ============================================
   Support Page
   ============================================ */
.support-page {
    padding: 120px 0 80px;
}

.support-page h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 8px;
}

.page-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-bottom: 48px;
}

.contact-card {
    background: var(--primary);
    color: white;
    text-align: center;
    padding: 48px;
    border-radius: var(--border-radius);
    margin-bottom: 60px;
}

.contact-card h2 {
    margin-bottom: 12px;
}

.contact-card p {
    opacity: 0.9;
    margin-bottom: 24px;
}

.contact-card .btn {
    background: white;
    color: var(--primary);
}

.contact-card .btn:hover {
    background: var(--background-alt);
}

.response-time {
    margin-top: 16px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.faq-section {
    margin-bottom: 60px;
}

.faq-section h2 {
    font-size: 2rem;
    margin-bottom: 32px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.faq-category h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

.faq-item {
    margin-bottom: 24px;
}

.faq-item h4 {
    font-size: 1rem;
    margin-bottom: 8px;
}

.faq-item p, .faq-item ul, .faq-item ol {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.feature-request {
    text-align: center;
    padding: 60px;
    background: var(--background-alt);
    border-radius: var(--border-radius);
    margin-bottom: 60px;
}

.feature-request h2 {
    margin-bottom: 12px;
}

.feature-request p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.contact-info h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.contact-item {
    background: var(--background-alt);
    padding: 24px;
    border-radius: var(--border-radius);
    text-align: center;
}

.contact-item h4 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

.contact-item a {
    font-weight: 600;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 32px;
    }

    .hero-image {
        order: -1;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 16px;
    }

    .nav-links {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

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

    .price-option.featured {
        transform: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

@media (max-width: 480px) {
    .hero {
        padding: 140px 0 60px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .phone-mockup {
        max-width: 260px;
    }

    .btn-large {
        padding: 16px 24px;
        font-size: 1rem;
    }

    .language-flags {
        font-size: 2rem;
        gap: 16px;
        flex-wrap: wrap;
    }
}

/* ============================================
   Interactive Sections
   ============================================ */

.interactive-section {
    padding: 80px 0;
    background: var(--background-alt);
}

.calc-section {
    background: var(--background);
}

/* Wire Lookup Card */
.lookup-card,
.calc-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
    max-width: 760px;
    margin: 0 auto;
}

.country-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.country-btn {
    padding: 8px 16px;
    border: 2px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.country-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.country-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.phase-toggle {
    display: flex;
    gap: 0;
    margin-bottom: 32px;
    border: 2px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    width: fit-content;
}

.phase-btn {
    padding: 8px 24px;
    border: none;
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.phase-btn.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}

.wire-colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.wire-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    background: var(--background-alt);
    border-radius: 12px;
    transition: transform 0.2s;
}

.wire-item:hover {
    transform: translateY(-2px);
}

.wire-swatch {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.wire-swatch.striped {
    background: repeating-linear-gradient(
        45deg,
        var(--c1) 0px,
        var(--c1) 6px,
        var(--c2) 6px,
        var(--c2) 12px
    );
}

.wire-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.wire-symbol {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}

.wire-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.standard-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 28px;
}

.old-tag {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.lookup-cta,
.calc-cta {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.lookup-cta p,
.calc-cta p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    flex: 1;
}

/* Ohm's Law Calculator */
.calc-formula {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 32px;
    letter-spacing: 2px;
}

.calc-inputs {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.calc-field {
    flex: 1;
    min-width: 130px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calc-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calc-input-wrap {
    position: relative;
}

.calc-input-wrap input {
    width: 100%;
    padding: 12px 44px 12px 14px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: var(--transition);
    background: #fff;
}

.calc-input-wrap input:focus {
    outline: none;
    border-color: var(--primary);
}

.calc-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
    pointer-events: none;
}

.calc-separator {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-light);
    padding-bottom: 10px;
    flex-shrink: 0;
}

.calc-field.calc-highlight input {
    border-color: var(--success);
    background: #f0fff4;
}

.calc-result {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.result-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.result-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--success);
}

.result-error {
    font-size: 0.9rem;
    color: var(--error);
}

.btn-clear {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    margin-bottom: 24px;
    transition: var(--transition);
}

.btn-clear:hover {
    border-color: var(--error);
    color: var(--error);
}

@media (max-width: 600px) {
    .lookup-card,
    .calc-card {
        padding: 24px 16px;
    }

    .calc-inputs {
        flex-direction: column;
    }

    .calc-separator {
        display: none;
    }

    .lookup-cta,
    .calc-cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .wire-colors-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
