/*

Tooplate 2163 Spectrum
https://www.tooplate.com/view/2163-spectrum
Free HTML CSS Template

*/

/* ============ Root tokens ============ */
:root {
    --white: #FFFFFF;
    --ink: #111111;
    --orange: #FF4500;
    --green: #00FA9A;
    --magenta: #FF00FF;
    --font: 'Space Grotesk', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--white);
    color: var(--ink);
    font-family: var(--font);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
}

::selection {
    background: var(--green);
    color: var(--ink);
}

a {
    color: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ============ Scroll reveal ============ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ============ Header ============ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--white);
}

.site-header.scrolled {
    border-bottom: 2px solid var(--ink);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo b {
    color: var(--orange);
}

.main-nav {
    display: flex;
    gap: 34px;
    align-items: center;
}

.main-nav a:not(.cart-pill) {
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    color: var(--ink);
    padding: 6px 12px;
    border-radius: 6px;
    transition: background 0.12s linear, color 0.12s linear;
}

.main-nav a:not(.cart-pill):nth-of-type(3n+1):hover {
    background: var(--orange);
    color: var(--white);
}

.main-nav a:not(.cart-pill):nth-of-type(3n+2):hover {
    background: var(--green);
    color: var(--ink);
}

.main-nav a:not(.cart-pill):nth-of-type(3n):hover {
    background: var(--magenta);
    color: var(--white);
}

.cart-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
    font-size: 0.9rem;
    background: var(--ink);
    color: var(--white);
    padding: 9px 14px 9px 22px;
    border-radius: 40px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.cart-pill svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    stroke: var(--white);
    fill: none;
    stroke-width: 2;
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 30px;
    background: var(--green);
    color: var(--ink);
    font-weight: 700;
    font-size: 0.8rem;
}

.cart-pill:hover {
    background: var(--magenta);
}

/* ============ Mobile menu ============ */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 44px;
    height: 44px;
    z-index: 210;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--ink);
    margin: 5px auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(380px, 86vw);
    height: 100vh;
    height: 100dvh;
    background: var(--ink);
    z-index: 200;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.18, 1);
    overflow-y: auto;
    padding: 80px 40px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu a {
    font-weight: 600;
    font-size: 1.8rem;
    color: var(--white);
    text-decoration: none;
    padding: 12px 0;
    transition: color 0.2s ease;
}

.mobile-menu a:nth-child(3n+1):hover { color: var(--orange); }
.mobile-menu a:nth-child(3n+2):hover { color: var(--green); }
.mobile-menu a:nth-child(3n):hover { color: var(--magenta); }

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 17, 0.45);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* ============ Section 1: Hero Color-Block Split ============ */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-top: 70px;
}

.hero-left {
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px clamp(32px, 5vw, 80px);
}

.hero-eyebrow {
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--orange);
    margin-bottom: 24px;
}

.hero-left h1 {
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: 0.92;
    letter-spacing: -0.04em;
}

.hero-left h1 em {
    font-style: normal;
    color: var(--magenta);
}

.hero-desc {
    margin-top: 28px;
    max-width: 380px;
    font-size: 1.05rem;
    color: #444;
}

.hero-cta {
    display: inline-block;
    margin-top: 36px;
    width: fit-content;
    font-weight: 600;
    font-size: 1rem;
    background: var(--ink);
    color: var(--white);
    text-decoration: none;
    padding: 16px 40px;
    border-radius: 40px;
    transition: background 0.2s ease;
}

.hero-cta:hover {
    background: var(--orange);
}

.hero-right {
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: background 0.7s ease;
}

.hero-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 60vh;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    opacity: 0;
    transform: scale(0.86) rotate(-5deg);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    pointer-events: auto;
}

.hero-float {
    width: clamp(220px, 46%, 360px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: hero-bob 4.5s ease-in-out infinite;
}

.hero-float svg {
    width: 62%;
    height: 62%;
}

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

.hero-caption {
    text-align: center;
    color: var(--ink);
}

.hero-caption h3 {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.02em;
}

.hero-caption span {
    font-weight: 600;
    font-size: 1rem;
}

.hero-dots {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.hero-dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-dots button.active {
    background: var(--ink);
    transform: scale(1.2);
}

.hero-badge {
    position: absolute;
    top: 40px;
    right: 40px;
    background: var(--ink);
    color: var(--white);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    padding: 10px 16px;
    border-radius: 30px;
    transform: rotate(8deg);
    z-index: 3;
}

/* ============ Section 2: Flash-Color Catalog ============ */
.catalog {
    padding: 120px 0 100px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 48px;
    gap: 20px;
    flex-wrap: wrap;
}

.section-head h2 {
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 3.4rem);
    letter-spacing: -0.03em;
    line-height: 1;
}

.section-head p {
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #666;
}

.catalog-scroll {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 8px 32px 32px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--ink) transparent;
}

.catalog-scroll::-webkit-scrollbar {
    height: 8px;
}

.catalog-scroll::-webkit-scrollbar-thumb {
    background: var(--ink);
    border-radius: 8px;
}

.product-card {
    flex: 0 0 320px;
    scroll-snap-align: start;
    background: var(--white);
    border: 2px solid var(--ink);
    overflow: hidden;
    position: relative;
    transition: background 0.05s linear;
}

.product-media {
    aspect-ratio: 4 / 5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-media svg {
    width: 70%;
    height: 70%;
    filter: grayscale(100%);
    transition: filter 0.05s linear, transform 0.4s ease;
}

.product-info {
    padding: 20px 22px 64px;
    border-top: 2px solid var(--ink);
    position: relative;
}

.product-info h3 {
    font-weight: 600;
    font-size: 1.15rem;
}

.product-info .price {
    font-weight: 700;
    font-size: 1.05rem;
    margin-top: 4px;
    display: block;
}

.add-cart {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: -56px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.95rem;
    background: var(--ink);
    color: var(--white);
    border: none;
    cursor: pointer;
    padding: 13px 0;
    border-radius: 30px;
    transition: bottom 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
}

.product-card:hover .product-media svg {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.product-card:hover .add-cart {
    bottom: 18px;
}

.product-card.flash-magenta:hover { background: var(--magenta); }
.product-card.flash-orange:hover { background: var(--orange); }

.product-card:hover h3,
.product-card:hover .price {
    color: var(--white);
}

/* ============ Section 3: Geometric Divider ============ */
.divider {
    height: 30vh;
    min-height: 240px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.divider svg {
    width: min(900px, 92vw);
    height: 100%;
}

.divider .geo {
    fill: none;
    stroke-width: 2;
}

.geo-orange { stroke: var(--orange); }
.geo-green { stroke: var(--green); }

/* ============ Section 4: Accordion of Color ============ */
.accordion-section {
    padding: 100px 0 120px;
}

.accordion {
    max-width: 820px;
    margin: 48px auto 0;
}

.acc-item {
    border-top: 2px solid var(--ink);
    border-left: 4px solid transparent;
    transition: border-left-color 0.3s ease, background 0.3s ease;
}

.acc-item:last-child {
    border-bottom: 2px solid var(--ink);
}

.acc-trigger {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font);
    font-weight: 600;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    color: var(--ink);
    text-align: left;
    padding: 28px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.acc-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    position: relative;
}

.acc-icon::before,
.acc-icon::after {
    content: "";
    position: absolute;
    background: var(--orange);
    transition: transform 0.3s ease;
}

.acc-icon::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    transform: translateY(-50%);
}

.acc-icon::after {
    left: 50%;
    top: 0;
    width: 3px;
    height: 100%;
    transform: translateX(-50%);
}

.acc-item.open .acc-icon::after {
    transform: translateX(-50%) scaleY(0);
}

.acc-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.acc-panel-inner {
    padding: 0 24px 28px;
    font-size: 1.02rem;
    color: #333;
    max-width: 640px;
}

.acc-item.open {
    border-left-color: var(--orange);
    background: rgba(255, 0, 255, 0.1);
}

/* ============ Section 5: Sticker Exit Footer ============ */
.footer {
    position: relative;
    background: var(--white);
    padding: 140px 32px 80px;
    text-align: center;
    overflow: hidden;
}

.contact-wrap {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
}

.contact-title {
    font-weight: 700;
    font-size: clamp(2.4rem, 7vw, 4.4rem);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 40px;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    text-align: left;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.field input,
.field textarea {
    font-family: var(--font);
    font-size: 1rem;
    color: var(--ink);
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 0;
    padding: 14px 16px;
    width: 100%;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.field textarea {
    resize: vertical;
    min-height: 120px;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--magenta);
    background: rgba(255, 0, 255, 0.05);
}

.contact-submit {
    grid-column: 1 / -1;
    justify-self: start;
    font-family: var(--font);
    font-weight: 600;
    font-size: 1rem;
    color: var(--white);
    background: var(--ink);
    border: none;
    cursor: pointer;
    padding: 16px 44px;
    border-radius: 40px;
    transition: background 0.2s ease;
}

.contact-submit:hover {
    background: var(--orange);
}

.form-status {
    grid-column: 1 / -1;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
    min-height: 1.2em;
}

.form-status.error {
    color: var(--orange);
}

.sticker {
    position: absolute;
    font-weight: 700;
    font-size: clamp(0.85rem, 2vw, 1.2rem);
    letter-spacing: 0.05em;
    color: var(--white);
    padding: 12px 22px;
    border-radius: 40px;
    z-index: 1;
    transition: transform 0.3s ease;
}

.sticker:hover {
    transform: rotate(0deg) scale(1.08) !important;
}

.sticker-1 {
    background: var(--orange);
    top: -10px;
    left: 8%;
    transform: rotate(-12deg);
}

.sticker-2 {
    background: var(--green);
    color: var(--ink);
    top: 30px;
    right: 6%;
    transform: rotate(10deg);
}

.sticker-3 {
    background: var(--magenta);
    bottom: 90px;
    left: 18%;
    transform: rotate(7deg);
}

.sticker-4 {
    background: var(--ink);
    bottom: 70px;
    right: 16%;
    transform: rotate(-8deg);
}

.footer-meta {
    position: relative;
    z-index: 4;
    margin-top: 56px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
    font-weight: 500;
}

.footer-links a {
    text-decoration: none;
    position: relative;
}

.footer-links a:hover {
    color: var(--magenta);
}

.footer-credit {
    margin-top: 24px;
    font-size: 0.9rem;
    color: #555;
}

.footer-credit a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .hero-float { animation: none; }
    .hero-slide { transition: opacity 0.01ms; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .divider svg g { transform: none !important; }
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
    .main-nav { display: none; }
    .menu-toggle { display: block; }
    .header-inner { padding: 16px 24px; }
    .hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .hero-left { padding: 120px 28px 60px; }
    .hero-right { min-height: 60vh; padding: 50px 0; }
    .catalog { padding: 90px 0 70px; }
    .accordion-section { padding: 70px 0 90px; }
    .footer { padding: 110px 24px 70px; }
    .contact-form { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .product-card { flex-basis: 78vw; }
    .sticker-3 { left: 4%; }
    .sticker-4 { right: 4%; }
}
