/* =============================================================
   cafesweets.bar — Styles
   Palette: Sepia-Nostalgic Copper Amber
   ============================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #f0e4c8;
    color: #2a1a0e;
    font-family: 'Lora', Georgia, serif;
    font-size: 16px;
    line-height: 1.75;
    overflow-x: hidden;
}

/* --- Typography tokens ------------------------------------- */
.logotype {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-style: italic;
    font-size: clamp(64px, 10vw, 140px);
    color: #e8d5a3;
    letter-spacing: -0.02em;
    line-height: 0.95;
}

.section-heading {
    font-family: 'Abril Fatface', Georgia, serif;
    font-weight: 400;
    font-size: clamp(36px, 5vw, 72px);
    color: #c4813a;
    line-height: 1.1;
}

.card-title {
    font-family: 'Playfair Display SC', Georgia, serif;
    font-weight: 700;
    font-size: 20px;
    color: #2a1a0e;
    letter-spacing: 0.01em;
    margin-bottom: 4px;
}

.card-genus {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: #8b4513;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0.85;
}

.card-desc {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 14.5px;
    line-height: 1.7;
    color: #4a2c0a;
}

.caveat-text {
    font-family: 'Caveat', cursive;
    font-size: 15px;
    color: #c4813a;
    font-weight: 400;
}

.mono-label {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: #8b4513;
    text-transform: uppercase;
}

/* =============================================================
   ① The Greenhouse Header
   ============================================================= */

.greenhouse-header {
    position: relative;
    height: 100svh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 80px;
    overflow: hidden;
}

.hero-image-wrap {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.6) contrast(1.1) brightness(0.95);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(42,26,14,0.15) 0%, rgba(42,26,14,0.72) 100%);
}

/* HUD reticles at image corners */
.hud-reticle {
    position: absolute;
    pointer-events: none;
    z-index: 2;
}

.hud-tl {
    top: 28px;
    left: 28px;
}

.hud-tr {
    top: 28px;
    right: 28px;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding-left: clamp(32px, 6vw, 80px);
    padding-right: clamp(32px, 6vw, 80px);
    max-width: 900px;
}

.hero-subtitle {
    margin-top: 14px;
    font-size: 20px;
}

.hero-tagline {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 16px;
    color: #d4b896;
    margin-top: 10px;
    max-width: 520px;
    line-height: 1.6;
}

/* =============================================================
   ② The Collection Grid
   ============================================================= */

.collection-section {
    background: #f0e4c8;
    padding-bottom: 80px;
}

.section-header {
    text-align: center;
    padding: 72px 40px 40px;
}

.section-header .section-heading {
    margin-bottom: 20px;
}

.hud-rule {
    display: flex;
    justify-content: center;
    overflow: visible;
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
    align-items: start;
}

/* Irregular column offsets — naturalistic cascade */
.card:nth-child(3n+2) { margin-top: 40px; }
.card:nth-child(3n+3) { margin-top: 20px; }

/* Base card resting rotations */
.card:nth-child(4n+1) { --base-rot: -0.8deg; }
.card:nth-child(4n+2) { --base-rot:  0.6deg; }
.card:nth-child(4n+3) { --base-rot: -1.1deg; }
.card:nth-child(4n+0) { --base-rot:  0.4deg; }

.card {
    background: transparent;
    transform: rotate(var(--base-rot, -0.8deg));
    transition: transform 180ms ease-out, box-shadow 180ms ease-out;
    will-change: transform;
    cursor: pointer;
    position: relative;
}

.card:hover {
    box-shadow: 0 0 0 1.5px rgba(196,129,58,0.4), 0 8px 24px rgba(42,26,14,0.25);
}

/* The card-inner holds the torn-paper clip-path (card itself = magnetic transform zone) */
.card-inner {
    background: #f0e4c8;
    border: 1px solid rgba(196,129,58,0.35);
    overflow: hidden;
    position: relative;
}

/* Torn paper top edges — vary per card */
.card:nth-child(6n+1) .card-inner { clip-path: polygon(0% 4px, 2% 0px, 5% 3px, 8% 1px, 12% 4px, 20% 0%, 35% 3px, 50% 1px, 65% 4px, 80% 0px, 92% 3px, 100% 1px, 100% 100%, 0% 100%); }
.card:nth-child(6n+2) .card-inner { clip-path: polygon(0% 2px, 3% 0px, 7% 4px, 14% 1px, 22% 3px, 33% 0px, 48% 4px, 62% 1px, 75% 3px, 88% 0px, 95% 3px, 100% 1px, 100% 100%, 0% 100%); }
.card:nth-child(6n+3) .card-inner { clip-path: polygon(0% 3px, 4% 1px, 9% 4px, 16% 0px, 25% 3px, 40% 1px, 55% 4px, 68% 0px, 78% 3px, 90% 1px, 97% 4px, 100% 2px, 100% 100%, 0% 100%); }
.card:nth-child(6n+4) .card-inner { clip-path: polygon(0% 1px, 5% 4px, 11% 0px, 19% 3px, 28% 1px, 42% 4px, 57% 0px, 70% 3px, 82% 1px, 91% 4px, 98% 2px, 100% 3px, 100% 100%, 0% 100%); }
.card:nth-child(6n+5) .card-inner { clip-path: polygon(0% 4px, 6% 1px, 13% 3px, 20% 0px, 30% 4px, 44% 2px, 58% 4px, 72% 0px, 83% 3px, 93% 1px, 99% 4px, 100% 2px, 100% 100%, 0% 100%); }
.card:nth-child(6n+0) .card-inner { clip-path: polygon(0% 2px, 7% 4px, 15% 1px, 24% 3px, 36% 0px, 51% 4px, 65% 2px, 76% 4px, 87% 0px, 94% 3px, 100% 1px, 100% 100%, 0% 100%); }

/* Card image zone */
.card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #d4b896;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: sepia(0.6) contrast(1.1) brightness(0.95);
    transition: filter 300ms ease;
}

.card:hover .card-image {
    filter: sepia(0.3) contrast(1.05) brightness(1.0);
}

.specimen-code {
    position: absolute;
    bottom: 8px;
    left: 10px;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.14em;
    color: #e8d5a3;
    opacity: 0.8;
    text-shadow: 0 1px 3px rgba(42,26,14,0.6);
}

.card-hud {
    position: absolute;
    bottom: 6px;
    right: 8px;
    pointer-events: none;
    opacity: 0.7;
}

/* Card body / prose zone */
.card-body {
    padding: 20px 20px 18px;
    position: relative;
}

/* Botanical line illustration overlay (SVG pattern, very faint) */
.botanical-line-overlay {
    position: absolute;
    inset: 0;
    background-image: url("assets/botanical-lines.svg");
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: 80px;
    opacity: 0.12;
    pointer-events: none;
}

.card-footer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(139,69,19,0.2);
}

.card-price {
    font-family: 'Abril Fatface', Georgia, serif;
    font-size: 28px;
    color: #c4813a;
    line-height: 1;
}

.card-price::before {
    content: '£';
    font-size: 14px;
    vertical-align: super;
    margin-right: 1px;
    color: #9b6b3a;
}

.card-note {
    font-size: 13px;
    color: #9b6b3a;
}

/* =============================================================
   ③ The Tincture Bar
   ============================================================= */

.tincture-bar {
    background: #2a1a0e;
    padding: 48px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
}

.tincture-bar::-webkit-scrollbar { display: none; }

.tincture-heading {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 0 60px 32px;
}

.tincture-title {
    color: #e8d5a3;
    font-size: clamp(28px, 4vw, 48px);
}

.tincture-heading .mono-label {
    color: #9b6b3a;
    font-size: 10px;
}

.hex-texture {
    position: absolute;
    top: 10px;
    right: 0;
    pointer-events: none;
    opacity: 0.8;
}

.tincture-strip {
    display: flex;
    gap: 40px;
    padding: 0 60px;
    width: max-content;
    padding-bottom: 8px;
}

.tincture-item {
    width: 180px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 24px 20px;
    border: 1px solid rgba(196,129,58,0.22);
    background: rgba(196,129,58,0.04);
    transition: background 200ms ease, border-color 200ms ease;
}

.tincture-item:hover {
    background: rgba(196,129,58,0.1);
    border-color: rgba(196,129,58,0.45);
}

.tincture-icon {
    opacity: 0.85;
}

.tincture-name {
    font-family: 'Playfair Display SC', Georgia, serif;
    font-weight: 700;
    font-size: 14px;
    color: #e8d5a3;
    line-height: 1.3;
}

.tincture-desc {
    font-size: 13px;
    color: #9b6b3a;
    line-height: 1.4;
}

/* =============================================================
   ④ The Field Notes
   ============================================================= */

.field-notes {
    position: relative;
    padding: 80px 40px 80px;
    background: #f0e4c8;
    /* Ruled paper lines aligned with 1.75 line-height × 16px = 28px lines */
    background-image: repeating-linear-gradient(
        transparent,
        transparent 27px,
        rgba(196,129,58,0.15) 27px,
        rgba(196,129,58,0.15) 28px
    );
}

/* Water stain halo */
.field-notes::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 8%;
    width: 320px;
    height: 280px;
    background: radial-gradient(ellipse at center, rgba(196,129,58,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.field-notes::after {
    content: '';
    position: absolute;
    bottom: 80px;
    right: 12%;
    width: 240px;
    height: 200px;
    background: radial-gradient(ellipse at center, rgba(139,69,19,0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.notes-heading {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
}

.notes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.notes-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.notes-label {
    margin-bottom: 6px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(196,129,58,0.3);
}

.notes-body {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 16px;
    line-height: 1.75;
    color: #4a2c0a;
}

.notes-aside {
    font-size: 14px;
    color: #9b6b3a;
    margin-top: 8px;
    padding-left: 16px;
    border-left: 2px solid rgba(196,129,58,0.35);
}

/* =============================================================
   ⑤ The Seal Footer
   ============================================================= */

.seal-footer {
    background: #2a1a0e;
    padding: 56px 40px 48px;
}

.footer-rule {
    width: 100%;
    overflow: hidden;
}

.footer-rule svg {
    display: block;
    width: 100%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 36px 0;
    text-align: center;
}

.alchemical-seal {
    opacity: 0.85;
    animation: sealRotate 60s linear infinite;
}

@keyframes sealRotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.footer-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: 28px;
    color: #e8d5a3;
    letter-spacing: -0.01em;
}

.footer-tagline {
    color: #9b6b3a;
    margin-top: 6px;
}

.footer-small {
    font-size: 14px;
    color: #8b4513;
    margin-top: 8px;
    opacity: 0.8;
}

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

@media (max-width: 960px) {
    .collection-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 40px 24px;
    }
    .card:nth-child(3n+2) { margin-top: 0; }
    .card:nth-child(3n+3) { margin-top: 0; }
    .card:nth-child(2n+2) { margin-top: 32px; }

    .notes-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }
}

@media (max-width: 600px) {
    .collection-grid {
        grid-template-columns: 1fr;
        padding: 32px 20px;
    }
    .card:nth-child(2n+2) { margin-top: 0; }

    .hero-content {
        padding-left: 24px;
        padding-right: 24px;
    }

    .logotype {
        font-size: 52px;
    }

    .tincture-heading {
        padding: 0 24px 24px;
    }

    .tincture-strip {
        padding: 0 24px;
        gap: 20px;
    }

    .tincture-item {
        width: 148px;
    }

    .field-notes {
        padding: 48px 24px;
    }
}
