/* ========================================
   tanso.in - Styles
   Street-style editorial, Japanese fashion zine
   ======================================== */

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

:root {
    --terracotta: #C4604A;
    --deep-carbon: #1E1E1E;
    --warm-ash: #F5EDE4;
    --smoked-clay: #8B5E3C;
    --aurora-teal: #3D8B8B;
    --charcoal-mist: #6B6560;
    --kiln-white: #FEFCF9;
}

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

body {
    background-color: var(--warm-ash);
    color: var(--deep-carbon);
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: 0.2px;
    overflow-x: hidden;
}

/* ---- Carbon Fiber Texture (repeating SVG) ---- */
#carbon-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0L8 8M8 0L0 8' stroke='%23FEFCF9' stroke-width='0.3' opacity='0.05'/%3E%3C/svg%3E");
    background-repeat: repeat;
    pointer-events: none;
    z-index: 1;
}

/* ---- Vertical Navigation ---- */
#side-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 48px;
    height: 100vh;
    background-color: var(--deep-carbon);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    z-index: 100;
}

#nav-logo {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 13px;
    color: var(--kiln-white);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 2px;
}

#nav-dots {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--charcoal-mist);
    cursor: pointer;
    transition: background-color 300ms ease;
}

.nav-dot.active {
    background-color: var(--terracotta);
}

.nav-dot:hover {
    background-color: var(--aurora-teal);
}

/* ---- Section base ---- */
.section {
    position: relative;
    margin-left: 48px;
}

/* ---- HERO ---- */
#hero {
    width: calc(100vw - 48px);
    height: 100vh;
    background-color: var(--deep-carbon);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    position: relative;
}

#hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 120px;
    color: var(--kiln-white);
    letter-spacing: -1.5px;
    line-height: 1.05;
    position: relative;
    z-index: 3;
    margin-left: 96px;
    transition: color 1.5s ease;
}

#hero-title.color-shift {
    color: var(--terracotta);
}

/* Aurora band variants */
.aurora-band {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, transparent 0%, var(--aurora-teal) 20%, var(--terracotta) 50%, var(--warm-ash) 80%, transparent 100%);
    opacity: 0.6;
    animation: auroraPulse 6s ease-in-out infinite;
}

.aurora-band--large {
    position: absolute;
    bottom: 35%;
    left: 0;
    height: 80px;
    filter: blur(8px);
    z-index: 2;
    opacity: 0.5;
}

.aurora-band--divider {
    height: 4px;
    margin: 0;
    opacity: 0.5;
    position: relative;
}

.aurora-band--fade {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 12px;
    opacity: 0.4;
    background: linear-gradient(90deg, transparent 0%, var(--aurora-teal) 20%, var(--terracotta) 50%, transparent 100%);
}

@keyframes auroraPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Staggered aurora offsets */
.aurora-band--divider:nth-of-type(2) {
    animation-delay: 1s;
}

.aurora-band--fade {
    animation-delay: 2s;
}

/* ---- Hero Bubbles ---- */
#hero-bubbles {
    position: absolute;
    bottom: -40px;
    right: 80px;
    width: 320px;
    height: 400px;
    z-index: 3;
    opacity: 0;
    transition: opacity 1s ease;
}

#hero-bubbles.visible {
    opacity: 1;
}

.bubble {
    position: absolute;
}

.bubble--xl {
    width: 200px;
    height: 200px;
    bottom: 40px;
    right: 0;
    animation: bubbleFloat 7s ease-in-out infinite;
}

.bubble--lg {
    width: 120px;
    height: 120px;
    bottom: 160px;
    right: 120px;
    animation: bubbleFloat 5s ease-in-out infinite;
    animation-delay: 0.8s;
}

.bubble--md {
    width: 80px;
    height: 80px;
    bottom: 240px;
    right: 40px;
    animation: bubbleFloat 6s ease-in-out infinite;
    animation-delay: 1.6s;
}

.bubble--sm {
    width: 48px;
    height: 48px;
    bottom: 300px;
    right: 200px;
    animation: bubbleFloat 4.5s ease-in-out infinite;
    animation-delay: 2.4s;
}

.bubble--xs {
    width: 32px;
    height: 32px;
    bottom: 180px;
    right: 260px;
    animation: bubbleFloat 8s ease-in-out infinite;
    animation-delay: 3.2s;
}

@keyframes bubbleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ---- CONTEXT SECTION (Editorial Grid) ---- */
#context {
    background-color: var(--warm-ash);
    padding: 120px 0 72px;
    background-image: url("data:image/svg+xml,%3Csvg width='8' height='8' viewBox='0 0 8 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0L8 8M8 0L0 8' stroke='%231E1E1E' stroke-width='0.3' opacity='0.03'/%3E%3C/svg%3E");
}

.editorial-grid {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 48px;
    display: grid;
    grid-template-columns: 180px 120px 280px 160px 220px;
    column-gap: 16px;
    row-gap: 48px;
}

.editorial-block--text {
    padding-top: 40px;
}

.editorial-block--text:nth-child(odd) {
    padding-top: 0;
}

.editorial-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 48px;
    letter-spacing: -1.5px;
    line-height: 1.05;
    color: var(--deep-carbon);
    margin-bottom: 24px;
}

.editorial-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.65;
    letter-spacing: 0.2px;
    color: var(--deep-carbon);
    max-width: 68ch;
}

/* Margin annotations */
.margin-annotation {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 24px;
}

.annotation-date {
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    font-size: 11px;
    color: var(--charcoal-mist);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.annotation-tag {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: var(--smoked-clay);
}

/* Stamp labels */
.stamp-label {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--terracotta);
    border: 2px solid var(--terracotta);
    padding: 4px 12px;
    transform: rotate(-3deg);
    margin-bottom: 16px;
    transition: transform 400ms ease, border-width 400ms ease;
}

.stamp-label:hover {
    transform: rotate(0deg);
    border-width: 3px;
}

/* Bubble margins in editorial */
.bubble-margin {
    position: relative;
    min-height: 120px;
}

.bubble--margin-lg {
    width: 160px;
    height: 160px;
    position: absolute;
    top: 0;
    right: 0;
    animation: bubbleFloat 7s ease-in-out infinite;
}

.bubble--margin-md {
    width: 64px;
    height: 64px;
    position: absolute;
    top: 80px;
    left: 20px;
    animation: bubbleFloat 5.5s ease-in-out infinite;
    animation-delay: 1s;
}

.bubble--margin-sm {
    width: 40px;
    height: 40px;
    position: absolute;
    top: 40px;
    left: 100px;
    animation: bubbleFloat 6.5s ease-in-out infinite;
    animation-delay: 2s;
}

.bubble--margin-xs {
    width: 28px;
    height: 28px;
    position: absolute;
    bottom: 20px;
    right: 40px;
    animation: bubbleFloat 4s ease-in-out infinite;
    animation-delay: 3s;
}

/* ---- GALLERY SECTION ---- */
#gallery {
    background-color: var(--kiln-white);
    padding: 96px 0 72px;
}

.gallery-grid {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 48px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.gallery-item {
    position: relative;
}

.gallery-item--wide {
    grid-column: span 8;
}

.gallery-item--tall {
    grid-column: span 4;
    grid-row: span 2;
}

.gallery-item--square {
    grid-column: span 4;
}

.gallery-item--standard {
    grid-column: span 4;
}

.gallery-image {
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 2%, 3% 0, 97% 0, 100% 3%, 100% 97%, 98% 100%, 2% 100%, 0 98%);
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-image:hover {
    transform: rotate(1.5deg);
}

.gallery-image-inner {
    transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gallery-image:hover .gallery-image-inner {
    transform: scale(1.03);
}

.gallery-svg {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-annotation {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    margin-bottom: 4px;
}

.gallery-item .stamp-label {
    display: inline-block;
    margin-top: 12px;
}

/* ---- RESOLUTION / CLOSING ---- */
#resolution {
    background-color: var(--terracotta);
    padding: 168px 96px 192px;
    position: relative;
    overflow: hidden;
}

.resolution-content {
    max-width: 720px;
    text-align: left;
}

.resolution-heading {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 72px;
    letter-spacing: -1.5px;
    line-height: 1.05;
    color: var(--kiln-white);
    margin-bottom: 24px;
}

.resolution-subtext {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.65;
    color: var(--warm-ash);
    opacity: 0.85;
}

/* ---- Link hover style ---- */
a {
    color: var(--aurora-teal);
    text-decoration: none;
    background-image: linear-gradient(var(--terracotta), var(--terracotta));
    background-position: 0 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: color 300ms ease, background-size 300ms ease;
}

a:hover {
    color: var(--terracotta);
    background-size: 100% 2px;
}

a:visited {
    color: var(--smoked-clay);
}

/* ---- Scroll reveal animation ---- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive adjustments ---- */
@media (max-width: 1100px) {
    .editorial-grid {
        grid-template-columns: 1fr 1fr;
        padding: 0 32px;
    }

    .editorial-block--text {
        grid-column: 1 / -1 !important;
    }

    .margin-annotation {
        grid-column: 1 !important;
    }

    .bubble-margin {
        display: none;
    }

    .editorial-heading {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    #hero-title {
        font-size: 64px;
        margin-left: 32px;
    }

    .editorial-grid {
        grid-template-columns: 1fr;
        padding: 0 24px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        padding: 0 24px;
    }

    .gallery-item--wide,
    .gallery-item--tall,
    .gallery-item--square,
    .gallery-item--standard {
        grid-column: span 1;
        grid-row: span 1;
    }

    .resolution-heading {
        font-size: 40px;
    }

    #resolution {
        padding: 96px 32px 120px;
    }

    #hero-bubbles {
        right: 20px;
        width: 200px;
    }

    .bubble--xl {
        width: 120px;
        height: 120px;
    }

    .bubble--lg {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    #side-nav {
        width: 36px;
    }

    .section {
        margin-left: 36px;
    }

    #hero {
        width: calc(100vw - 36px);
    }

    #hero-title {
        font-size: 48px;
        margin-left: 20px;
    }

    .editorial-heading {
        font-size: 28px;
    }

    .resolution-heading {
        font-size: 32px;
    }
}
