
/* ==========================================================================
   MOHAR COTTAGE — TERMS & CONDITIONS
   File: assets/css/terms.css

   Design:
   - Forest green, ivory and muted gold
   - Editorial serif headings
   - Responsive table-of-contents sidebar
   - Compact, animated accordion sections
   ========================================================================== */


/* ==========================================================================
   01. DESIGN TOKENS & BASE
   ========================================================================== */

.mohar-terms {
    --forest: #183d32;
    --ivory: #f8f6ef;
    --gold: #b89a5a;
    --ink: #26342d;

    background: var(--ivory);
    color: var(--ink);
    font-family: Inter, sans-serif;
}

.mohar-terms * {
    box-sizing: border-box;
}


/* ==========================================================================
   02. HERO SECTION
   ========================================================================== */

.mohar-terms__hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    background: var(--forest);
    color: var(--ivory);

    padding:
        clamp(76px, 10vw, 142px)
        24px
        clamp(92px, 12vw, 164px);
}

.mohar-terms__hero-inner {
    position: relative;
    z-index: 2;

    max-width: 920px;
    margin: auto;

    text-align: center;
}

/* Shared small uppercase labels */

.mohar-terms__eyebrow,
.mohar-terms__updated,
.mohar-terms__toc-label,
.mohar-terms__contact-kicker {
    font-size: 10px;
    letter-spacing: .19em;
    font-weight: 600;
}

/* Hero eyebrow */

.mohar-terms__eyebrow {
    color: #d9c69a;
    margin: 0 0 26px;
}

/* Main heading */

.mohar-terms__hero h1 {
    color: var(--ivory);

    font-family: "Libre Baskerville", Georgia, serif;
    font-size: clamp(42px, 7vw, 82px);
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: -.045em;

    margin: 0;
}

.mohar-terms__hero h1 em {
    color: var(--gold);
    font-style: italic;
}

/* Hero introductory text */

.mohar-terms__intro {
    max-width: 560px;
    margin: 24px auto 0;

    color: #d7ded6;
    font-size: 15px;
    line-height: 1.85;
}

/* Last updated label */

.mohar-terms__updated {
    margin: 28px 0 0;
    color: #c5cbbf;
    font-size: 9px;
}

.mohar-terms__updated time {
    color: #e0c88f;
    margin-left: 8px;
}

/* Decorative mountain silhouette */

.mohar-terms__mountain {
    position: absolute;
    z-index: 1;

    pointer-events: none;
    opacity: .22;

    left: -8%;
    right: -8%;
    bottom: -1px;

    height: 105px;
    background: #0b241d;

    clip-path: polygon(
        0 68%,
        12% 38%,
        21% 60%,
        35% 15%,
        48% 64%,
        60% 31%,
        72% 68%,
        84% 24%,
        100% 70%,
        100% 100%,
        0 100%
    );
}


/* ==========================================================================
   03. MAIN CONTENT LAYOUT
   ========================================================================== */

.mohar-terms__layout {
    width: min(1180px, calc(100% - 48px));
    margin: auto;

    display: grid;
    grid-template-columns: 220px minmax(0, 760px);

    justify-content: center;
    gap: clamp(44px, 7vw, 100px);

    padding: 76px 0 100px;
    align-items: start;
}


/* ==========================================================================
   04. TABLE OF CONTENTS / LEFT SIDEBAR
   ========================================================================== */

.mohar-terms__toc {
    position: sticky;
    top: 32px;
    padding-top: 8px;
}

/* Sidebar heading */

.mohar-terms__toc-label {
    color: var(--gold);
    margin: 0 0 20px;
}

/* Sidebar links */

.mohar-terms__toc nav {
    display: grid;
    gap: 2px;
}

.mohar-terms__toc a {
    display: block;
    padding: 8px 0;

    color: #68736a;
    text-decoration: none;

    font-size: 12px;
    line-height: 1.5;

    transition: color 200ms ease;
}

.mohar-terms__toc a:hover,
.mohar-terms__toc a:focus-visible {
    color: var(--forest);
}


/* ==========================================================================
   05. WELCOME / INTRODUCTION
   ========================================================================== */

.mohar-terms__welcome {
    padding: 0 0 34px;
    border-bottom: 1px solid #e5e0d4;
    margin-bottom: 18px;
}

/* Welcome paragraphs */

.mohar-terms__welcome p {
    font-size: 14px;
    line-height: 1.9;

    color: #626c63;
    margin: 0 0 12px;
}

/* Welcome heading */

.mohar-terms__welcome p:first-child {
    color: var(--forest);

    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 21px;
}

/* Remove bottom margin from final paragraph */

.mohar-terms__welcome p:last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   06. ACCORDION STRUCTURE
   ========================================================================== */

/* Individual accordion section */

.mohar-terms__section {
    border-bottom: 1px solid #e4dfd3;
    padding: 10px;

    /* Gives anchor navigation some breathing room above headings */
    scroll-margin-top: 24px;
}


/* --------------------------------------------------------------------------
   Accordion trigger / clickable heading
   -------------------------------------------------------------------------- */

.mohar-terms__trigger {
    appearance: none;

    width: 100%;

    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 22px;
    gap: 12px;

    align-items: center;
    text-align: left;

    border: 0;
    background: transparent;

    /* Reduced from 23px to 15px to eliminate excessive vertical spacing */
    padding: 15px 0;

    cursor: pointer;
    color: var(--forest);
}

/* Section number */

.mohar-terms__number {
    color: #b4a47e;

    font-size: 10px;
    letter-spacing: .08em;
    font-weight: 600;
}

/* Accordion heading */

.mohar-terms__title {
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 17px;
    line-height: 1.5;
    font-weight: 400;
}

/* --------------------------------------------------------------------------
   Plus / minus icon
   -------------------------------------------------------------------------- */

.mohar-terms__icon {
    position: relative;

    width: 18px;
    height: 18px;

    justify-self: end;
}

/* Horizontal and vertical strokes */

.mohar-terms__icon:before,
.mohar-terms__icon:after {
    content: "";

    position: absolute;

    background: var(--gold);

    top: 8px;
    left: 2px;

    width: 14px;
    height: 1px;
}

/* Vertical stroke rotates away when accordion opens */

.mohar-terms__icon:after {
    transform: rotate(90deg);

    transition: transform 350ms ease;
}

/* Open accordion displays a minus icon */

.mohar-terms__trigger[aria-expanded="true"]
.mohar-terms__icon:after {
    transform: rotate(0);
}


/* --------------------------------------------------------------------------
   Accordion hover and keyboard focus
   -------------------------------------------------------------------------- */

.mohar-terms__trigger:hover .mohar-terms__title {
    color: #8c7138;
}

.mohar-terms__trigger:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 5px;
}


/* ==========================================================================
   07. ACCORDION CONTENT / PANEL
   ========================================================================== */

/*
   The JavaScript controls panel height and opacity during animation.

   Keep the hidden attribute functional so closed panels remain inaccessible
   and do not occupy layout space.
*/

.mohar-terms__panel[hidden] {
    display: none;
}

/* Inner content spacing */

.mohar-terms__panel-inner {
    padding: 0 34px 18px 50px;

    color: #687168;
    font-size: 13px;
    line-height: 1.9;
}

/* Paragraphs */

.mohar-terms__panel-inner p {
    margin: 0 0 14px;
}

.mohar-terms__panel-inner p:last-child {
    margin-bottom: 0;
}

/* Lists */

.mohar-terms__panel-inner ul,
.mohar-terms__panel-inner ol {
    margin: 0 0 16px;
    padding-left: 19px;
}

.mohar-terms__panel-inner li {
    padding-left: 3px;
    margin: 0 0 7px;
}

/* Gold list markers */

.mohar-terms__panel-inner li::marker {
    color: var(--gold);
}

/* Strong emphasis */

.mohar-terms__panel-inner strong {
    color: #43564a;
    font-weight: 600;
}

/* Subheadings inside accordion content */

.mohar-terms__panel-inner h3 {
    margin: 22px 0 8px;

    color: var(--forest);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
}

.mohar-terms__panel-inner h3:first-child {
    margin-top: 0;
}


/* ==========================================================================
   08. FEATURED SECTION
   Cancellation & Refund Policy
   ========================================================================== */

/* Subtle highlight for the featured cancellation section */

.mohar-terms__section.is-featured {
    background: rgba(218, 204, 164, .12);
    border-bottom-color: #d8c9a6;
}

/* Featured heading alignment */

.mohar-terms__section.is-featured
.mohar-terms__trigger {
    padding-left: 14px;
    padding-right: 14px;
}

/* Featured content alignment */

.mohar-terms__section.is-featured
.mohar-terms__panel-inner {
    padding-left: 64px;
    padding-right: 48px;
}


/* ==========================================================================
   09. CONTACT CTA
   ========================================================================== */

.mohar-terms__contact {
    margin-top: 54px;
    padding: 38px;

    background: var(--forest);
    color: var(--ivory);
}

/* CTA kicker */

.mohar-terms__contact-kicker {
    color: #d5bd83;
    margin: 0 0 15px;
}

/* CTA heading */

.mohar-terms__contact h2 {
    color: var(--ivory);

    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 28px;
    font-weight: 400;

    margin: 0 0 12px;
}

/* CTA description */

.mohar-terms__contact p:not(.mohar-terms__contact-kicker) {
    color: #d4ddd4;

    font-size: 13px;
    line-height: 1.8;

    margin: 0 0 20px;
}

/* CTA link */

.mohar-terms__contact-link {
    display: inline-flex;
    gap: 10px;
    align-items: center;

    color: #e4cd94;
    text-decoration: none;

    font-size: 12px;
    font-weight: 600;

    border-bottom: 1px solid #8f815c;
    padding-bottom: 6px;
}

.mohar-terms__contact-link:hover {
    color: #fff;
}


/* ==========================================================================
   10. TABLET RESPONSIVE — 900px AND BELOW
   ========================================================================== */

@media (max-width: 900px) {

    /* Stack sidebar above the main content */

    .mohar-terms__layout {
        grid-template-columns: minmax(0, 760px);
        gap: 0;
        padding-top: 48px;
    }

    /* Sidebar becomes a normal content block */

    .mohar-terms__toc {
        position: static;

        margin-bottom: 30px;
        padding: 18px 20px;

        border: 1px solid #e4dfd3;
    }

    /* Display navigation links in two columns */

    .mohar-terms__toc nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 20px;
    }

    .mohar-terms__toc a {
        padding: 6px 0;
    }
}


/* ==========================================================================
   11. MOBILE RESPONSIVE — 600px AND BELOW
   ========================================================================== */

@media (max-width: 600px) {

    /* Hero */

    .mohar-terms__hero {
        padding: 74px 22px 112px;
    }

    .mohar-terms__eyebrow {
        font-size: 9px;
        margin-bottom: 20px;
    }

    .mohar-terms__intro {
        font-size: 13px;
        margin-top: 18px;
    }

    .mohar-terms__mountain {
        height: 72px;
    }


    /* Main layout */

    .mohar-terms__layout {
        width: calc(100% - 36px);
        padding: 34px 0 64px;
    }


    /* Sidebar */

    .mohar-terms__toc {
        padding: 16px;
        margin-bottom: 24px;
    }

    .mohar-terms__toc nav {
        grid-template-columns: 1fr;
    }

    .mohar-terms__toc a {
        font-size: 12px;
    }


    /* Welcome section */

    .mohar-terms__welcome {
        padding-bottom: 24px;
    }

    .mohar-terms__welcome p {
        font-size: 13px;
    }

    .mohar-terms__welcome p:first-child {
        font-size: 19px;
    }


    /* Accordion heading */

    .mohar-terms__trigger {
        grid-template-columns: 27px minmax(0, 1fr) 18px;
        gap: 9px;

        /* Compact mobile spacing */
        padding: 13px 0;
    }

    .mohar-terms__number {
        font-size: 9px;
    }

    .mohar-terms__title {
        font-size: 15px;
    }


    /* Accordion content */

    .mohar-terms__panel-inner {
        padding: 0 8px 18px 36px;

        font-size: 12px;
        line-height: 1.85;
    }


    /* Featured cancellation section */

    .mohar-terms__section.is-featured
    .mohar-terms__trigger {
        padding-left: 10px;
        padding-right: 10px;
    }

    .mohar-terms__section.is-featured
    .mohar-terms__panel-inner {
        padding-left: 46px;
        padding-right: 18px;
    }


    /* Contact CTA */

    .mohar-terms__contact {
        padding: 28px 24px;
        margin-top: 36px;
    }

    .mohar-terms__contact h2 {
        font-size: 24px;
    }
}


/* ==========================================================================
   12. ACCESSIBILITY — REDUCED MOTION
   ========================================================================== */

/*
   Respect visitors who prefer reduced motion.

   The accordion JavaScript should also respect this preference when
   animating panel height.
*/

@media (prefers-reduced-motion: reduce) {

    .mohar-terms * {
        transition: none !important;
    }
}
