/* =============================================================================
   CSS Custom Properties (from baselinemakes)
   ============================================================================= */

:root {
    /* Colors - Warm tundra/taupe palette */
    --color-bg: #f5f0eb;
    --color-bg-alt: #ebe4dc;
    --color-bg-card: #ffffff;
    --color-text: #3d3128;
    --color-text-muted: #6b5d4d;
    --color-accent: #2d5a3d;
    --color-accent-hover: #1e4029;
    --color-border: #d4c9bc;
    --color-border-light: #e8e0d6;

    /* Typography */
    --font-display: 'Fraunces', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

    /* Font weights */
    --weight-light: 200;
    --weight-regular: 400;
    --weight-bold: 800;
    --weight-black: 900;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;

    /* Layout */
    --max-width: 64rem;
    --border-radius: 0.5rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}


/* =============================================================================
   Reset
   ============================================================================= */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-mono);
    font-weight: var(--weight-regular);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* =============================================================================
   Typography
   ============================================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: var(--weight-black);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 7vw, 4rem);
    font-weight: var(--weight-black);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: var(--weight-bold);
}

h3 {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: var(--weight-bold);
}

p {
    max-width: 65ch;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: 2px;
}


/* =============================================================================
   Layout
   ============================================================================= */

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: var(--space-md);
}

@media (min-width: 768px) {
    .container {
        padding-inline: var(--space-lg);
    }
}

.section {
    padding-block: var(--space-xl);
}

.section-title {
    margin-bottom: var(--space-sm);
}

.section-description {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
}


/* =============================================================================
   Header
   ============================================================================= */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--color-bg);
    border-bottom: 1px solid var(--color-border-light);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: var(--space-md);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: var(--weight-bold);
    color: var(--color-text);
    text-decoration: none;
}

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

.nav {
    display: flex;
    gap: var(--space-md);
}

.nav-link {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--border-radius);
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-link:hover {
    background-color: var(--color-bg-alt);
    color: var(--color-text);
}


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

.footer {
    margin-top: var(--space-2xl);
}

/* USA Banner - Dark full-width strip */
.usa-banner {
    background: #3d3128;
    padding: var(--space-md) 0;
}

.usa-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
}

.usa-flag {
    width: 48px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.usa-banner-text {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: var(--weight-bold);
    color: #f5f0eb;
    letter-spacing: -0.01em;
}

/* Footer Main */
.footer-main {
    background-color: var(--color-bg-alt);
    border-top: 1px solid var(--color-border-light);
    padding-block: var(--space-lg);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
}

@media (min-width: 640px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-copyright {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.footer-nav {
    display: flex;
    gap: var(--space-md);
}

.footer-link {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

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


/* =============================================================================
   Hero Section
   ============================================================================= */

.hero {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 3 / 2;
}

.hero-slides {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-inline: var(--space-lg);
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-lg);
    text-align: center;
}

.hero-title {
    margin-bottom: var(--space-md);
    color: var(--color-bg);
    text-shadow:
        -1px -1px 0 var(--color-text),
        1px -1px 0 var(--color-text),
        -1px 1px 0 var(--color-text),
        1px 1px 0 var(--color-text);
}

.hero-body {
    color: var(--color-bg);
    font-size: 1.125rem;
    max-width: 50ch;
    margin-inline: auto;
    text-shadow:
        -1px -1px 0 var(--color-text),
        1px -1px 0 var(--color-text),
        -1px 1px 0 var(--color-text),
        1px 1px 0 var(--color-text);
}


/* =============================================================================
   Product Cards (Horizontal layout, 2x2 grid)
   ============================================================================= */

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xl);
    }
}

.card {
    display: flex;
    flex-direction: column;
    background-color: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--color-text);
    overflow: hidden;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

@media (min-width: 480px) {
    .card {
        flex-direction: row;
    }
}

.card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 20px rgba(45, 90, 61, 0.1);
}

.card-image {
    flex-shrink: 0;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: var(--color-bg-alt);
}

@media (min-width: 480px) {
    .card-image {
        width: 160px;
        height: auto;
        min-height: 160px;
    }
}

@media (min-width: 900px) {
    .card-image {
        width: 200px;
    }
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    flex-grow: 1;
}

@media (min-width: 480px) {
    .card-body {
        padding: var(--space-md) var(--space-lg);
        justify-content: center;
    }
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: var(--weight-bold);
    line-height: 1.2;
}

.card-tagline {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-accent);
}

.card-description {
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-top: var(--space-xs);
}

.card-footer {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

.card-price {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: var(--weight-bold);
    color: var(--color-text);
}

.card-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-accent);
    transition: color var(--transition-fast);
}

.card:hover .card-cta {
    color: var(--color-accent-hover);
    text-decoration: underline;
}

.card-cta svg {
    transition: transform var(--transition-fast);
}

.card:hover .card-cta svg {
    transform: translateX(3px);
}


/* =============================================================================
   Order Page Layout
   ============================================================================= */

.order-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

@media (min-width: 768px) {
    .order-layout {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.order-form-column {
    /* Form column styles */
}

.order-image-column {
    display: none;
}

@media (min-width: 768px) {
    .order-image-column {
        display: block;
        position: sticky;
        top: calc(var(--space-xl) + 60px);
    }
}

.order-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}


/* =============================================================================
   Forms
   ============================================================================= */

.order-form {
    max-width: 100%;
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--space-xs);
}

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background-color: var(--color-bg-card);
    color: var(--color-text);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

.form-control::placeholder {
    color: var(--color-text-muted);
}

.form-textarea {
    min-height: 6rem;
    resize: vertical;
}

.form-select {
    cursor: pointer;
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}


/* =============================================================================
   Port Builder (Cruise Form)
   ============================================================================= */

.ports-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.port-row {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
}

.port-row .form-control {
    flex: 1;
}

.port-row .form-control:first-child {
    flex: 2;
}

.port-remove {
    padding: var(--space-sm);
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.port-remove:hover {
    border-color: #c53030;
    color: #c53030;
    background-color: #fff5f5;
}


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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: none;
}

.btn-primary {
    background-color: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    color: white;
}

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

.btn-secondary:hover {
    background-color: var(--color-accent);
    color: white;
}

.btn-lg {
    padding: var(--space-md) var(--space-lg);
    font-size: 1rem;
}

.form-actions {
    margin-top: var(--space-xl);
}


/* =============================================================================
   Success / Cancel Pages
   ============================================================================= */

.result-page {
    padding-block: var(--space-2xl);
    text-align: center;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
}

.result-title {
    margin-bottom: var(--space-md);
}

.result-body {
    color: var(--color-text-muted);
    margin-bottom: var(--space-lg);
    max-width: 45ch;
    margin-inline: auto;
}


/* =============================================================================
   About Section
   ============================================================================= */

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 768px) {
    .about-grid {
        grid-template-columns: 280px 1fr;
        gap: var(--space-xl);
        align-items: center;
    }
}

@media (min-width: 900px) {
    .about-grid {
        grid-template-columns: 300px 1fr;
    }
}

.about-image {
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: var(--color-bg-alt);
    aspect-ratio: 2 / 3;
    max-width: 280px;
    margin-inline: auto;
}

@media (min-width: 768px) {
    .about-image {
        margin-inline: 0;
        max-width: none;
        width: 100%;
    }
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.about-content {
    /* Text fills available space */
}

.about-content .section-title {
    margin-bottom: var(--space-md);
}

.about-content p {
    margin-bottom: var(--space-md);
}


/* =============================================================================
   Utilities
   ============================================================================= */

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

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

::selection {
    background-color: var(--color-accent);
    color: var(--color-bg);
}