* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 100px; /* Offset for sticky Brew Bar */
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}
.brand-logo {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.header-tagline {
    font-size: 13px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Progressive Hero Experience */
.hero-discovery {
    padding: 48px 0 32px 0;
    text-align: center;
}
.hero-eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-accent);
    margin-bottom: 12px;
}
.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(32px, 5vw, 48px);
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: 16px;
}
.hero-subtitle {
    font-size: 18px;
    color: var(--color-text-muted);
    max-width: 640px;
    margin: 0 auto 36px auto;
}

/* Step Selector Pills */
.step-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}
.step-label {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--color-primary);
    color: #FFF;
    border-radius: 50%;
    font-size: 12px;
}

.pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.choice-pill {
    padding: 12px 20px;
    background: var(--color-surface-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    user-select: none;
}
.choice-pill:hover {
    border-color: var(--color-primary-light);
    background: #EAF2E8;
}
.choice-pill.active {
    background: var(--color-primary);
    color: #FFF;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(28, 63, 43, 0.2);
}

/* Builder Grid */
.builder-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}
@media (max-width: 900px) {
    .builder-layout { grid-template-columns: 1fr; }
}

/* Botanical Cards */
.botanical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.botanical-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px;
    position: relative;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.botanical-card:hover {
    border-color: var(--color-primary-light);
    box-shadow: var(--shadow-md);
}
.botanical-card.selected {
    border-color: var(--color-primary);
    background: #FAFCF9;
    box-shadow: 0 0 0 2px var(--color-primary);
}
.botanical-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.botanical-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-primary);
}
.botanical-latin {
    font-size: 13px;
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}
.botanical-color-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #FFF;
    box-shadow: 0 0 0 1px var(--color-border);
}
.botanical-notes {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
    line-height: 1.4;
}

/* Percentage Controls */
.percentage-controller {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}
.botanical-card.selected .percentage-controller {
    display: block;
}
.percentage-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}
.percentage-slider {
    width: 100%;
    accent-color: var(--color-primary);
    cursor: pointer;
}

.btn-toggle-botanical {
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface-subtle);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.botanical-card.selected .btn-toggle-botanical {
    background: var(--color-primary);
    color: #FFF;
    border-color: var(--color-primary);
}

/* Live Sensory Canvas & Formulation Sidebar */
.formulation-sidebar {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: sticky;
    top: 96px;
    box-shadow: var(--shadow-sm);
}
.sidebar-title {
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--color-primary);
    margin-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 8px;
}

/* Dynamic Infusion Vessel */
.infusion-preview-container {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-surface-subtle);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}
.infusion-vessel {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid #FFF;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: background-color 0.4s ease;
}
.infusion-meta h4 {
    font-size: 14px;
    color: var(--color-primary);
    margin-bottom: 2px;
}
.infusion-meta p {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* SVG Sensory Radar */
.radar-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 320px;
    margin: 0 auto 20px auto;
}
.radar-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Formulation Breakdown */
.formulation-specs {
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid var(--color-border);
    padding-top: 16px;
    margin-bottom: 16px;
}
.spec-row {
    display: flex;
    justify-content: space-between;
}
.spec-label { color: var(--color-text-muted); }
.spec-value { font-weight: 600; color: var(--color-text); }

/* Sticky Brew Bar */
.sticky-brew-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(28, 63, 43, 0.96);
    backdrop-filter: blur(12px);
    color: #FFF;
    padding: 16px 0;
    z-index: 200;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    transform: translateY(0);
    transition: transform 0.3s ease;
}
.brew-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.brew-bar-summary {
    display: flex;
    align-items: center;
    gap: 16px;
}
.brew-bar-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #FFF;
    flex-shrink: 0;
}
.brew-bar-name {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
}
.brew-bar-details {
    font-size: 13px;
    color: #C2D6C8;
}
.brew-bar-action {
    display: flex;
    align-items: center;
    gap: 16px;
}
.brew-bar-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-accent-light);
}
.btn-create-brew {
    background: var(--color-accent);
    color: #FFF;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.btn-create-brew:hover {
    background: var(--color-accent-light);
    transform: translateY(-1px);
}

/* Modal Styling for Blend Naming */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 40, 28, 0.6);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 20px;
}
.modal-card {
    background: var(--color-surface);
    padding: 32px;
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}
.modal-title {
    font-family: var(--font-serif);
    font-size: 24px;
    color: var(--color-primary);
    margin-bottom: 8px;
}
.input-blend-name {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin: 16px 0;
    outline: none;
}
.input-blend-name:focus {
    border-color: var(--color-primary);
}