/* ===================================================================
   Drops of Terroir — Main Stylesheet
   Design: Luxury editorial wine brand (cream, charcoal, red)
   =================================================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    line-height: 1.8;
    color: #333;
    background: #f5f0e8;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: underline;
}

a:hover {
    opacity: 0.8;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }

/* --- Layout Containers --- */
.content-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.content-wide {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* --- Sections --- */
.section-light {
    background: #f5f0e8;
}

.section-dark {
    background: #2a2a2a;
    color: #fff;
}

.section-dark a {
    color: #ddd;
}

.section-dark h2 {
    color: #fff;
}

/* --- Header --- */
.site-header {
    background: #f5f0e8;
    padding: 1.5rem 0 0;
    text-align: center;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
}

/* Logo */
.logo-link {
    text-decoration: none;
    display: inline-block;
}

.logo-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1;
}

.logo-drops,
.logo-terroir {
    color: #8b0000;
}

.logo-of {
    color: #333;
    font-size: 1.8rem;
    font-weight: 400;
    margin: 0 0.15em;
}

.logo-signatures {
    margin: 0.5rem 0;
}

.logo-character {
    height: 80px;
    margin: 0 auto;
}

/* Hamburger — hidden by default, shown on dark-lp */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #999;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Navigation */
.main-nav {
    margin: 1rem 0 0.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.3rem 1.5rem;
}

.main-nav a {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 500;
    text-decoration: none;
    color: #333;
    padding: 0.3rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    border-bottom-color: #8b0000;
}

/* Language Switcher */
.lang-switcher {
    position: absolute;
    top: 0;
    right: 1.5rem;
    font-size: 0.95rem;
}

.lang-switcher a {
    text-decoration: none;
    color: #555;
}

.lang-switcher a:hover {
    color: #8b0000;
}

.lang-globe {
    margin-right: 0.3em;
    font-size: 1.1em;
}

/* --- Section Headings --- */
.section-heading {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    letter-spacing: 0.04em;
}

.section-heading.red {
    color: #cc0000;
}

.page-heading {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.page-subtitle {
    text-align: center;
    margin-bottom: 2rem;
    color: #666;
    font-size: 1.1rem;
}

/* --- Prologue Section --- */
.prologue-section {
    text-align: center;
}

.prologue-text {
    text-align: justify;
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
}

.attribution {
    margin: 1.5rem 0;
    font-size: 1rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.85;
}

.btn-red {
    background: #cc0000;
    color: #fff;
}

.btn-black {
    background: #1a1a1a;
    color: #fff;
}

.btn-sm {
    padding: 0.6rem 1.8rem;
    font-size: 0.85rem;
}

/* --- Video Section --- */
.section-video {
    background: #000;
    padding: 0;
}

.video-container {
    max-width: 1100px;
    margin: 0 auto;
}

.video-container video {
    width: 100%;
    display: block;
}

/* --- Hero Landscape (full-width divider image) --- */
.hero-landscape {
    max-height: 500px;
}

/* --- Section Divider --- */
.section-divider-red {
    border-top: 3px solid #cc0000;
    margin-bottom: 2rem;
}

/* --- Press Section (3-column grid) --- */
.press-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 1.5rem;
}

.press-item {
    font-size: 1rem;
    line-height: 1.7;
}

.press-source {
    margin-top: 1rem;
    font-size: 0.95rem;
}

/* --- Landscape Image Section --- */
.section-landscape {
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.landscape-img {
    width: 100%;
    object-fit: cover;
    max-height: 400px;
}

/* --- Two-Column Layout (Why Terroir) --- */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.two-col-text {
    font-size: 1.05rem;
}

.two-col-text h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.two-col-text p {
    margin-bottom: 1.2rem;
}

.two-col-image img {
    width: 100%;
    border-radius: 2px;
}

/* --- Purchase Page --- */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.product-img {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.product-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #333;
}

.product-description {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.product-production {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #555;
}

.product-fair {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: #555;
}

.product-limit,
.product-age {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

/* --- Forms --- */
.form-section {
    padding-bottom: 2rem;
}

.inquiry-form {
    margin-top: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.required {
    font-weight: 400;
    color: #999;
    font-size: 0.85rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.8rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid #ccc;
    background: #faf8f4;
    border-radius: 0;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b0000;
}

.form-row.two-col-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Alert */
.alert {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 2px;
    font-size: 1rem;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* --- Footer --- */
.site-footer {
    background: #2a2a2a;
    color: #ccc;
    padding: 2rem 0;
    font-size: 0.9rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left,
.footer-right {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.site-footer a {
    color: #ccc;
    text-decoration: underline;
}

.site-footer a:hover {
    color: #fff;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .logo-text {
        font-size: 2rem;
    }

    .logo-of {
        font-size: 1.3rem;
    }

    .press-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .two-col-image {
        order: -1;
    }

    .product-layout {
        grid-template-columns: 1fr;
    }

    .product-images {
        max-width: 300px;
        margin: 0 auto;
    }

    .form-row.two-col-form {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
    }

    .lang-switcher {
        position: static;
        margin-top: 0.5rem;
    }

}

/* On mobile, show product details (with button) before the bottle image */
@media (max-width: 768px) {
    .product-details {
        order: -1;
    }
}

/* --- Scarcity & Cedar Messaging --- */
.scarcity-line {
    font-size: 1rem;
    font-weight: 600;
    color: #cc0000;
    margin-top: 1.2rem;
    letter-spacing: 0.02em;
}

.cedar-line {
    font-size: 0.95rem;
    color: #666;
    margin-top: 0.4rem;
}

.emmy-line {
    font-size: 0.9rem;
    color: #888;
    margin-top: 0.4rem;
    letter-spacing: 0.03em;
}

/* --- Landing Page Utilities --- */

/* Hero with background image overlay */
.lp-hero-overlay {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 5rem 1.5rem;
    text-align: center;
}

.lp-hero-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(42, 42, 42, 0.7);
}

.lp-hero-overlay > * {
    position: relative;
    z-index: 1;
}

.lp-hero-overlay h1 {
    font-size: 2.4rem;
    color: #fff;
    margin-bottom: 1rem;
}

.lp-hero-overlay p {
    color: #ddd;
    font-size: 1.15rem;
    max-width: 640px;
    margin: 0 auto 2rem;
}

.lp-feature-item {
    text-align: center;
    padding: 1.5rem;
}

.lp-feature-item h3 {
    color: #cc0000;
    margin-bottom: 1rem;
}

.section-dark .lp-feature-item h3 {
    color: #fff;
}

/* Centered CTA block */
.lp-cta-block {
    text-align: center;
    padding: 3rem 1.5rem;
}

.lp-cta-block .product-price {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.lp-cta-block .production-note {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.section-dark .lp-cta-block .production-note {
    color: #bbb;
}

@media (max-width: 768px) {
    .lp-hero-overlay {
        padding: 3rem 1.5rem;
    }

    .lp-hero-overlay h1 {
        font-size: 1.8rem;
    }
}

/* --- Toast Notifications --- */
.dot-toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    max-width: 420px;
    width: calc(100% - 3rem);
    padding: 1rem 1.2rem;
    border-radius: 3px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateX(110%);
    transition: transform 0.3s ease;
}

.dot-toast-visible {
    transform: translateX(0);
}

.dot-toast-success {
    background: #f0f7f0;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
}

.dot-toast-error {
    background: #fdf0f0;
    border: 1px solid #f5c6cb;
    color: #8b0000;
}

.dot-toast-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.dot-toast-header strong {
    flex: 1;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
}

.dot-toast-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.dot-toast-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 0 0.2rem;
    line-height: 1;
}

.dot-toast-close:hover {
    opacity: 1;
}

.dot-toast-body {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Field error highlight */
.field-error {
    border-color: #cc0000 !important;
    box-shadow: 0 0 0 1px rgba(204,0,0,0.3);
}

.error-page {
    padding: 4.5rem 0 5rem;
}

.error-kicker {
    margin: 0 0 0.9rem;
    color: #8b0000;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.error-title {
    margin: 0 0 1rem;
}

.error-copy {
    max-width: 38rem;
    margin: 0 0 1.6rem;
}

.error-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.error-diagnostics {
    border: 1px solid rgba(51, 51, 51, 0.16);
    border-radius: 0.35rem;
    background: rgba(255, 255, 255, 0.55);
    padding: 1rem 1.1rem;
}

.error-diagnostics summary {
    cursor: pointer;
    font-weight: 600;
}

.error-diagnostic-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    margin-top: 1rem;
}

.error-diagnostic-grid div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.error-diagnostic-note {
    margin: 1rem 0 0;
    font-size: 0.92rem;
    color: #555;
}

@media (max-width: 768px) {
    .error-diagnostic-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Placeholder SVG for missing images --- */
/* Will be replaced with actual product images */
