/* CreaNext home page. Festive pieces only show while <html data-festive> is set. */
html:not([data-festive]) .festive { display: none !important; }

body.home { background: var(--paper); color: var(--ink); }
.home footer { margin-top: 0; }
.home .theme-toggle-btn { display: none; }

.home h2 { font-size: clamp(2.5rem, 6vw, 4.75rem); line-height: 1.05; }

.kicker {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--saffron-deep);
    margin-bottom: 1rem;
}

.band { padding: clamp(4.5rem, 10vw, 8rem) 0; }

/* Hero ----------------------------------------------------------------------- */
.hero-night {
    --lit: 0;
    position: relative;
    overflow: hidden;
    min-height: 100svh;
    padding-top: var(--header-height);
    display: flex;
    flex-direction: column;
    background: var(--ink);
    color: var(--cream);
    isolation: isolate;
}

/* Warm light that rises as visitors light each diya. */
.hero-night::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 75%;
    background: radial-gradient(ellipse 75% 100% at 50% 100%, rgba(255, 138, 40, 0.62), rgba(179, 32, 42, 0.2) 55%, transparent 76%);
    opacity: calc(0.12 + var(--lit) * 0.88);
    transition: opacity 0.7s ease;
    z-index: -2;
    pointer-events: none;
}

.toran {
    position: absolute;
    inset: var(--header-height) 0 auto;
    height: 106px;
    background: url("../images/diwali-toran.svg") repeat-x center top / 240px 106px;
    z-index: 2;
    pointer-events: none;
}

.rangoli {
    position: absolute;
    top: 50%;
    right: max(-17rem, -21vw);
    width: min(46rem, 56vw);
    aspect-ratio: 1;
    margin-top: calc(min(46rem, 56vw) / -2);
    background: url("../images/diwali-rangoli.svg") center / contain no-repeat;
    animation: turn 180s linear infinite;
    z-index: -1;
}
@keyframes turn { to { transform: rotate(360deg); } }

#hero-fireworks {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.hero-copy {
    position: relative;
    z-index: 3;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: clamp(5.5rem, 11vh, 7.5rem);
    padding-bottom: 1.5rem;
}

.greeting {
    font-family: var(--font-display);
    color: var(--marigold);
    font-size: clamp(1.75rem, 3.4vw, 2.75rem);
    line-height: 1.3;
    margin-bottom: 0.25rem;
}

.hero-copy h1 {
    font-size: clamp(3.75rem, min(10vw, 14.5vh), 9.5rem);
    line-height: 0.98;
    margin-bottom: 1.25rem;
}

.hero-sub {
    max-width: 33rem;
    font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
    line-height: 1.5;
    color: #E4E9EC;
    margin-bottom: 2.25rem;
}

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.hero-actions .btn { padding: 0.95rem 1.75rem; font-size: 1.0625rem; }

.text-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}
.hero-night .text-link:hover { color: var(--marigold); }

/* Diyas ---------------------------------------------------------------------- */
.diya-stage { position: relative; z-index: 3; padding-bottom: 1rem; }

.diya-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    max-width: 62rem;
    margin: 0 auto;
    padding: 0 clamp(0.5rem, 3vw, 2rem);
}

.diya {
    position: relative;
    width: clamp(2.6rem, 9vw, 5.75rem);
    min-height: 44px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.diya svg { position: relative; display: block; width: 100%; height: auto; overflow: visible; }

.diya-glow {
    position: absolute;
    left: 50%;
    top: 22%;
    width: 300%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 182, 39, 0.55), rgba(255, 106, 38, 0.15) 45%, transparent 68%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.flame {
    transform-box: view-box;
    transform-origin: 60px 52px;
    transform: scale(0);
    transition: transform 0.35s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.diya[aria-pressed="true"] .diya-glow { opacity: 1; }
.diya[aria-pressed="true"] .flame { transform: scale(1); }
.diya[aria-pressed="true"] .flame-inner { animation: flicker 1.4s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }

.flame-inner { transform-box: view-box; transform-origin: 60px 52px; }
@keyframes flicker {
    0% { transform: scale(1, 1) skewX(0deg); }
    35% { transform: scale(0.95, 1.07) skewX(-2.5deg); }
    70% { transform: scale(1.03, 0.95) skewX(2deg); }
    100% { transform: scale(0.97, 1.05) skewX(-1deg); }
}

.diya-status {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 1rem;
    color: #E4E9EC;
    min-height: 1.5em;
}
.diya-status.done { color: var(--marigold); font-weight: 600; }

/* Services ------------------------------------------------------------------- */
.services-head { display: grid; gap: 1.25rem; margin-bottom: 3.5rem; max-width: 46rem; }
.services-head p { font-size: 1.1875rem; color: #41515F; }

.service-list { border-bottom: 1px solid rgba(6, 38, 61, 0.22); }

.service-row {
    position: relative;
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 1fr) 2rem;
    gap: 1.5rem;
    align-items: center;
    padding: 2rem 1rem;
    border-top: 1px solid rgba(6, 38, 61, 0.22);
    color: var(--ink);
    isolation: isolate;
}
.service-row::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--saffron);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
}
.service-row:hover::before,
.service-row:focus-visible::before { transform: scaleX(1); }

.service-num { font-weight: 600; color: var(--saffron-deep); transition: color 0.2s; }
.service-row h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.75rem, 3.4vw, 2.75rem); line-height: 1.1; }
.service-row p { font-size: 1.0625rem; color: #41515F; transition: color 0.2s; }
.service-row i { font-size: 1.25rem; justify-self: end; transition: transform 0.25s; }
.service-row:hover .service-num,
.service-row:hover p,
.service-row:focus-visible .service-num,
.service-row:focus-visible p { color: var(--ink-deep); }
.service-row:hover i { transform: translateX(4px); }

/* Work ----------------------------------------------------------------------- */
.work { background: var(--cream); }

.work-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 3rem;
}
.work-head .text-link { color: var(--ink); }
.work-head .text-link:hover { color: var(--saffron-deep); }

.work-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 2.75rem 1.5rem;
}
.work-item { grid-column: span 4; color: var(--ink); }
.work-item.w7 { grid-column: span 7; }
.work-item.w5 { grid-column: span 5; }

.work-shot {
    overflow: hidden;
    border-radius: 6px;
    background: var(--ink);
    aspect-ratio: 16 / 10;
    margin-bottom: 0.9rem;
}
.work-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}
.work-item:hover img { transform: scale(1.03); }
.work-item h3 { font-size: 1.3125rem; font-weight: 700; line-height: 1.25; }
.work-item:hover h3 { color: var(--saffron-deep); }
.work-item p { font-size: 1rem; color: #41515F; }

/* Proof ---------------------------------------------------------------------- */
.proof { background: var(--saffron); color: var(--ink-deep); }
.proof-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; }
.proof-grid p { font-size: 1.125rem; line-height: 1.45; }
.proof-grid .proof-figure { font-family: var(--font-display); font-size: clamp(2.5rem, 4vw, 3.5rem); line-height: 1.05; margin-bottom: 0.75rem; }

.tools-line {
    margin-top: 3.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(4, 26, 43, 0.35);
    font-size: 1.0625rem;
    font-weight: 500;
}

/* More ----------------------------------------------------------------------- */
.more { padding: 3rem 0; background: var(--paper); }
.more-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.75rem 2.5rem; }
.more-links span { font-weight: 600; color: #41515F; }
.more-links a { font-family: var(--font-display); font-size: clamp(1.375rem, 2.4vw, 1.875rem); color: var(--ink); }
.more-links a:hover { color: var(--saffron-deep); }

/* Closing CTA ---------------------------------------------------------------- */
.closing { background: var(--ink); color: var(--cream); text-align: left; }
.closing h2 { max-width: 15em; margin-bottom: 1.25rem; }
.closing p { font-size: 1.1875rem; color: #E4E9EC; margin-bottom: 2.25rem; max-width: 34rem; }
.closing .hero-actions .text-link:hover { color: var(--marigold); }

.quick-start {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.quick-start a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 60px;
    padding: 0.75rem 1.1rem;
    border: 1px solid rgba(251, 239, 223, 0.35);
    border-radius: 6px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--cream);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.quick-start a:hover,
.quick-start a:focus-visible { background: var(--saffron); border-color: var(--saffron); color: var(--ink-deep); }

.work-item h3::after { content: ' \2197'; font-weight: 500; }

/* Website builder promotion --------------------------------------------------- */
.hero-new {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.6rem;
    min-height: 44px;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.9rem;
    border: 1px solid rgba(251, 239, 223, 0.45);
    border-radius: 6px;
    font-weight: 600;
    color: var(--cream);
    background: var(--ink);
}
.hero-new:hover { background: var(--marigold); border-color: var(--marigold); color: var(--ink-deep); }

.promo-band { padding-bottom: clamp(4.5rem, 10vw, 8rem); }
.site-promo {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: center;
    padding: clamp(2rem, 5vw, 4rem);
    background: var(--ink);
    color: var(--cream);
    border-radius: 10px;
}
.promo-tag { display: inline-block; margin-bottom: 1rem; font-weight: 600; color: var(--marigold); }
.site-promo h2 { margin-bottom: 1rem; }
.site-promo > div > p { font-size: 1.1875rem; color: #E4E9EC; margin-bottom: 1.5rem; max-width: 33rem; }
.site-promo .btn { padding: 0.95rem 1.75rem; font-size: 1.0625rem; }
.site-promo p.promo-offer { margin: 1rem 0 0; font-size: 1.0625rem; color: var(--marigold); }
.promo-url { padding: 1.5rem; background: var(--paper); color: var(--ink); border-radius: 8px; }
.site-promo .promo-url p { margin: 0; color: var(--ink); font-size: clamp(1.25rem, 2.2vw, 1.75rem); font-weight: 700; word-break: break-word; }
.promo-url p span { color: var(--saffron-deep); text-decoration: underline; text-underline-offset: 5px; }
.promo-url small { font-size: 1rem; color: #41515F; }

/* Responsive ----------------------------------------------------------------- */
@media (max-width: 860px) {
    .service-row { grid-template-columns: 2.5rem minmax(0, 1fr) 1.5rem; gap: 0.25rem 0.75rem; padding: 1.5rem 0.5rem; }
    .service-row h3 { grid-column: 2; }
    .service-row p { grid-column: 2; grid-row: 2; }
    .service-row i { grid-column: 3; grid-row: 1; }

    .work-item, .work-item.w7, .work-item.w5 { grid-column: span 12; }
    .proof-grid { grid-template-columns: 1fr; gap: 2rem; }
    .site-promo { grid-template-columns: 1fr; gap: 1.75rem; }
}

@media (max-width: 768px) {
    .rangoli { right: -11rem; width: 26rem; top: var(--header-height); margin-top: 5.5rem; opacity: 0.4; }
    .toran { height: 80px; background-size: 181px 80px; }
    .hero-copy { padding-top: 7rem; justify-content: flex-start; }
    /* Keeps the row clear of the fixed support chat button. */
    .diya-stage { padding-bottom: 5.25rem; }
    .diya-row { padding: 0 0.75rem; }
    .diya { width: 12%; }
    .hero-actions .btn { padding: 0.9rem 1.5rem; }
}
