/*
 * Frontend CSS - Public Portal Theme
 * Three-tier blue text system: dark blue, medium blue, light blue
 * All buttons: light blue text on green background
 */

:root {
    /* Backgrounds */
    --bg: #000000;
    --bg-secondary: #0a0a0a;
    --card: #0a0a0a;
    
    /* Three-tier blue text hierarchy */
    --text-dark: #5a8bb8;      /* Dark blue: brand name, h1 headings */
    --text-medium: #6fa3d0;    /* Medium blue: h2-h6 headings, button normal text */
    --text-light: #a8c7e6;     /* Light blue: ALL body text */
    
    /* Button hover state colors */
    --btn-hover-bg: #87b9e8;   /* Brighter medium blue for button hover background */
    --btn-hover-text: #5cda4a; /* Brighter light green for button hover text */
    
    /* Accents - green for buttons */
    --accent-dark: #238636;    /* Dark green: button background */
    --accent-light: #56d364;   /* Light green: button text on hover */
    --accent-hover: #2d8a3e;   /* Medium green: hover state */
    
    /* Borders and lines */
    --line: #17344a;
    --line-light: #1a3a52;
}

* { box-sizing: border-box; }

html, body { 
    height: 100%; 
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #a8c7e6 100%);
    color: var(--text-light);
    line-height: 1.6;
}

/* Links - NOT buttons */
a:not(.btn) { 
    color: var(--accent); 
    text-decoration: none; 
}
a:not(.btn):hover { 
    text-decoration: underline; 
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-medium);
    margin: 0;
    font-weight: 700;
}

h1 { 
    font-size: 28px; 
    margin-bottom: 12px; 
    color: var(--text-dark);
}
h2 { font-size: 24px; margin-bottom: 10px; }
h3 { font-size: 18px; margin-bottom: 8px; }

/* ALL paragraphs and body text use light blue */
p {
    color: var(--text-light);
    margin: 0 0 12px;
}

/* ALL BUTTONS: dark green background with medium blue text */
.btn,
a.btn,
button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    text-decoration: none;
    font-size: 14px;
    background: var(--accent-dark);
    color: var(--text-medium);
}

/* Button hover: dark blue background with light green text */
.btn:hover,
a.btn:hover,
button:hover {
    background: var(--text-dark);
    color: var(--btn-hover-text);
    text-decoration: none;
}

/* Header */
header {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 16px 20px;
}

header .wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Brand: name is dark blue, tagline is medium blue */
.brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand .name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
}

.brand .tag {
    font-size: 12px;
    color: var(--text-medium);
}

/* Screen size indicator: light blue */
#screen-size {
    font-size: 11px;
    color: var(--text-light);
    margin-left: auto;
    margin-right: 10px;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Overlay for readability when image is present */
.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(1200px 600px at 30% 35%, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.hero-inner {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: center;
    z-index: 3;
    position: relative;
}

/* Hero h1: dark blue */
.hero h1 {
    font-size: clamp(28px, 4vw, 42px);
    color: var(--text-dark);
    margin: 0 0 10px;
}

/* Hero lede (subtitle): light blue */
.hero .lede {
    font-size: clamp(14px, 2vw, 18px);
    color: var(--text-light);
    margin: 0 0 18px;
}

/* Cards */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.hero-card.primary {
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
}

.hero-card.secondary {
    background: rgba(10, 10, 10, 0.85);
}

/* ALL card headings: medium blue */
.card h1, .card h2, .card h3 {
    color: var(--text-medium);
}

/* ALL card text: light blue */
.card p {
    color: var(--text-light);
}

/* Main Content */
main.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Service Tiles Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.tile {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Tile headings: medium blue */
.tile h3 {
    color: var(--text-medium);
    font-size: 18px;
    margin: 0 0 8px;
}

/* Tile text: light blue */
.tile p {
    color: var(--text-light);
    margin: 0;
}

/* Portfolio Section */
#portfolio {
    margin: 40px 0;
}

/* Portfolio heading: medium blue */
#portfolio h2 {
    color: var(--text-medium);
    text-align: center;
    margin-bottom: 24px;
}

.grid-portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.portfolio-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* Request Estimate Section */
#request-estimate {
    margin: 40px 0;
}

#request-estimate .card {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Footer */
footer {
    background: var(--bg);
    border-top: 1px solid var(--line);
    padding: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 12px;
}

/* Login Card */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.login-card h1 {
    text-align: center;
    margin: 0 0 24px;
    font-size: 24px;
    color: var(--text-dark);
}

.login-card form {
    display: flex;
    flex-direction: column;
}

.login-card label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-medium);
    font-weight: 500;
    font-size: 14px;
}

.login-card input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 16px;
    background: var(--bg);
    border: 1px solid var(--line-light);
    border-radius: 8px;
    color: var(--text-light);
    font-family: inherit;
    font-size: 14px;
}

.login-card input:focus {
    outline: none;
    border-color: var(--accent-dark);
    box-shadow: 0 0 4px rgba(35, 134, 54, 0.2);
}

.password-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-icon {
    display: inline-block;
}

.login-card button {
    padding: 10px 16px;
    background: var(--accent-dark);
    color: var(--text-medium);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    margin-bottom: 16px;
}

.login-card button:hover {
    background: var(--text-dark);
    color: var(--btn-hover-text);
}

.login-card .actions {
    text-align: center;
    font-size: 13px;
}

.login-card .actions a {
    color: var(--accent-dark);
    text-decoration: none;
}

.login-card .actions a:hover {
    text-decoration: underline;
}

.login-card .error,
.login-card .timeout {
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: 8px;
    border: 1px solid;
    font-size: 13px;
}

.login-card .error {
    background: rgba(218, 54, 51, 0.08);
    color: #ffb4b4;
    border-color: #7a1a1a;
}

.login-card .timeout {
    background: rgba(218, 54, 51, 0.08);
    color: #ffb4b4;
    border-color: #7a1a1a;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }
    
    header .wrap {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #screen-size {
        margin: 0;
    }
}
