/* =========================================================
   TW SOLAR — Public site styles
   ========================================================= */
:root {
    --orange: #e86f12;
    --orange-dark: #c65a0a;
    --orange-mid: #f59a3a;
    --orange-soft: #fff3e8;
    --orange-card: #ffead6;
    --ink: #1f1f1f;
    --muted: #5c6570;
    --line: #e8eaee;
    --bg: #f7f4f0;
    --bg-warm: #faf6f1;
    --white: #ffffff;
    --success-bg: #e8f8ee;
    --success-text: #166534;
    --error-bg: #fef2f2;
    --error-text: #991b1b;
    --shadow: 0 18px 40px rgba(31, 31, 31, 0.08);
    --radius: 14px;
    --header-h: 76px;
    --font: 'Manrope', system-ui, sans-serif;
    --display: 'Outfit', 'Manrope', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--white);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; }

.container {
    width: min(1140px, calc(100% - 2.5rem));
    margin-inline: auto;
}

/* ----- Motion ----- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes captionIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes kenBurns {
    from { transform: scale(1); }
    to { transform: scale(1.06); }
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----- Header ----- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(232, 234, 238, 0.9);
    height: var(--header-h);
}

.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s ease;
}

.brand:hover { opacity: 0.85; }
.brand-logo { height: 44px; width: auto; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.main-nav a {
    font-weight: 650;
    font-size: 0.94rem;
    color: var(--ink);
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.main-nav a:hover { color: var(--orange); background: var(--orange-soft); }

.main-nav a.active {
    color: var(--orange);
    background: var(--orange-soft);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--ink);
    transition: transform 0.2s ease;
}

/* ----- Hero slider ----- */
.hero-slider {
    position: relative;
    height: min(72vh, 640px);
    overflow: hidden;
    background: #1a1510;
}

.hero-slider.hero-compact {
    height: min(48vh, 420px);
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    z-index: 1;
    pointer-events: auto;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
}

.slide.active img {
    animation: kenBurns 8s ease forwards;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(18, 14, 10, 0.72) 0%, rgba(18, 14, 10, 0.35) 48%, rgba(18, 14, 10, 0.2) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.45) 100%);
    display: flex;
    align-items: flex-end;
    padding: 4rem clamp(1.5rem, 6vw, 5.5rem) 5rem;
}

.slide-caption {
    color: var(--white);
    max-width: 680px;
    width: min(1140px, 100%);
}

.slide.active .slide-caption {
    animation: captionIn 0.75s ease both;
}

.brand-mark {
    display: inline-block;
    font-family: var(--display);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--orange-mid);
    margin-bottom: 0.85rem;
}

.slide-caption h1,
.slide-caption h2 {
    font-family: var(--display);
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.08;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.slide-caption p {
    font-size: 1.08rem;
    opacity: 0.92;
    max-width: 460px;
    font-weight: 500;
    line-height: 1.55;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.slider-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 0.55rem;
}

.slider-dots button {
    width: 2rem;
    height: 4px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0;
    transition: background 0.25s ease, width 0.25s ease;
}

.slider-dots button.active {
    background: var(--orange);
    width: 2.6rem;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    color: var(--white);
    font-size: 1.15rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.slider-arrow:hover {
    background: var(--orange);
    border-color: var(--orange);
}

.slider-arrow.prev { left: 1.25rem; }
.slider-arrow.next { right: 1.25rem; }

/* ----- Sections ----- */
.section {
    padding: 4.5rem 0;
    position: relative;
}

.section-muted {
    background:
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(232, 111, 18, 0.08), transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 100%, rgba(245, 154, 58, 0.07), transparent 50%),
        var(--bg-warm);
}

.section-sky {
    background:
        linear-gradient(180deg, #ffffff 0%, #f7f4f0 100%);
}

.section-title {
    font-family: var(--display);
    font-size: clamp(1.75rem, 3.2vw, 2.25rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.55rem;
    letter-spacing: -0.02em;
}

.section-lead {
    text-align: center;
    color: var(--muted);
    max-width: 560px;
    margin: 0 auto 2.5rem;
    font-size: 1.05rem;
}

/* ----- Verify card ----- */
.verify-wrap {
    margin-top: -4.25rem;
    position: relative;
    z-index: 5;
}

.verify-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(232, 111, 18, 0.08);
    padding: 2.25rem 2rem;
    max-width: 680px;
    margin: 0 auto;
    animation: fadeUp 0.6s ease both;
}

.verify-card h2 {
    font-family: var(--display);
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}

.verify-card .subtitle {
    color: var(--muted);
    margin-bottom: 1.6rem;
}

.form-group { margin-bottom: 1.1rem; }

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.45rem;
}

.form-group label .req { color: #dc2626; }

.form-control {
    width: 100%;
    padding: 0.95rem 1.05rem;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: #fcfcfc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--orange);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(232, 111, 18, 0.12);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 750;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: linear-gradient(180deg, var(--orange-mid) 0%, var(--orange) 100%);
    color: var(--white);
    box-shadow: 0 8px 20px rgba(232, 111, 18, 0.28);
}

.btn-primary:hover {
    background: linear-gradient(180deg, var(--orange) 0%, var(--orange-dark) 100%);
    box-shadow: 0 10px 24px rgba(232, 111, 18, 0.35);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(6px);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.24);
}

.btn-block { width: 100%; }

.btn-secondary {
    background: #eceff3;
    color: var(--ink);
}

.btn-secondary:hover { background: #dde2e8; }

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-danger { background: #ef4444; color: var(--white); }
.btn-danger:hover { background: #dc2626; }
.btn-edit { background: #3b82f6; color: var(--white); }
.btn-edit:hover { background: #2563eb; }

/* ----- Alerts ----- */
.alert {
    padding: 0.9rem 1.05rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    font-weight: 650;
}

.alert-success { background: var(--success-bg); color: var(--success-text); }
.alert-error { background: var(--error-bg); color: var(--error-text); }
.alert-info { background: #eff6ff; color: #1e40af; }

/* ----- Result grid ----- */
.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
    margin-top: 1.35rem;
}

.result-item {
    background: linear-gradient(160deg, var(--orange-card), #fff6ed);
    border-radius: 10px;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(232, 111, 18, 0.1);
    animation: fadeUp 0.45s ease both;
}

.result-item:nth-child(2) { animation-delay: 0.05s; }
.result-item:nth-child(3) { animation-delay: 0.1s; }
.result-item:nth-child(4) { animation-delay: 0.15s; }
.result-item:nth-child(5) { animation-delay: 0.2s; }
.result-item:nth-child(6) { animation-delay: 0.25s; }
.result-item:nth-child(7) { animation-delay: 0.3s; }
.result-item:nth-child(8) { animation-delay: 0.35s; }

.result-item .label {
    display: block;
    font-size: 0.72rem;
    font-weight: 750;
    color: #9a6a3d;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.result-item .value {
    font-weight: 750;
    font-size: 1rem;
    word-break: break-word;
}

/* ----- Features ----- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.feature-card {
    padding: 1.75rem 1.4rem 1.75rem 0;
    border-top: 2px solid var(--orange);
    background: transparent;
}

.feature-icon {
    font-family: var(--display);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    color: var(--orange);
    font-weight: 800;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-family: var(--display);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.feature-card p {
    color: var(--muted);
    font-size: 0.98rem;
}

.about-block {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.about-block p {
    color: var(--muted);
    font-size: 1.1rem;
}

.about-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
    align-items: center;
}

.about-panel .copy h2 {
    font-family: var(--display);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    margin-bottom: 0.85rem;
    letter-spacing: -0.02em;
}

.about-panel .copy p {
    color: var(--muted);
    margin-bottom: 1.4rem;
    font-size: 1.05rem;
}

.about-visual {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 280px;
    box-shadow: var(--shadow);
}

.about-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 280px;
}

.page-hero {
    position: relative;
    background:
        linear-gradient(115deg, rgba(28, 20, 12, 0.78), rgba(232, 111, 18, 0.55)),
        url('../images/slides/slide2.jpg') center/cover;
    color: var(--white);
    padding: 5.5rem 1.5rem 5rem;
    text-align: center;
    overflow: hidden;
}

.page-hero h1 {
    font-family: var(--display);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    animation: captionIn 0.7s ease both;
}

.page-hero p {
    margin-top: 0.65rem;
    opacity: 0.95;
    max-width: 520px;
    margin-inline: auto;
    font-size: 1.05rem;
    animation: captionIn 0.7s ease 0.08s both;
}

.content-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
    padding: 2.4rem 2.1rem;
    max-width: 820px;
    margin: -2.5rem auto 0;
    position: relative;
    z-index: 2;
}

.content-card h2 {
    font-family: var(--display);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.content-card h2 + p,
.content-card p { color: var(--muted); margin-bottom: 1.1rem; }

.content-card h2:not(:first-child) { margin-top: 1.75rem; }

.content-card ul {
    margin: 0.75rem 0 1.5rem 1.15rem;
    list-style: disc;
    color: var(--muted);
}

.content-card li { margin-bottom: 0.45rem; }

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.75rem;
}

/* ----- Auth ----- */
.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 70% 50% at 50% 0%, rgba(232, 111, 18, 0.12), transparent 60%),
        var(--bg-warm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    width: min(420px, 100%);
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
    padding: 2.15rem 1.85rem;
    text-align: center;
    animation: fadeUp 0.5s ease both;
}

.auth-card .brand-logo {
    height: 48px;
    margin: 0 auto 1.25rem;
}

.auth-card h1 {
    font-family: var(--display);
    font-size: 1.55rem;
    margin-bottom: 0.35rem;
}

.auth-card .subtitle {
    color: var(--muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.auth-card .form-group { text-align: left; }

.auth-footer {
    margin-top: 1.5rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.auth-links {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.auth-links a { color: var(--orange); font-weight: 650; }

/* ----- Footer ----- */
.site-footer {
    margin-top: auto;
    background:
        linear-gradient(90deg, #d9650f 0%, var(--orange) 50%, #f08a28 100%);
    color: var(--white);
    text-align: center;
    padding: 1.35rem 1rem;
    font-weight: 650;
    font-size: 0.92rem;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
    .feature-grid { grid-template-columns: 1fr; gap: 0.5rem; }
    .feature-card { padding: 1.4rem 0; }
    .result-grid { grid-template-columns: 1fr; }
    .about-panel { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .main-nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: stretch;
        padding: 0.75rem;
        gap: 0.15rem;
        border-bottom: 1px solid var(--line);
        display: none;
        box-shadow: var(--shadow);
    }

    .main-nav.open { display: flex; }

    .main-nav a {
        padding: 0.85rem 1rem;
        border-radius: 10px;
    }

    .hero-slider { height: 58vh; }
    .hero-slider.hero-compact { height: 42vh; }
    .slide-overlay { padding: 2.5rem 1.4rem 3.5rem; align-items: flex-end; }
    .verify-wrap { margin-top: -3rem; }
    .verify-card { padding: 1.6rem 1.35rem; }
    .slider-arrow { display: none; }
    .slider-dots { bottom: 1.1rem; }
}
