/* ==================== GOOGLE FONTS ==================== */
/* font-family: 'Inter', sans-serif; */
/* font-family: 'Space Grotesk', sans-serif; */

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Colors */
    --background-color: #0D0D0D;
    --text-color: #F5F5F5;
    --accent-color: #4DFFFF;
    --secondary-color: #333333;
    --container-color: #1A1A1A;

    /* Typography */
    --body-font: 'Inter', sans-serif;
    --heading-font: 'Space Grotesk', sans-serif;
    --normal-font-size: 1rem; /* 16px */
    --small-font-size: 0.875rem; /* 14px */
}

/* ==================== BASE STYLES ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4 {
    font-family: var(--heading-font);
    color: var(--text-color);
    font-weight: 500;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

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

/* ==================== REUSABLE CLASSES ==================== */
.container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ==================== HEADER ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(13, 13, 13, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--secondary-color);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
}

.header__logo {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 700;
}

.header__nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header__nav-link {
    font-size: var(--normal-font-size);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.header__nav-link:hover::after {
    width: 100%;
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--container-color);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--secondary-color);
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer__logo {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.footer__description {
    font-size: var(--small-font-size);
    color: #a0a0a0;
    max-width: 250px;
}

.footer__title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__link {
    font-size: var(--normal-font-size);
    color: #a0a0a0;
}

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

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: #a0a0a0;
}

.footer__contact-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: var(--accent-color);
}

.footer__bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--secondary-color);
    text-align: center;
}

.footer__copy {
    font-size: var(--small-font-size);
    color: #a0a0a0;
}

/* ==================== ADAPTIVE STYLES ==================== */
@media (max-width: 768px) {
    .header__nav {
        /* In a real project, we would implement a burger menu here. */
        /* For now, we'll hide the text links on small screens. */
        display: none;
    }
    
    .header__container {
        justify-content: center;
    }
}

/* ==================== BUTTONS ==================== */
.button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--background-color);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-family: var(--heading-font);
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: #87FFFF; /* Lighter accent */
    color: var(--background-color);
    transform: translateY(-3px);
}

/* ==================== HERO ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 4.5rem; /* Header height offset */
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 3rem;
}

@media (min-width: 768px) {
    .hero__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem); /* Responsive font size */
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero__text {
    font-size: 1.125rem;
    color: #a0a0a0;
    max-width: 500px;
    margin-bottom: 2.5rem;
}

.hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__img {
    border-radius: 16px;
    /* We can add more creative styles later */
}

/* --- Hero Animation --- */
.hero__title, .hero__text, .hero__cta {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.hero__title.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero__text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hero__cta.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== GENERIC SECTION STYLES ==================== */
.section {
    padding: 6rem 0;
}

.section__title {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 1rem;
}

.section__subtitle {
    max-width: 600px;
    margin: 0 auto 4rem auto;
    text-align: center;
    color: #a0a0a0;
    font-size: 1.125rem;
}

/* ==================== TEXT TOOLS SECTION ==================== */
.text-tools__interactive-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .text-tools__interactive-block {
        grid-template-columns: 250px 1fr;
        gap: 3rem;
    }
}

.text-tools__nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.text-tools__nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--secondary-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    font-family: var(--heading-font);
    font-weight: 500;
}

.text-tools__nav-item:hover {
    background-color: var(--secondary-color);
}

.text-tools__nav-item.is-active {
    background-color: var(--container-color);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.text-tools__nav-icon {
    width: 24px;
    height: 24px;
}

.text-tools__showcase {
    background-color: var(--container-color);
    border-radius: 12px;
    border: 1px solid var(--secondary-color);
    padding: 2rem;
    min-height: 300px;
}

.text-tools__panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.text-tools__panel.is-active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel__request {
    margin-bottom: 2rem;
    border-bottom: 1px dashed var(--secondary-color);
    padding-bottom: 1.5rem;
}

.panel__title {
    font-size: 1rem;
    text-transform: uppercase;
    color: #a0a0a0;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.panel__text--ai {
    font-family: 'Roboto Mono', monospace; /* Using a monospace font for AI output */
    color: #E0E0E0;
}

.panel__response {
    box-shadow: 0 0 15px rgba(77, 255, 255, 0.1);
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 1rem;
}

.panel__list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 1.5rem;
}

.panel__list li {
    list-style-type: '✓  ';
}

/* ==================== IMAGE TOOLS SECTION ==================== */
.image-tools {
    background-color: var(--container-color);
}

.image-tools__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.image-tools__card {
    background-color: var(--background-color);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    /* Animation initial state */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.3s ease;
}

.image-tools__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.image-tools__card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.card__image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: var(--secondary-color);
}

.card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card__content {
    padding: 1.5rem;
}

.card__style-tag {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--background-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: var(--heading-font);
    margin-bottom: 1rem;
}

.card__prompt {
    font-size: var(--small-font-size);
    color: #a0a0a0;
    line-height: 1.5;
}

.card__prompt strong {
    color: var(--text-color);
}

/* ==================== PLANNING TOOLS SECTION ==================== */
.planning-tools__widget {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--container-color);
    border: 1px solid var(--secondary-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.planning-tools__controls {
    display: flex;
    justify-content: center;
    background-color: var(--background-color);
    padding: 1rem;
    border-bottom: 1px solid var(--secondary-color);
}

.planning-tools__button {
    background: none;
    border: none;
    color: #a0a0a0;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-family: var(--heading-font);
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.planning-tools__button:hover {
    color: var(--text-color);
}

.planning-tools__button.is-active {
    background-color: var(--accent-color);
    color: var(--background-color);
}

.planning-tools__checklist-wrapper {
    padding: 2rem;
    min-height: 400px;
    transition: opacity 0.3s ease;
}

.planning-tools__checklist.is-loading {
    opacity: 0;
}

.planning-tools__checklist {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.planning-tools__checklist li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    color: #c0c0c0;
    
    /* Animation */
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

.planning-tools__checklist.is-visible li {
    opacity: 1;
    transform: translateX(0);
}

.checklist__icon {
    flex-shrink: 0;
    color: var(--accent-color);
    margin-top: 3px;
}

.checklist__header {
    font-family: var(--heading-font);
    font-size: 1.125rem;
    color: var(--text-color);
    margin-top: 1rem;
    margin-bottom: -0.5rem;
}

.checklist__header:first-child {
    margin-top: 0;
}

/* ==================== ANALYSIS TOOLS SECTION ==================== */
.analysis-tools {
    background-color: var(--container-color);
}

.analysis-tools__component {
    display: grid;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 992px) {
    .analysis-tools__component {
        grid-template-columns: 1fr auto 1fr;
    }
}

.analysis-tools__raw-data,
.analysis-tools__summary {
    background-color: var(--background-color);
    border: 1px solid var(--secondary-color);
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
}

.raw-data__title,
.summary__title {
    font-size: 1rem;
    text-transform: uppercase;
    color: #a0a0a0;
    margin-bottom: 1.5rem;
    font-weight: 500;
    text-align: center;
}

.raw-data__content {
    position: relative;
    overflow: hidden;
}

.raw-data__content p {
    font-family: 'Roboto Mono', monospace;
    font-size: var(--small-font-size);
    color: #a0a0a0;
    line-height: 1.8;
}

/* --- Scan Line Animation --- */
.raw-data__scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0;
    animation: scan-effect 2s ease-out forwards;
    animation-play-state: paused; /* Initially paused */
}

.analysis-tools__component.is-active .raw-data__scan-line {
    animation-play-state: running; /* Run animation when active */
}

@keyframes scan-effect {
    0% { top: 0; opacity: 0.8; }
    90% { top: 100%; opacity: 0.8; }
    100% { top: 100%; opacity: 0; }
}

.analysis-tools__arrow {
    text-align: center;
    color: var(--accent-color);
}

.analysis-tools__arrow i {
    width: 48px;
    height: 48px;
}

@media (max-width: 991px) {
    .analysis-tools__arrow {
        transform: rotate(90deg);
        margin: 1rem 0;
    }
}

.summary__content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.summary__group-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.summary__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-left: 1.75rem;
}

.summary__list li {
    position: relative;
    /* Animation initial state */
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.summary__list--pros .summary__group-title { color: #28a745; }
.summary__list--cons .summary__group-title { color: #dc3545; }

.summary__list li::before {
    position: absolute;
    left: -1.75rem;
    font-family: var(--heading-font);
    font-weight: 700;
}

.summary__list--pros li::before {
    content: '+';
    color: #28a745;
}

.summary__list--cons li::before {
    content: '–';
    color: #dc3545;
}

/* --- Summary List Animation --- */
.analysis-tools__component.is-active .summary__list li {
    opacity: 1;
    transform: translateX(0);
}

/* ==================== CONTACT SECTION ==================== */
.contact {
    padding-bottom: 8rem; /* Extra space at the bottom */
}

.contact__wrapper {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--container-color);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--secondary-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form__label {
    font-family: var(--heading-font);
    font-weight: 500;
    color: #c0c0c0;
}

.form__input {
    width: 100%;
    padding: 0.875rem 1rem;
    background-color: var(--background-color);
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    font-family: var(--body-font);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form__input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(77, 255, 255, 0.2);
}

.form__input.is-invalid {
    border-color: #dc3545;
}

.form__group--captcha {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.form__captcha-problem {
    font-family: var(--heading-font);
    font-size: 1.125rem;
}

.form__input--captcha {
    width: 80px;
}

.form__group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--small-font-size);
}

.form__checkbox-label a {
    color: var(--accent-color);
    text-decoration: underline;
}

.contact-form__submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* Success Message */
.contact-form__success-message {
    display: none; /* Initially hidden */
    text-align: center;
    padding: 2rem;
}

.success-message__icon {
    width: 64px;
    height: 64px;
    color: #28a745;
    margin-bottom: 1rem;
}

.success-message__title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ==================== COOKIE POP-UP ==================== */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Initially hidden below the screen */
    left: 0;
    width: 100%;
    background-color: var(--container-color);
    border-top: 1px solid var(--secondary-color);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    z-index: 200;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    transition: bottom 0.5s ease-in-out;
}

.cookie-popup.is-visible {
    bottom: 0;
}

.cookie-popup__text {
    color: #c0c0c0;
    text-align: center;
}

.cookie-popup__text a {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie-popup__button {
    background-color: var(--accent-color);
    color: var(--background-color);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--heading-font);
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

.cookie-popup__button:hover {
    background-color: #87FFFF;
}

/* ==================== GENERIC TEXT PAGES (PRIVACY, TERMS, ETC.) ==================== */
.pages {
    padding: 8rem 0; /* Extra padding to separate from header/footer */
}

.pages .container {
    max-width: 800px; /* Optimal width for reading */
}

.pages h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 2rem;
    line-height: 1.2;
}

.pages h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.pages p, 
.pages li {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #c0c0c0;
    margin-bottom: 1.5rem;
}

.pages ul {
    list-style-type: disc;
    padding-left: 2rem;
}

.pages a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 500;
}

.pages a:hover {
    text-decoration: none;
}

.pages strong {
    color: var(--text-color);
    font-weight: 500;
}