/*
 * Modernisation layer.
 *
 * Loaded after style.css and deliberately additive: it overrides the template's
 * defaults rather than editing 3000 lines of it, so this whole pass can be
 * reverted by removing one <link>. Tokens live in style.css :root.
 *
 * Layout is untouched on purpose. The Bootstrap 3 float grid (col-md-* plus
 * .clearfix) stays exactly as it was; this changes only type, spacing, colour,
 * elevation and motion.
 */

/* --- Typography ------------------------------------------------------- */

body {
    color: var(--text);
    font-size: var(--text-base);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    letter-spacing: -0.015em;
    color: var(--text);
}

/* Section titles. The template hardcoded 45px, which overflows on phones. */
h3.heading {
    font-size: var(--text-3xl);
    font-weight: 700;
    margin-bottom: var(--space-12);
}

h3.heading span {
    color: var(--brand);
    /* The underline was a hard 2px border sitting tight under the text. */
    border-bottom: none;
    box-shadow: inset 0 -0.3em 0 var(--brand-tint);
}

/* Long paragraphs get a measure so lines stay readable. */
.gridtext p,
.about-left-grids h3,
.agileits_mail_grid_right_grid p {
    max-width: var(--measure);
}

.gridtext h4 {
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: 0;
    /* Was uppercase, which hurts readability at this length. */
    text-transform: none;
}

.gridtext p,
.agileits_mail_grid_right_grid p,
.about-left-grids p,
.single-pricing-box p,
.about-left,
.about-left p,
.about-right p,
.demo p,
.popular_classes p,
.contact_wthreerow p {
    color: var(--muted);
    font-size: var(--text-lg);
    line-height: 1.7;
    letter-spacing: 0;
}

.about-left-grids h3 {
    font-size: var(--text-2xl);
    color: var(--text);
    font-weight: 700;
}

/* --- Spacing ---------------------------------------------------------- */

.about,
.pricing,
.demo,
.popular_classes,
.contact,
.agile_testimonials,
.packages {
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
}

.about-left-top,
.about-left-bottom {
    margin-top: var(--space-12);
}

/* --- About icons ------------------------------------------------------ */

/* Was a dotted border with a grey glyph; now a solid brand-tinted disc. */
.gridicon i.fa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    line-height: 1;
    font-size: 1.4em;
    border: none;
    border-radius: 50%;
    background: var(--brand-tint);
    color: var(--brand);
}

/* --- Cards ------------------------------------------------------------ */

.single-pricing-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.single-pricing-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* The template scaled the whole column on hover, which nudged neighbours and
   blurred text mid-transition. The card above handles the hover now. */
.my-pricing-grid:hover {
    transform: none;
}

.pricing-icon img {
    display: block;
    width: 100%;
    /* Per-product inline border colours stay; just soften the corner. */
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* --- Buttons ---------------------------------------------------------- */

.btn-subscribe,
a.bordered-btn,
.w3l_contact_form #btnContact {
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn-subscribe:hover,
a.bordered-btn:hover,
.w3l_contact_form #btnContact:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-subscribe:active,
a.bordered-btn:active,
.w3l_contact_form #btnContact:active {
    transform: translateY(0);
    box-shadow: none;
}

.w3l_contact_form #btnContact:hover {
    background: var(--brand-strong);
}

/* --- Contact form ----------------------------------------------------- */

.w3l_contact_form input[type="text"],
.w3l_contact_form input[type="email"],
.w3l_contact_form textarea {
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    padding: var(--space-3) var(--space-4);
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.w3l_contact_form input::placeholder,
.w3l_contact_form textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

.w3l_contact_form input[type="text"]:focus,
.w3l_contact_form input[type="email"]:focus,
.w3l_contact_form textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint);
}

.contact_wthreerow h4 {
    font-size: var(--text-xl);
    color: var(--text);
    font-weight: 700;
    margin-bottom: var(--space-6);
}

/* --- Focus visibility -------------------------------------------------- */

/* The template removed outlines without replacing them, leaving keyboard users
   with no focus indicator at all. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* --- Scroll reveal ----------------------------------------------------- */

/* Driven by IntersectionObserver in scripts.blade.php. Without JS nothing adds
   .reveal, so content renders normally; this can never hide content. */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.is-visible {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .single-pricing-box,
    .btn-subscribe,
    a.bordered-btn,
    .w3l_contact_form #btnContact {
        transition: none;
    }

    .single-pricing-box:hover,
    .btn-subscribe:hover,
    a.bordered-btn:hover,
    .w3l_contact_form #btnContact:hover {
        transform: none;
    }
}


/* --- Hero -------------------------------------------------------------- */

/* Light and logo-led. The logo is a 3:1 lockup whose source PNG had a solid
   white background, so it is served from logo-transparent.webp (white flood
   filled to alpha, the white gap inside the mark preserved). A cream ground
   rather than white keeps the mark from floating on nothing. */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: min(86vh, 760px);
    padding: var(--space-16) var(--space-6);
    text-align: center;
    background: #FAF7F2;
    overflow: hidden;
}

/* Soft brand wash behind the logo. Pure CSS, no extra request. */
.hero::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto -10%;
    height: 90%;
    background:
        radial-gradient(55% 60% at 30% 35%, rgba(31, 157, 77, 0.13), transparent 70%),
        radial-gradient(45% 55% at 72% 30%, rgba(249, 66, 62, 0.10), transparent 70%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 54rem;
}

/* The lockup is 3:1, so width is what gives it presence, not height. */
.hero-logo {
    width: min(90vw, 760px);
    height: auto;
    margin: 0 auto var(--space-8);
    display: block;
}

.hero-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--text);
    margin: 0 auto var(--space-6);
    max-width: 34rem;
}

.hero-sub {
    font-size: var(--text-lg);
    line-height: 1.6;
    color: var(--muted);
    margin: 0 auto var(--space-8);
    max-width: 36rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
}

.hero-cta {
    display: inline-block;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-sm);
    background: var(--brand);
    color: #fff;
    font-size: var(--text-base);
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--brand);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}

.hero-cta:hover,
.hero-cta:focus {
    background: var(--brand-strong);
    border-color: var(--brand-strong);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.hero-cta--ghost {
    background: transparent;
    color: var(--brand-strong);
}

.hero-cta--ghost:hover,
.hero-cta--ghost:focus {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .hero-cta,
    .hero-cta:hover,
    .hero-cta:focus {
        transition: none;
        transform: none;
    }
}

/* --- Rounded corners --------------------------------------------------- */

/* The template was square-cornered throughout, which is the single biggest
   thing dating its look. --main-border-radius existed but was used once. */

/* Deliberately does not use a blanket `.demo img` / `.tab1 img`: the dietian
   thumbnail is a circular avatar (style.css sets border-radius: 50%) and a
   blanket rule here flattens it into a rounded square. */
.about-right img,
.about-left img,
.tabs-right2 img,
.w3ls-section img {
    border-radius: var(--radius-lg);
}

/* Restated so a later blanket rule cannot silently square it off again. */
.tab1 img {
    border-radius: 50%;
}

/* Meet Our Dietian. The panels were the square part: style.css pins the tab
   container to border-radius: 0 and leaves the tab list items sharp. */
.resp-vtabs .resp-tabs-container {
    border-radius: var(--radius-lg);
}

.resp-vtabs .resp-tabs-list li {
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2) !important;
    transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.resp-vtabs li.resp-tab-active {
    border-color: var(--brand);
}

/* The Self Control player. */
.about-right video,
video {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Before-After gallery is deliberately square-cornered.
 *
 * jssor rebuilds its wrapper divs at runtime and animates slides with CSS
 * transforms, and a transformed descendant escapes an ancestor's rounded
 * overflow clip. Rounding the frame left some slides square; rounding every
 * descendant still could not cover the wrappers jssor creates on the fly.
 * Square is uniform and honest. Do not add a radius back here. */
#jssor_1 {
    border-radius: 0;
}

.single-pricing-box {
    border-radius: var(--radius-lg);
}

/* A pricing card is a stack of three sibling divs (name / price / details),
   not one box. Rounding every child gave each band its own four corners; only
   the outer corners of the stack should be round. */
.my-pricing-grid > div {
    border-radius: 0;
}

.my-pricing-grid > div:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
}

.my-pricing-grid > div:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
}

.pricing-count {
    border-radius: var(--radius-sm);
}

.agileits_mail_grid_right_grid {
    border-radius: var(--radius-lg);
}

/* Drawer nav panel. */
.drawer-list {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}


/* --- Mobile containment ------------------------------------------------ */

/* Deliberately no `overflow-x: hidden` on html/body: there is no horizontal
   overflow to hide, and that band-aid would mask a real one later. Capping
   replaced-element widths is enough. */
img,
video,
iframe,
table {
    max-width: 100%;
}

/* jssor scales itself on resize, but its inline width still sets the layout
   box before that runs. */
#jssor_1,
#jssor_1 > div {
    max-width: 100%;
}


/* --- Small screens ----------------------------------------------------- */

@media (max-width: 767px) {
    /* Justified text with no hyphenation opens rivers of whitespace at phone
       widths. Left-aligned is simply more readable here. */
    .text-justify,
    .about-left,
    .tabs-right1 p {
        text-align: left !important;
    }

    /* 250px is fixed so the three plans line up as columns on desktop. Stacked
       on a phone there is nothing to line up with, and short plans get a large
       dead gap above their Subscribe button. */
    .pricing-bottom-bottom {
        height: auto;
    }

    /* Stops the longer stat labels from crowding their circle. */
    .agileinfo_stats_grid h3 {
        font-size: var(--text-base);
    }
}
