/* ============================================================
   AssignmentHelpKit — custom styles (Tailwind handles utilities)
   ============================================================ */

:root {
    --brand: #6C3BFF;
    --pop: #C8FF3D;
    --coral: #FF6B5B;
    --ink: #14121F;
    --cream: #FFF9F0;
    --wa: #25D366;
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

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

/* Accessible focus */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 2px;
    border-radius: 6px;
}

/* ---------- Hero blobs + grain ---------- */
.blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}
.blob-violet { width: 480px; height: 480px; background: rgba(108, 59, 255, .22); top: -160px; left: -120px; }
.blob-lime   { width: 380px; height: 380px; background: rgba(200, 255, 61, .30); top: 40px; right: -140px; }
.blob-coral  { width: 320px; height: 320px; background: rgba(255, 107, 91, .18); bottom: -120px; left: 40%; }

.grain {
    position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Reusable bits ---------- */
.section-tag {
    display: inline-block;
    background: var(--pop);
    color: var(--ink);
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
    font-size: .78rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .4rem 1rem;
    border-radius: 9999px;
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
}
.section-tag-dark { box-shadow: 3px 3px 0 rgba(255,255,255,.25); border-color: rgba(255,255,255,.25); }

.sticker {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    background: var(--pop);
    color: var(--ink);
    font-size: .75rem;
    font-weight: 700;
    padding: .35rem .8rem;
    border-radius: 9999px;
    border: 2px solid var(--ink);
    box-shadow: 3px 3px 0 var(--ink);
    transform: rotate(2deg);
    white-space: nowrap;
}

.trust-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #fff;
    border: 2px solid rgba(20,18,31,.12);
    border-radius: 9999px;
    padding: .45rem .95rem;
    font-size: .85rem;
    font-weight: 600;
    transition: transform .2s ease, border-color .2s ease;
}
.trust-chip:hover { transform: translateY(-2px); border-color: var(--brand); }

/* ---------- Cards ---------- */
.feature-card, .service-card {
    background: var(--cream);
    border: 2px solid rgba(20,18,31,.1);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature-card:hover, .service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 32px -14px rgba(20,18,31,.25);
    border-color: var(--brand);
}
.service-card { background: #fff; }
.service-card-alt { background: var(--ink); color: #fff; border-color: var(--ink); }
.service-card-alt p { color: rgba(255,255,255,.7); }
.service-card-alt .service-quote-btn { background: var(--pop); color: var(--ink); }
.service-card-alt .service-quote-btn:hover { background: #fff; }

.service-quote-btn {
    margin-top: 1.1rem;
    align-self: flex-start;
    background: var(--brand);
    color: #fff;
    font-weight: 600;
    font-size: .875rem;
    padding: .55rem 1.2rem;
    border-radius: 9999px;
    transition: background-color .2s ease, transform .2s ease;
}
.service-quote-btn:hover { background: var(--ink); transform: translateX(3px); }

/* ---------- Steps ---------- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    position: relative;
}
.steps-grid::before {
    content: "";
    position: absolute;
    top: 2.1rem;
    left: 12%; right: 12%;
    height: 3px;
    background: repeating-linear-gradient(90deg, var(--brand) 0 10px, transparent 10px 20px);
    z-index: 0;
}
.step-card {
    position: relative;
    z-index: 1;
    background: var(--cream);
    border: 2px solid rgba(20,18,31,.1);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: transform .25s ease, box-shadow .25s ease;
}
.step-card:hover { transform: translateY(-5px); box-shadow: 0 16px 32px -14px rgba(20,18,31,.25); }
.step-number {
    width: 3.4rem; height: 3.4rem;
    margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand); color: #fff;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700; font-size: 1.35rem;
    border-radius: 9999px;
    border: 3px solid #fff;
    box-shadow: 0 6px 14px -4px rgba(108,59,255,.5);
}
@media (max-width: 1023px) {
    .steps-grid { grid-template-columns: repeat(2, 1fr); }
    .steps-grid::before { display: none; }
}
@media (max-width: 560px) {
    .steps-grid { grid-template-columns: 1fr; }
}

/* ---------- Subjects ---------- */
.subject-tab {
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.85);
    border: 2px solid rgba(255,255,255,.15);
    font-weight: 600;
    font-size: .875rem;
    padding: .55rem 1.2rem;
    border-radius: 9999px;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.subject-tab:hover { background: rgba(255,255,255,.16); transform: translateY(-2px); }
.subject-tab.active { background: var(--pop); color: var(--ink); border-color: var(--pop); }

.subject-chip {
    background: rgba(255,255,255,.08);
    color: #fff;
    border: 2px solid rgba(255,255,255,.18);
    font-size: .875rem;
    font-weight: 500;
    padding: .5rem 1.1rem;
    border-radius: 9999px;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.subject-chip:hover { background: var(--brand); border-color: var(--brand); transform: translateY(-2px); }

/* ---------- Form ---------- */
.field-label {
    display: block;
    font-weight: 600;
    font-size: .875rem;
    margin-bottom: .4rem;
}
.field-input {
    width: 100%;
    background: var(--cream);
    border: 2px solid rgba(20,18,31,.15);
    border-radius: .85rem;
    padding: .75rem 1rem;
    font-size: .95rem;
    transition: border-color .2s ease, box-shadow .2s ease;
    color: var(--ink);
}
.field-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(108,59,255,.15);
}
.field-input.invalid { border-color: var(--coral); }

.field-error {
    color: var(--coral);
    font-size: .8rem;
    font-weight: 600;
    margin-top: .35rem;
    min-height: 0;
}
.field-error:empty { display: none; }

.hp-field {
    position: absolute !important;
    left: -9999px !important;
    height: 0; width: 0;
    overflow: hidden;
}

.stepper {
    display: flex;
    align-items: stretch;
    border: 2px solid rgba(20,18,31,.15);
    border-radius: .85rem;
    overflow: hidden;
    background: var(--cream);
}
.stepper button {
    width: 2.9rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--brand);
    transition: background-color .15s ease;
}
.stepper button:hover { background: rgba(108,59,255,.1); }
.stepper input {
    width: 4.2rem;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: 700;
    font-size: 1rem;
    padding: .65rem 0;
    -moz-appearance: textfield;
    appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { outline: none; }

.suggestions {
    position: absolute;
    top: 100%; left: 0; right: 0;
    z-index: 30;
    background: #fff;
    border: 2px solid rgba(20,18,31,.12);
    border-radius: .85rem;
    margin-top: .35rem;
    max-height: 13rem;
    overflow-y: auto;
    box-shadow: 0 18px 36px -14px rgba(20,18,31,.3);
}
.suggestions button {
    display: block;
    width: 100%;
    text-align: left;
    padding: .65rem 1rem;
    font-size: .9rem;
    transition: background-color .15s ease;
}
.suggestions button:hover, .suggestions button.active { background: var(--cream); color: var(--brand); font-weight: 600; }

/* ---------- Carousel ---------- */
.review-slide { flex: 0 0 100%; padding: 0 .25rem; }
.carousel-arrow {
    width: 3rem; height: 3rem;
    border-radius: 9999px;
    border: 2px solid rgba(20,18,31,.15);
    background: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.carousel-arrow:hover { background: var(--brand); color: #fff; border-color: var(--brand); transform: scale(1.06); }
.carousel-dot {
    width: .65rem; height: .65rem;
    border-radius: 9999px;
    background: rgba(20,18,31,.2);
    transition: background-color .2s ease, width .2s ease;
}
.carousel-dot.active { background: var(--brand); width: 1.6rem; }

/* ---------- FAQ ---------- */
.faq-item {
    background: var(--cream);
    border: 2px solid rgba(20,18,31,.1);
    border-radius: 1rem;
    overflow: hidden;
    transition: border-color .2s ease;
}
.faq-item.open { border-color: var(--brand); }
.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    text-align: left;
    font-family: "Space Grotesk", sans-serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 1.15rem 1.35rem;
}
.faq-icon {
    flex-shrink: 0;
    width: 1.9rem; height: 1.9rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand); color: #fff;
    border-radius: 9999px;
    font-size: 1.15rem;
    transition: transform .3s ease, background-color .3s ease;
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--coral); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
}
.faq-answer p {
    padding: 0 1.35rem 1.2rem;
    color: rgba(20,18,31,.7);
    font-size: .925rem;
    line-height: 1.65;
}

/* ---------- Floating WhatsApp ---------- */
.wa-float {
    position: fixed;
    bottom: 5.4rem;
    right: 1.25rem;
    z-index: 45;
    width: 3.8rem; height: 3.8rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--wa);
    color: #fff;
    border-radius: 9999px;
    box-shadow: 0 10px 26px -6px rgba(37,211,102,.55);
    transition: transform .2s ease;
}
.wa-float:hover { transform: scale(1.1); }
.wa-pulse {
    position: absolute; inset: 0;
    border-radius: 9999px;
    background: var(--wa);
    animation: wa-pulse 2s ease-out infinite;
    z-index: -1;
}
@keyframes wa-pulse {
    0%   { transform: scale(1); opacity: .55; }
    100% { transform: scale(1.7); opacity: 0; }
}
@media (min-width: 768px) { .wa-float { bottom: 1.75rem; right: 1.75rem; } }

/* ---------- Mobile sticky bar ---------- */
.mobile-cta-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 44;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
    padding: .7rem .9rem calc(.7rem + env(safe-area-inset-bottom));
    background: rgba(255,249,240,.96);
    backdrop-filter: blur(10px);
    border-top: 2px solid rgba(20,18,31,.1);
}
@media (max-width: 767px) { body { padding-bottom: 4.6rem; } }

/* ---------- Social icons ---------- */
.social-icon {
    width: 2.5rem; height: 2.5rem;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9999px;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.8);
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.social-icon:hover { background: var(--pop); color: var(--ink); transform: translateY(-3px); }

/* ---------- Policy pages ---------- */
.policy-content h2 {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
    font-size: 1.35rem;
    margin-top: 2rem;
    margin-bottom: .6rem;
}
.policy-content h2:first-of-type { margin-top: 1.4rem; }
.policy-content p { color: rgba(20,18,31,.72); line-height: 1.7; margin-bottom: .8rem; }
.policy-content ul {
    list-style: none;
    margin: .6rem 0 1rem;
    padding: 0;
}
.policy-content li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: .5rem;
    color: rgba(20,18,31,.72);
    line-height: 1.65;
}
.policy-content li::before {
    content: "";
    position: absolute;
    left: 0; top: .5em;
    width: .55rem; height: .55rem;
    border-radius: 9999px;
    background: var(--brand);
}
.policy-content a { color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.policy-content a:hover { color: var(--ink); }
.policy-intro {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--ink) !important;
    border-left: 4px solid var(--pop);
    padding-left: 1rem;
}

/* ---------- Scroll animations ---------- */
.fade-up { opacity: 0; transform: translateY(28px); }
.fade-up.visible {
    animation: fade-up .7s cubic-bezier(.22,.68,.35,1) forwards;
}
@keyframes fade-up {
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .fade-up { opacity: 1; transform: none; }
    .fade-up.visible { animation: none; }
    html { scroll-behavior: auto; }
}
