/* ==========================================================================
   GALAM AI Services — Landing Page
   Motto-inspired: clean, large type, light, generous whitespace
   ========================================================================== */

:root {
    --color-bg: #ffffff;
    --color-bg-elevated: #f8f8f8;
    --color-bg-subtle: #f2f2f2;
    --color-text: #111111;
    --color-text-secondary: #555555;
    --color-text-tertiary: #999999;
    --color-accent: #111111;
    --color-border: #e0e0e0;
    --color-border-subtle: #eeeeee;
    --color-success: #333333;

    --font-display: 'Space Grotesk', -apple-system, sans-serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;

    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;
    --space-3xl: 8rem;

    --max-width: 1200px;
    --content-padding: clamp(1.5rem, 5vw, 4rem);

    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* Typography — Motto-style large type */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

h1 { font-size: clamp(2.75rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
    color: var(--color-text-secondary);
}

/* ==========================================================================
   Navigation — Minimal
   ========================================================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--content-padding);
    background: transparent;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border-subtle);
}

.logo-img {
    height: 72px;
    width: auto;
}

.nav-cta {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    background: var(--color-text);
    color: var(--color-bg);
    border-radius: 4px;
    transition: opacity var(--transition-fast);
}

.nav-cta:hover {
    opacity: 0.9;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 1rem 2rem;
    border-radius: 4px;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--color-bg-elevated);
    border-color: var(--color-text-tertiary);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1rem;
}

/* ==========================================================================
   Sections — Base
   ========================================================================== */

section {
    padding: var(--space-3xl) var(--content-padding);
    max-width: none;
    margin: 0 auto;
}

/* Inner content constraint for sections without explicit wrappers */
.workflows > .section-header,
.workflows > .workflow-grid,
.process > .section-header,
.process > .process-grid,
.backstory > .section-header,
.backstory > .backstory-body,
.pricing > .section-header,
.pricing > .pricing-grid {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

.section-label {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-sm);
}

.section-header {
    margin-bottom: var(--space-2xl);
}

.section-title {
    color: var(--color-text);
    max-width: 800px;
}

/* ==========================================================================
   Hero — Motto-inspired large type
   ========================================================================== */

.hero {
    min-height: 100vh;
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-3xl) var(--content-padding);
    position: relative;
}

.hero-content {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    animation: fadeInUp 0.8s ease-out;
}

.hero-label {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: var(--space-lg);
}

.hero-title {
    color: var(--color-text);
    margin-bottom: var(--space-lg);
    max-width: 900px;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--color-text-secondary);
    max-width: 640px;
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-xl);
    left: var(--content-padding);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.hero-scroll span {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.scroll-line {
    width: 60px;
    height: 1px;
    background: var(--color-border);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 100%;
    background: var(--color-text-tertiary);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* ==========================================================================
   Story / Problem Section
   ========================================================================== */

.story {
    max-width: none;
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border-subtle);
    border-bottom: 1px solid var(--color-border-subtle);
}

.story-content {
    max-width: var(--max-width);
    margin: 0 auto;
}

.story-quote {
    color: var(--color-text);
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    line-height: 1.3;
    max-width: 900px;
    margin-bottom: var(--space-lg);
}

.story-result {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--color-success);
    font-weight: 500;
    max-width: 600px;
}

/* ==========================================================================
   Workflows
   ========================================================================== */

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--space-lg);
}

.workflow-card {
    padding: var(--space-lg);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: all var(--transition-base);
}

.workflow-card:hover {
    border-color: var(--color-text-tertiary);
    transform: translateY(-2px);
}

.workflow-number {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-tertiary);
    display: block;
    margin-bottom: var(--space-md);
}

.workflow-card h3 {
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.workflow-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.compare-label {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: var(--space-xs);
}

.before .compare-label {
    color: var(--color-text-tertiary);
}

.after .compare-label {
    color: var(--color-success);
}

.before p,
.after p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ==========================================================================
   Process
   ========================================================================== */

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.process-step {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-border);
}

.step-number {
    font-family: var(--font-display);
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 300;
    color: var(--color-border);
    line-height: 1;
    flex-shrink: 0;
}

.step-content h3 {
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.step-duration {
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: var(--space-sm);
}

.step-content p {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================================================
   Backstory
   ========================================================================== */

.backstory-body {
    max-width: 680px;
}

.backstory-body p {
    font-size: clamp(1.05rem, 1.8vw, 1.2rem);
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.backstory-body p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Why GALAM
   ========================================================================== */

.why {
    max-width: none;
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border-subtle);
    border-bottom: 1px solid var(--color-border-subtle);
}

.why .section-header {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-2xl);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    max-width: var(--max-width);
    margin: 0 auto;
}

.why-card {
    padding: var(--space-lg);
}

.why-card h3 {
    color: var(--color-text);
    margin-bottom: var(--space-sm);
    font-size: 1.25rem;
}

.why-card p {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================================================
   Pricing
   ========================================================================== */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.pricing-card {
    padding: var(--space-xl);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-base);
}

.pricing-card:hover {
    border-color: var(--color-text-tertiary);
    transform: translateY(-2px);
}

.pricing-card-featured {
    border-color: var(--color-text);
    position: relative;
}

.pricing-card-featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: var(--space-lg);
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--color-text);
    color: var(--color-bg);
    padding: 4px 12px;
    border-radius: 2px;
}

.pricing-card h3 {
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.price {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 500;
    color: var(--color-text);
    letter-spacing: -0.02em;
    margin-bottom: var(--space-lg);
}

.pricing-card ul {
    list-style: none;
    margin-bottom: var(--space-xl);
    flex-grow: 1;
}

.pricing-card li {
    position: relative;
    padding-left: var(--space-md);
    margin-bottom: var(--space-xs);
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

.pricing-card li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--color-text-tertiary);
    font-size: 0.85rem;
}

.pricing-card .btn {
    width: 100%;
}

/* ==========================================================================
   CTA
   ========================================================================== */

.cta {
    max-width: none;
    text-align: center;
    background: var(--color-bg);
    padding: var(--space-3xl) var(--content-padding);
}

.cta-content {
    max-width: 650px;
    margin: 0 auto;
}

.cta-title {
    color: var(--color-text);
    margin-bottom: var(--space-md);
}

.cta-text {
    font-size: 1.15rem;
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: var(--color-bg-elevated);
    border-top: 1px solid var(--color-border);
    padding: var(--space-2xl) var(--content-padding);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: var(--space-2xl);
    margin-bottom: var(--space-lg);
}

.footer-brand {
    max-width: 360px;
}

.footer-logo {
    height: 28px;
    width: auto;
    margin-bottom: var(--space-sm);
}

.footer-brand p {
    font-size: 0.9rem;
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-sm);
}

.footer-col a {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--color-text);
}

.footer-bottom {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border-subtle);
}

.footer-bottom p {
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    /* --- Global mobile spacing --- */
    section {
        padding: var(--space-2xl) var(--content-padding);
    }

    .section-header {
        margin-bottom: var(--space-xl);
    }

    /* --- Typography: bump minimum sizes for readability --- */
    h1 { font-size: clamp(2rem, 8vw, 2.75rem); }
    h2 { font-size: clamp(1.6rem, 6vw, 2rem); }
    h3 { font-size: clamp(1.15rem, 4vw, 1.35rem); }

    /* Remove all <br> from headings on mobile */
    .hero-title br,
    .section-title br {
        display: none;
    }

    /* --- Navigation --- */
    .logo-img {
        height: 48px;
    }

    .nav-cta {
        font-size: 0.85rem;
        padding: 0.6rem 1.2rem;
    }

    /* --- Hero --- */
    .hero {
        min-height: auto;
        padding-top: calc(var(--space-2xl) + 60px);
        padding-bottom: var(--space-2xl);
    }

    .hero-scroll {
        display: none;
    }

    .hero-subtitle {
        font-size: 1.05rem;
        line-height: 1.7;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    /* --- Story section --- */
    .story-quote {
        font-size: clamp(1.4rem, 5vw, 1.75rem);
        line-height: 1.4;
    }

    .story-result {
        font-size: 1.05rem;
    }

    /* --- Section labels: ensure legibility --- */
    .section-label,
    .hero-label {
        font-size: 0.8rem;
    }

    /* --- Base body text: 1.1rem floor on mobile --- */
    p {
        font-size: 1.1rem;
        line-height: 1.75;
    }

    /* --- Workflow cards --- */
    .workflow-grid {
        grid-template-columns: 1fr;
    }

    .workflow-card {
        padding: var(--space-md);
    }

    .workflow-compare {
        grid-template-columns: 1fr;
    }

    .before p,
    .after p {
        font-size: 1.1rem;
        line-height: 1.65;
    }

    .compare-label {
        font-size: 0.85rem;
    }

    .workflow-number {
        font-size: 0.85rem;
    }

    /* --- Process steps --- */
    .process-grid {
        grid-template-columns: 1fr;
    }

    .step-number {
        font-size: 2.5rem;
    }

    .step-content p {
        font-size: 1.1rem;
        line-height: 1.75;
    }

    .step-duration {
        font-size: 0.9rem;
    }

    /* --- Backstory --- */
    .backstory-body p {
        font-size: 1.1rem;
        line-height: 1.75;
    }

    /* --- Why GALAM cards --- */
    .why-grid {
        grid-template-columns: 1fr;
    }

    .why-card h3 {
        font-size: 1.2rem;
    }

    .why-card p {
        font-size: 1.1rem;
    }

    /* --- Pricing --- */
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card h3 {
        font-size: 1.2rem;
    }

    .pricing-card li {
        font-size: 1.1rem;
    }

    /* --- CTA --- */
    .cta-text {
        font-size: 1.1rem;
    }

    /* --- Buttons: larger tap targets (44px minimum) --- */
    .btn {
        padding: 0.9rem 1.75rem;
        font-size: 1rem;
        min-height: 48px;
    }

    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    /* --- Footer --- */
    .footer-content {
        flex-direction: column;
        gap: var(--space-xl);
    }

    .footer-brand p {
        font-size: 1.05rem;
    }

    .footer-col h4 {
        font-size: 0.95rem;
    }

    .footer-col a {
        font-size: 1.05rem;
        padding: 0.25rem 0;
    }

    .footer-bottom p {
        font-size: 0.9rem;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}
