/* Global Food public frontend foundation - Sprint FE-01 / FE-02
   Progressive layer only: tokens, utilities and reusable base components.
   Existing public classes, IDs and data attributes remain the source of behavior.
*/

:root {
    /* Brand palette */
    --gf-primary-50: #fff1f1;
    --gf-primary-100: #fde4e2;
    --gf-primary-500: #d41512;
    --gf-primary-600: #b71714;
    --gf-primary-700: #95110f;
    --gf-error: #d6001c;
    --gf-warning: #b87500;
    --gf-success: #2f7d4a;

    /* Text and surfaces */
    --gf-ink-900: #0d1b2a;
    --gf-ink-700: #263241;
    --gf-ink-600: #526071;
    --gf-ink-400: #8a94a3;
    --gf-surface-0: #ffffff;
    --gf-surface-50: #fbf9f8;
    --gf-surface-warm: #fbf7f1;
    --gf-surface-red: #fff4f3;
    --gf-border-warm: #e9dacc;
    --gf-border-soft: rgba(13, 27, 42, 0.12);
    --gf-overlay: rgba(13, 27, 42, 0.52);

    /* Radius */
    --gf-radius-sm: 6px;
    --gf-radius-md: 10px;
    --gf-radius-lg: 16px;
    --gf-radius-xl: 22px;
    --gf-radius-full: 999px;

    /* Shadows */
    --gf-shadow-xs: 0 1px 2px rgba(13, 27, 42, 0.06);
    --gf-shadow-sm: 0 8px 22px rgba(13, 27, 42, 0.08);
    --gf-shadow-md: 0 16px 38px rgba(13, 27, 42, 0.12);
    --gf-shadow-panel: 0 24px 70px rgba(13, 27, 42, 0.14);

    /* Spacing scale */
    --gf-space-1: 4px;
    --gf-space-2: 8px;
    --gf-space-3: 12px;
    --gf-space-4: 16px;
    --gf-space-5: 24px;
    --gf-space-6: 32px;
    --gf-space-7: 48px;
    --gf-space-8: 64px;
    --gf-space-9: 96px;
    --gf-space-10: 128px;

    /* Typography */
    --gf-font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --gf-font-display: Georgia, "Times New Roman", serif;
    --gf-font-size-caption: 0.75rem;
    --gf-font-size-small: 0.875rem;
    --gf-font-size-body: 1rem;
    --gf-font-size-h3: clamp(1.125rem, 1.4vw, 1.35rem);
    --gf-font-size-h2: clamp(1.75rem, 3vw, 2.5rem);
    --gf-font-size-h1: clamp(2.4rem, 5vw, 4.25rem);
    --gf-line-tight: 1.08;
    --gf-line-body: 1.55;

    /* Layout */
    --gf-container-max: 1440px;
    --gf-container-readable: 880px;
    --gf-gutter-desktop: 48px;
    --gf-gutter-laptop: 32px;
    --gf-gutter-tablet: 24px;
    --gf-gutter-mobile: 16px;
    --gf-section-y: 64px;
    --gf-section-y-large: 96px;
    --gf-grid-gap: 24px;
    --gf-sidebar-width: 320px;

    /* Motion */
    --gf-transition-fast: 140ms ease;
    --gf-transition-base: 220ms ease;
    --gf-transition-slow: 360ms ease;

    /* Z-index */
    --gf-z-base: 1;
    --gf-z-header: 60;
    --gf-z-overlay: 70;
    --gf-z-panel: 80;
    --gf-z-modal: 90;
    --gf-z-toast: 100;

    /* Breakpoints as documentation tokens */
    --gf-bp-mobile: 768px;
    --gf-bp-tablet: 1024px;
    --gf-bp-laptop: 1200px;
    --gf-bp-desktop: 1440px;
}

html {
    background: var(--gf-surface-0);
}

.gf-site {
    color: var(--gf-ink-900);
    font-family: var(--gf-font-body);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.gf-site :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid color-mix(in srgb, var(--gf-primary-600) 34%, transparent);
    outline-offset: 3px;
}

.gf-site :where(button, input, select, textarea) {
    font: inherit;
}

.gf-container {
    width: min(var(--gf-container-max), calc(100% - (var(--gf-gutter-desktop) * 2)));
    margin-inline: auto;
}

.gf-container--readable {
    max-width: var(--gf-container-readable);
}

.gf-section {
    padding-block: var(--gf-section-y);
}

.gf-section--large {
    padding-block: var(--gf-section-y-large);
}

.gf-grid {
    display: grid;
    gap: var(--gf-grid-gap);
}

.gf-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gf-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gf-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gf-grid--5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.gf-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: var(--gf-space-2);
    border: 1px solid transparent;
    border-radius: var(--gf-radius-md);
    padding: 0 var(--gf-space-5);
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color var(--gf-transition-base),
        border-color var(--gf-transition-base),
        color var(--gf-transition-base),
        transform var(--gf-transition-fast);
}

.gf-button:hover {
    transform: translateY(-1px);
}

.gf-button:disabled,
.gf-button[aria-disabled="true"] {
    border-color: var(--gf-border-soft);
    background: #f2f2f2;
    color: var(--gf-ink-400);
    cursor: not-allowed;
    transform: none;
}

.gf-button--primary {
    background: var(--gf-primary-600);
    color: var(--gf-surface-0);
}

.gf-button--primary:hover {
    background: var(--gf-primary-700);
}

.gf-button--secondary {
    border-color: var(--gf-primary-600);
    background: var(--gf-surface-0);
    color: var(--gf-primary-600);
}

.gf-button--secondary:hover {
    background: var(--gf-primary-50);
}

.gf-button--ghost {
    border-color: transparent;
    background: transparent;
    color: var(--gf-primary-600);
}

.gf-link {
    color: var(--gf-primary-600);
    font-weight: 800;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}

.gf-link:hover {
    color: var(--gf-primary-700);
}

.gf-card {
    border: 1px solid var(--gf-border-warm);
    border-radius: var(--gf-radius-lg);
    background: var(--gf-surface-0);
    box-shadow: var(--gf-shadow-sm);
}

.gf-card--flat {
    box-shadow: none;
}

.gf-input,
.gf-select,
.gf-textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--gf-border-warm);
    border-radius: var(--gf-radius-md);
    padding: var(--gf-space-3) var(--gf-space-4);
    background: var(--gf-surface-0);
    color: var(--gf-ink-900);
    transition:
        border-color var(--gf-transition-base),
        box-shadow var(--gf-transition-base),
        background-color var(--gf-transition-base);
}

.gf-textarea {
    min-height: 116px;
    resize: vertical;
}

.gf-input::placeholder,
.gf-textarea::placeholder {
    color: var(--gf-ink-400);
}

.gf-input:disabled,
.gf-select:disabled,
.gf-textarea:disabled {
    background: #f5f5f5;
    color: var(--gf-ink-400);
    cursor: not-allowed;
}

.gf-badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: var(--gf-radius-full);
    padding: 0 var(--gf-space-3);
    background: var(--gf-primary-100);
    color: var(--gf-primary-600);
    font-size: var(--gf-font-size-caption);
    font-weight: 900;
    line-height: 1;
}

.gf-badge--count {
    min-width: 24px;
    background: var(--gf-primary-600);
    color: var(--gf-surface-0);
}

.gf-stack {
    display: grid;
    gap: var(--gf-space-4);
}

.gf-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gf-space-3);
    align-items: center;
}

.gf-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Header and footer preparation layer */
.gf-header {
    z-index: var(--gf-z-header);
}

.gf-header__brand,
.gf-header__nav a,
.gf-footer a {
    transition:
        color var(--gf-transition-base),
        border-color var(--gf-transition-base),
        background-color var(--gf-transition-base);
}

.gf-header__nav a[aria-current="page"] {
    color: var(--gf-primary-600);
}

.gf-footer {
    color: inherit;
}

.gf-quote-fab em {
    border-radius: var(--gf-radius-full);
}

/* Sprint FE-02: Home hero */
.gf-home-hero {
    --gf-home-hero-min: clamp(680px, 86svh, 860px);

    isolation: isolate;
    min-height: var(--gf-home-hero-min);
    align-content: center;
    justify-items: center;
    padding: clamp(132px, 15vh, 178px) var(--gf-gutter-desktop) clamp(112px, 15vh, 156px);
    background: #111;
}

.gf-home-hero__media,
.gf-home-hero__media img,
.gf-home-hero__overlay {
    position: absolute;
    inset: 0;
}

.gf-home-hero__media {
    z-index: -3;
    display: block;
    overflow: hidden;
}

.gf-home-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 45%;
}

.gf-home-hero__overlay {
    z-index: -2;
    background:
        radial-gradient(circle at 50% 32%, rgba(183, 23, 20, 0.18), transparent 34%),
        linear-gradient(90deg, rgba(5, 8, 12, 0.74) 0%, rgba(5, 8, 12, 0.40) 36%, rgba(5, 8, 12, 0.24) 62%, rgba(5, 8, 12, 0.70) 100%),
        linear-gradient(180deg, rgba(5, 8, 12, 0.78) 0%, rgba(5, 8, 12, 0.28) 44%, rgba(5, 8, 12, 0.76) 100%);
}

.gf-home-hero__content {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    width: min(820px, 100%);
    text-align: center;
}

.gf-home-hero__emblem {
    width: clamp(88px, 10vw, 132px);
    margin: 0 auto var(--gf-space-5);
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.30));
}

.gf-home-hero .gf-home-hero__eyebrow {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(1.05rem, 2.2vw, 1.65rem);
    letter-spacing: 0;
}

.gf-home-hero h1 {
    max-width: 760px;
    margin: var(--gf-space-1) auto 0;
    color: #fff;
    font-family: var(--gf-font-display);
    font-size: clamp(3rem, 7vw, 6.4rem);
    font-style: italic;
    font-weight: 700;
    line-height: 0.92;
    text-wrap: balance;
    text-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.gf-home-hero > p:not(.eyebrow),
.gf-home-hero__content > p {
    max-width: 650px;
    margin: var(--gf-space-5) auto 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 700;
    line-height: 1.45;
    text-wrap: balance;
}

.gf-home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gf-space-4);
    justify-content: center;
    margin-top: var(--gf-space-6);
}

.gf-home-hero__cta {
    min-width: 190px;
    min-height: 52px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.gf-home-hero__actions .gf-button--secondary {
    border-color: rgba(255, 255, 255, 0.74);
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    backdrop-filter: blur(14px);
}

.gf-home-hero__actions .gf-button--secondary:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 1199px) {
    .gf-container {
        width: min(var(--gf-container-max), calc(100% - (var(--gf-gutter-laptop) * 2)));
    }

    .gf-grid--5 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .gf-home-hero {
        padding-inline: var(--gf-gutter-laptop);
    }
}

@media (max-width: 1023px) {
    .gf-container {
        width: min(var(--gf-container-max), calc(100% - (var(--gf-gutter-tablet) * 2)));
    }

    .gf-grid--4,
    .gf-grid--5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gf-home-hero {
        --gf-home-hero-min: 720px;

        padding-inline: var(--gf-gutter-tablet);
    }

    .gf-home-hero__media img {
        object-position: center center;
    }
}

@media (max-width: 767px) {
    :root {
        --gf-section-y: 48px;
        --gf-section-y-large: 64px;
    }

    .gf-container {
        width: min(var(--gf-container-max), calc(100% - (var(--gf-gutter-mobile) * 2)));
    }

    .gf-grid--2,
    .gf-grid--3,
    .gf-grid--4,
    .gf-grid--5 {
        grid-template-columns: 1fr;
    }

    .gf-home-hero {
        --gf-home-hero-min: 720px;

        padding: 104px var(--gf-gutter-mobile) 108px;
    }

    .gf-header {
        gap: var(--gf-space-2);
    }

    .gf-header .brand-logo {
        width: 42px;
        height: 42px;
    }

    .gf-header__nav {
        gap: var(--gf-space-2);
        font-size: 0.72rem;
    }

    .gf-header__nav a {
        white-space: nowrap;
    }

    .gf-header__nav a[href="/cotizacion/"] {
        padding: 8px 10px;
    }

    .gf-home-hero__overlay {
        background:
            radial-gradient(circle at 50% 30%, rgba(183, 23, 20, 0.20), transparent 40%),
            linear-gradient(180deg, rgba(5, 8, 12, 0.82) 0%, rgba(5, 8, 12, 0.44) 46%, rgba(5, 8, 12, 0.84) 100%);
    }

    .gf-home-hero__media img {
        object-position: center top;
    }

    .gf-home-hero__emblem {
        margin-bottom: var(--gf-space-4);
    }

    .gf-home-hero h1 {
        font-size: clamp(2.75rem, 14vw, 4.3rem);
    }

    .gf-home-hero__actions {
        width: min(100%, 360px);
        gap: var(--gf-space-3);
    }

    .gf-home-hero__cta {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gf-site *,
    .gf-site *::before,
    .gf-site *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
