/* ==========================================================================
   Terrible Focus Website - Styles
   Soft, muted, cozy, playful
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables - Color Palette (matched to iOS app)
   -------------------------------------------------------------------------- */
:root {
    /* Primary colors - matched to app ButtonStyles.swift */
    --color-white: #FFFFFF;
    --color-blue-light: #E8F4F8;
    --color-primary: #2B4D5D;          /* potatoPrimary - main brand teal */
    --color-blue: #2B4D5D;             /* Same as primary for compatibility */
    --color-blue-dark: #1A2E35;

    /* Accent colors from app */
    --color-green: #A1C96E;            /* potatoGreen - accent */
    --color-orange: #E39444;           /* potatoOrange - alert/warning */
    --color-gray: #818EA5;             /* potatoGray - secondary */
    --color-cream: #FFF8E7;            /* dialogueCream - speech bubbles */

    /* Text colors */
    --color-text: #1A2E35;
    --color-text-light: #3A5560;
    --color-text-muted: #6A8590;

    /* Backgrounds */
    --color-bg-primary: var(--color-white);
    --color-bg-secondary: var(--color-blue-light);
    --color-bg-card: var(--color-white);
    --color-bg-green-light: white;

    /* Shadows */
    --shadow-soft: 0 2px 8px rgba(26, 46, 53, 0.08);
    --shadow-medium: 0 4px 16px rgba(26, 46, 53, 0.12);

    /* Borders */
    --border-radius: 16px;
    --border-radius-small: 8px;
    --border-radius-large: 24px;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-xxl: 2rem;

    /* Typography */
    --font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 18px;
    --line-height-base: 1.6;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background-color: var(--color-bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.site-header {
    background-color: var(--color-primary);
    padding: 1rem 0;
}

.about-content {
    padding: var(--spacing-xl) 0 var(--spacing-xxl);
}

.about-content .container {
    max-width: 750px;
}

.about-content h1 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-lg);
}

.about-section {
    padding: 1.5rem 0;
}

.about-section p {
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
}

.about-section h2 {
    text-align: left;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.about-cta {
    text-align: center;
    padding-top: 2rem;
}

.site-logo {
    color: var(--color-white);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.site-logo:hover {
    color: var(--color-white);
    opacity: 0.9;
}

section {
    padding: 4rem 0;
}

/* Section divider - blurred transition between colors */
/* Note: --color-bg-green-solid is the rendered result of 10% green over white */
.section-blur-teal-green {
    height: 36px;
    background: linear-gradient(
        to bottom,
        var(--color-primary) 0%,
        #F0F5E6 100%
    );
    filter: blur(8px);
    margin: -18px -50px;
    position: relative;
    z-index: 1;
    display: none;  /* Temporarily hidden */
}

.section-blur-green-teal {
    height: 36px;
    background: linear-gradient(
        to bottom,
        #F0F5E6 0%,
        var(--color-primary) 100%
    );
    filter: blur(8px);
    margin: -18px -50px;
    position: relative;
    z-index: 1;
    display: none;  /* Temporarily hidden */
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-blue-dark);
}

h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin-bottom: var(--spacing-lg);
    text-align: center;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

p {
    margin-bottom: var(--spacing-sm);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
    background: var(--color-primary);  /* Solid primary teal */
    padding: var(--spacing-xxl) 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.hero-content {
    max-width: 500px;
}

.hero-content h1 {
    color: var(--color-white);
}

.hero-logo {
    max-width: 300px;
    height: auto;
    margin-bottom: var(--spacing-md);
}

.hero-content .tagline {
    color: rgba(255, 255, 255, 0.85);
}

.hero-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    box-shadow: var(--shadow-medium);
    margin-bottom: var(--spacing-md);
}

.tagline {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
}

.app-store-button img {
    height: 54px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-store-button:hover img {
    transform: scale(1.05);
}

.app-store-button:active img {
    transform: scale(0.96);
}

.hero-image {
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 280px;
    height: 560px;
    background: var(--color-bg-card);
    border-radius: 40px;
    box-shadow: var(--shadow-medium);
    padding: 12px;
    border: 8px solid var(--color-blue-light);
}

.screenshot-placeholder {
    width: 100%;
    height: 100%;
    background: var(--color-blue-light);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

/* --------------------------------------------------------------------------
   About Section
   -------------------------------------------------------------------------- */
.about {
    background-image: linear-gradient(var(--color-bg-green-light), var(--color-bg-green-light));
    background-color: white;
}

.about-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
}

.about-text p {
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-light);
}

.about-text .about-highlight {
    font-weight: 700;
    color: var(--color-text);
    font-size: 1.35rem;
}

.about-text-centered {
    max-width: 750px;
    margin: 0 auto;
}

.about-text-centered p {
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: var(--spacing-md);
    color: var(--color-text-light);
}

.feature-list {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0;
}

.feature-list li {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   Features Section
   -------------------------------------------------------------------------- */
.features {
    background-color: var(--color-primary);  /* Solid primary teal */
}

.features h2 {
    color: var(--color-white);
}

.about-preview {
    background-color: var(--color-primary);
}

.about-preview .container {
    max-width: 750px;
}

.about-preview h2 {
    color: var(--color-white);
    font-size: 1.75rem;
    text-align: left;
    margin-bottom: var(--spacing-md);
}

.about-preview p {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--color-white);
    opacity: 0.9;
    text-align: left;
    margin-bottom: 0.5rem;
}

.read-more-link {
    display: block;
    color: var(--color-white);
    font-weight: 600;
    margin-top: var(--spacing-md);
    text-align: right;
}

.read-more-link:hover {
    color: var(--color-white);
    opacity: 0.8;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 8px;  /* Space for hover lift */
}

.feature {
    background: linear-gradient(var(--color-bg-green-light), var(--color-bg-green-light)), white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius-large);  /* More rounded like app */
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

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

.feature-icon {
    margin-bottom: var(--spacing-sm);
    display: flex;
    justify-content: center;
}

.feature-icon img {
    height: 120px;
    width: auto;
}

.feature h3 {
    color: var(--color-blue-dark);
}

.feature p {
    color: var(--color-text-light);
    font-size: 1rem;
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Newsletter Section
   -------------------------------------------------------------------------- */
.newsletter {
    background-image: linear-gradient(var(--color-bg-green-light), var(--color-bg-green-light));
    background-color: white;
    text-align: center;
}

.newsletter p {
    color: var(--color-text-light);
    max-width: 500px;
    margin: 0 auto var(--spacing-lg);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 350px;
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1rem;
    font-family: var(--font-family);
    border: 2px solid var(--color-primary);
    border-radius: 9999px;  /* Capsule shape to match button */
    background: rgba(255, 255, 255, 0.9);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--color-primary);
}

.newsletter-form button {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 1rem;
    font-family: var(--font-family);
    font-weight: 600;
    color: white;
    background: rgba(128, 136, 153, 0.7);  /* buttonSecondary #808899 like app settings button */
    border: none;
    border-radius: 9999px;  /* Capsule shape like app */
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease, background-color 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.newsletter-form button:hover {
    background: rgba(128, 136, 153, 0.85);
    transform: scale(1.02);
}

.newsletter-form button:active {
    transform: scale(0.96);
    opacity: 0.9;
}

.newsletter-form button.active {
    background: rgba(43, 77, 93, 0.75);  /* Primary teal when email valid */
}

.newsletter-form button.active:hover {
    background: rgba(43, 77, 93, 0.85);
}

.newsletter-note {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: var(--spacing-sm);
}

.thank-you {
    font-size: 1.125rem;
    color: var(--color-white);
    text-align: center;
    padding: var(--spacing-md) 0;
}

/* --------------------------------------------------------------------------
   FAQ Section
   -------------------------------------------------------------------------- */
.faq {
    background: var(--color-primary);  /* Solid primary teal */
}

.faq h2 {
    color: var(--color-white);
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    background: linear-gradient(var(--color-bg-green-light), var(--color-bg-green-light)), white;
    border-radius: var(--border-radius);  /* More rounded */
    margin-bottom: var(--spacing-sm);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.faq-item summary {
    padding: var(--spacing-md);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--color-primary);
    font-weight: 400;
    transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item summary:hover {
    /* No background change on hover - keep glass effect */
}

.faq-item p {
    padding: 0 var(--spacing-md) var(--spacing-md);
    color: var(--color-text-light);
    margin: 0;
}

/* --------------------------------------------------------------------------
   CTA Section
   -------------------------------------------------------------------------- */
.cta {
    background-image: linear-gradient(var(--color-bg-green-light), var(--color-bg-green-light));
    background-color: white;
    padding: var(--spacing-xl) 0;
}

.cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cta-image {
    width: 120px;
    height: auto;
    margin-bottom: var(--spacing-md);
}

.cta h2 {
    color: var(--color-text);
    margin-bottom: var(--spacing-lg);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    background-color: var(--color-primary);  /* Use primary teal like app */
    color: var(--color-white);
    padding: calc(var(--spacing-xl) * 2) 0 var(--spacing-lg);
}

.footer-columns {
    display: flex;
    justify-content: space-between;
    width: 90%;
    margin: 0 auto;
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer-column h4 {
    color: var(--color-white);
    font-size: 1rem;
    margin-bottom: var(--spacing-xs);
}

.footer-column a {
    color: var(--color-white);
    opacity: 0.8;
    font-size: 0.9375rem;
}

.footer-column a:hover {
    opacity: 1;
    color: var(--color-white);
}

.footer-bottom {
    padding-top: var(--spacing-lg);
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.8;
}

.footer-bottom p {
    margin-bottom: var(--spacing-xs);
}

.copyright {
    opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    :root {
        --font-size-base: 16px;
    }

    section {
        padding: var(--spacing-xl) 0;
    }

    .hero {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        order: 1;
    }

    .hero-icon {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-logo {
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;
    }

    .app-store-button {
        display: flex;
        justify-content: center;
    }

    .hero-image {
        order: 2;
    }

    .phone-mockup {
        width: 220px;
        height: 440px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .about-split {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        order: -1;
    }

    .about-image img {
        margin: 0 auto;
    }

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

    .footer-columns {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-lg);
    }

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

    .cta-image {
        width: 80%;
        max-width: 120px;
    }

    .hero-icon {
        width: 80%;
        max-width: 100px;
    }
}

/* --------------------------------------------------------------------------
   Legal Pages (Privacy, Terms)
   -------------------------------------------------------------------------- */
.legal-header {
    background-color: var(--color-blue-light);
    padding: var(--spacing-md) 0;
}

.back-link {
    font-weight: 600;
    color: var(--color-blue);
}

.back-link:hover {
    color: var(--color-blue-dark);
}

.legal-content {
    padding: var(--spacing-xl) 0 var(--spacing-xxl);
}

.legal-content h1 {
    margin-bottom: var(--spacing-xs);
}

.legal-content .last-updated {
    color: var(--color-text-muted);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xl);
}

.legal-content section {
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--color-blue-light);
}

.legal-content section:last-of-type {
    border-bottom: none;
}

.legal-content h2 {
    text-align: left;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.legal-content h3 {
    font-size: 1.125rem;
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    color: var(--color-text);
}

.legal-content ul {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-light);
}

.legal-content li {
    margin-bottom: var(--spacing-xs);
}

/* --------------------------------------------------------------------------
   Press Kit Page
   -------------------------------------------------------------------------- */
.presskit-content {
    padding: var(--spacing-xl) 0 var(--spacing-xxl);
}

.presskit-content .container {
    max-width: 750px;
}

.presskit-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.presskit-icon {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: var(--shadow-medium);
}

.presskit-header h1 {
    margin-bottom: var(--spacing-xs);
}

.presskit-tagline {
    color: var(--color-text-light);
    font-size: 1.125rem;
    margin: 0;
}

.presskit-content h1 {
    margin-bottom: var(--spacing-lg);
}

.presskit-section {
    padding: 1.5rem 0;
    margin-bottom: 0;
}

.presskit-section h2 {
    text-align: left;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.presskit-section h3 {
    margin-top: var(--spacing-md);
}

.presskit-section p,
.presskit-section ul {
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
}

.presskit-section ul {
    margin-left: var(--spacing-md);
}

.presskit-section li {
    margin-bottom: var(--spacing-xs);
}

.presskit-lede {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.presskit-section blockquote {
    background: var(--color-blue-light);
    border-left: 4px solid var(--color-primary);
    padding: var(--spacing-md) var(--spacing-lg);
    margin: var(--spacing-md) 0;
    border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0;
}

.presskit-section blockquote p {
    margin: 0;
    font-style: italic;
    color: var(--color-text);
}

.fact-sheet {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: var(--spacing-sm) var(--spacing-md);
    background: var(--color-blue-light);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
}

.fact-sheet dt {
    font-weight: 600;
    color: var(--color-blue-dark);
}

.fact-sheet dd {
    color: var(--color-text-light);
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.asset-item {
    background: var(--color-bg-card);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.asset-preview {
    width: 100%;
    height: 120px;
    background: var(--color-blue-light);
    border-radius: var(--border-radius-small);
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.asset-item h3 {
    font-size: 1rem;
    margin-bottom: var(--spacing-xs);
}

.asset-item a {
    font-size: 0.875rem;
}

.description-box {
    background: var(--color-bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.description-box h3 {
    margin-bottom: var(--spacing-sm);
}

.description-box p {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

.description-box p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .presskit-header {
        flex-direction: column;
        text-align: center;
    }

    .fact-sheet {
        grid-template-columns: 1fr;
    }

    .fact-sheet dt {
        margin-top: var(--spacing-sm);
    }

    .fact-sheet dt:first-child {
        margin-top: 0;
    }

    .presskit-section h2,
    .presskit-section h3,
    .presskit-section p,
    .presskit-section ul {
        margin-left: 0;
        text-align: center;
    }

    .presskit-section ul {
        list-style-position: inside;
    }

    .presskit-section blockquote {
        margin-left: 0;
        margin-right: 0;
    }

    .presskit-section blockquote p {
        text-align: left;
    }
}

/* --------------------------------------------------------------------------
   Utility Classes
   -------------------------------------------------------------------------- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
