/* Floral Design Portfolio – Nirvana Art
   Minimal, editorial, luxury-restrained. */

:root {
    --bg: #fafaf9;
    --bg-soft: #f5f5f4;
    --text: #1c1917;
    --text-soft: #57534e;
    --text-muted: #78716c;
    --border: #e7e5e4;
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'DM Sans', system-ui, sans-serif;
    --space: 1.5rem;
    --space-lg: 3rem;
    --space-xl: 5rem;
    --space-2xl: 8rem;
    --max-read: 700px;
    --max-content: 1200px;
    /* Shared scale for corner + bottom deco images (all scale with viewport) */
    --deco-size: min(220px, 28vw);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.skip-link {
    position: absolute;
    top: -100px;
    left: var(--space);
    z-index: 100;
    padding: 0.5rem 1rem;
    background: var(--text);
    color: var(--bg);
    text-decoration: none;
    font-size: 0.875rem;
    transition: top 0.2s;
}
.skip-link:focus {
    top: var(--space);
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

/* Top-left corner decoration */
.corner-deco {
    position: fixed;
    z-index: 5;
    pointer-events: none;
    display: block;
}
.corner-deco[data-enlarge] {
    pointer-events: auto;
    cursor: pointer;
}
.corner-deco--top-left {
    top: 0;
    left: 0;
    width: auto;
    max-width: 220px;
    max-width: var(--deco-size);
    height: auto;
    max-height: 220px;
    max-height: var(--deco-size);
    -webkit-border-radius: 0 0 20px 0;
    border-radius: 0 0 20px 0;
}

/* Header */
.site-header {
    padding: var(--space-lg) var(--space) var(--space);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: var(--max-content);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    gap: var(--space-lg);
}
.nav a {
    font-size: 0.875rem;
    color: var(--text-soft);
    text-decoration: none;
    letter-spacing: 0.02em;
}
.nav a:hover { color: var(--text); }

/* Hero */
.hero {
    padding: var(--space-2xl) var(--space) var(--space-xl);
    text-align: center;
}
.hero-inner { max-width: 640px; margin: 0 auto; }
.hero-title {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text);
    margin-bottom: 0.25rem;
}
.hero-subtitle {
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}
.hero-intro {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-soft);
    font-style: italic;
}

/* Section title */
.section-title {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--text);
    text-align: center;
    margin-bottom: var(--space-xl);
}

/* About */
.about {
    padding: var(--space-xl) var(--space);
    background: var(--bg-soft);
}
.about-floral-work {
    padding-top: var(--space-lg);
}
.about-inner {
    max-width: var(--max-read);
    margin: 0 auto;
    text-align: center;
}
.about-name {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.15;
}
.about-location {
    font-size: 1rem;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.about-url {
    font-size: 0.875rem;
    margin-bottom: var(--space-lg);
}
.about-url a {
    color: var(--text-soft);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}
.about-url a:hover { border-bottom-color: var(--text-muted); color: var(--text); }
.about-intro {
    margin-bottom: var(--space-xl);
    text-align: center;
}
.about-intro p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-soft);
    margin-bottom: 1rem;
}
.about-intro p:last-child { margin-bottom: 0; }
.about-subtitle { margin-top: 0; margin-bottom: var(--space-lg); }
.about-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-soft);
    text-align: left;
}
.about-text p { margin-bottom: 1.25rem; }
.about-text p:last-child { margin-bottom: 0; }

/* Galleries */
.gallery {
    padding: var(--space-xl) var(--space);
}
.gallery-inner { max-width: var(--max-content); margin: 0 auto; }

/* Event grid – masonry-style with columns */
.gallery-grid-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space);
    max-width: var(--max-content);
    margin: 0 auto;
}
.gallery-item {
    list-style: none;
    break-inside: avoid;
}
.gallery-link {
    display: block;
    overflow: hidden;
    -webkit-border-radius: 12px;
    border-radius: 12px;
    background: var(--border);
}
.gallery-link:focus { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    -o-object-fit: cover;
    object-fit: cover;
    min-height: 220px;
}
.gallery-item figcaption {
    padding: var(--space) 0 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.caption-type { font-weight: 500; color: var(--text); }
.caption-meta { color: var(--text-soft); }
.caption-role { font-style: italic; }

/* Bouquets – 2–3 per row */
.gallery-grid-bouquets {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    max-width: var(--max-content);
    margin: 0 auto;
}
.gallery-grid-bouquets .gallery-item img { min-height: 360px; object-fit: cover; }
.gallery-grid-bouquets .gallery-item figcaption {
    padding-top: var(--space);
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.caption-subtle {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding-top: var(--space);
}

/* Production – layout per floral-map: numeric order; positions 10, 20, 30 = single image per row */
.gallery-grid-production {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space);
    max-width: var(--max-content);
    margin: 0 auto;
}
.gallery-grid-production .gallery-item {
    margin: 0;
}
.gallery-grid-production .gallery-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    -o-object-fit: cover;
    object-fit: cover;
    min-height: 0;
    display: block;
}
.gallery-grid-production .gallery-link {
    border-radius: 12px;
}
/* ردیف‌های ۱۰، ۲۰، ۳۰: طول = سه تصویر | ارتفاع = برابر با بقیه (یک ردیف) */
.gallery-grid-production .gallery-item--full-row {
    grid-column: 1 / -1;
    aspect-ratio: 3 / 1;
    overflow: hidden;
    -webkit-border-radius: 12px;
    border-radius: 12px;
}
.gallery-grid-production .gallery-item--full-row .gallery-link {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-border-radius: 12px;
    border-radius: 12px;
}
.gallery-grid-production .gallery-item--full-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
/* Working row – two images under production, same cell dimensions */
.working-row {
    margin-top: var(--space);
}
.working-row .gallery-item {
    margin: 0;
}
.working-row .gallery-link {
    cursor: default;
}
@media (max-width: 600px) {
    .gallery-grid-production { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid-production .gallery-item--full-row { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
    .gallery-grid-production { grid-template-columns: repeat(3, 1fr); }
}

/* Artistic Sensibility */
.artistic-sensibility {
    padding: var(--space-xl) var(--space);
    background: var(--bg-soft);
}
.sensibility-inner { max-width: var(--max-content); margin: 0 auto; }
.sensibility-text {
    max-width: var(--max-read);
    margin: 0 auto var(--space-lg);
    text-align: center;
    font-size: 1rem;
    color: var(--text-soft);
}
.sensibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-lg);
    list-style: none;
}
.sensibility-item figcaption {
    margin-top: var(--space);
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}
.sensibility-link {
    display: block;
    overflow: hidden;
    border-radius: 2px;
    background: var(--border);
}
.sensibility-link:focus { outline: 2px solid var(--text-muted); outline-offset: 2px; }
.sensibility-link img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    min-height: 200px;
}

/* Contact */
.contact {
    padding: var(--space-2xl) var(--space);
    text-align: center;
    border-top: 1px solid var(--border);
}
.contact-inner { max-width: var(--max-read); margin: 0 auto; }
.contact-email {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.contact-email a {
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--text-muted);
}
.contact-email a:hover { border-bottom-color: var(--text); }
.contact-location { color: var(--text-soft); margin-bottom: 0.25rem; }
.contact-relocation {
    font-size: 1rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: var(--space);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(28, 25, 23, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space);
}
.lightbox[hidden] { display: none; }
.lightbox-close {
    position: absolute;
    top: var(--space);
    right: var(--space);
    width: 48px;
    height: 48px;
    border: none;
    background: transparent;
    color: #fafaf9;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 2px;
}
.lightbox-close:hover { background: rgba(255,255,255,0.1); }
.lightbox-close:focus { outline: 2px solid #fafaf9; outline-offset: 2px; }
.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}
.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
}
.lightbox-caption {
    margin-top: var(--space);
    font-size: 0.875rem;
    color: rgba(250,250,249,0.85);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.site-footer {
    padding: var(--space-lg) var(--space);
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.site-footer a { color: var(--text-soft); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* Bottom corner images (working-1, working-2) – scaled to match top-left corner */
.bottom-deco {
    position: fixed;
    bottom: 0;
    z-index: 5;
    pointer-events: none;
}
.bottom-deco img {
    display: block;
    width: auto;
    height: calc(0.72 * var(--deco-size)); /* 3x previous (0.24 → 0.72) */
    max-width: calc(2.28 * var(--deco-size));
    -webkit-border-radius: 1.25rem;
    border-radius: 1.25rem;
    -webkit-box-shadow: 0 -2px 12px rgba(28, 25, 23, 0.08);
    box-shadow: 0 -2px 12px rgba(28, 25, 23, 0.08);
}
.bottom-deco--left { left: 0; }
.bottom-deco--left img { max-width: calc(2.28 * var(--deco-size)); }
.bottom-deco--right { right: 0; }
.bottom-deco--right img { max-width: calc(2.07 * var(--deco-size)); }

/* Responsive */
@media (min-width: 600px) {
    .gallery-grid-bouquets { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid-production { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .gallery-grid-bouquets { grid-template-columns: repeat(3, 1fr); }
    .gallery-grid-production { grid-template-columns: repeat(3, 1fr); }
    .sensibility-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
    .hero { padding-top: var(--space-xl); }
    .gallery-grid-masonry { grid-template-columns: 1fr; }
}
