/* ==========================================================================
   TRAC course pages

   A selling page, not an instrument. The chart reader is dense and neutral
   because a practitioner reads it for an hour; this is read for ninety
   seconds by someone deciding whether to spend fifteen thousand rupees.
   So: more air, larger type, one clear action per screen.

   Same palette, so the two halves of the product feel like one thing.
   ========================================================================== */

.tc {
    --ink:      #000000;
    --ink-2:    #141414;
    --ink-3:    #333B47;
    --paper:    #FFFFFF;
    --panel:    #FFFFFF;
    --rule:     #D3D9E2;
    --rule-2:   #E8EBF0;
    --brass:    #7E5416;
    --brass-lt: #C89B4E;
    --deep:     #C2410C;
    --deep-2:   #EF6C00;
    --flag:     #93323C;
    --radius:   4px;

    color: var(--ink-2);
    background: var(--paper);
    font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.tc *, .tc *::before, .tc *::after { box-sizing: border-box; }

.tc-wrap { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }

/* --- Masthead ------------------------------------------------------------ */

.tc-bar {
    background: var(--deep);
    color: #fff;
    padding: 0.85rem 0;
}

.tc-bar .tc-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.tc-logo {
    font-family: "IBM Plex Serif", Georgia, serif;
    font-size: 1.12rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #fff;
    text-decoration: none;
}

.tc-logo span { color: var(--brass-lt); }

.tc-bar nav a {
    color: #C7CFDF;
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: 1.4rem;
}

.tc-bar nav a:hover { color: #fff; }

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

.tc-hero {
    position: relative;
    background: var(--deep-2);
    color: #fff;
    overflow: hidden;
}

.tc-hero-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    /* Full strength. Dimming the whole picture to keep text readable costs the
       artwork all of its contrast; darkening only the side the text sits on
       costs almost nothing, because that side is usually sky anyway. */
    opacity: 1;
}

.tc-hero-scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg,
            rgba(9, 16, 30, 0.92) 0%,
            rgba(9, 16, 30, 0.80) 34%,
            rgba(9, 16, 30, 0.35) 58%,
            rgba(9, 16, 30, 0.10) 78%,
            rgba(9, 16, 30, 0.00) 100%);
}

@media (max-width: 860px) {
    /* Narrow screens crop toward the middle, so the text can no longer sit in a
       clear zone. A full veil is the honest trade there. */
    .tc-hero-scrim {
        background: linear-gradient(180deg,
            rgba(9, 16, 30, 0.72) 0%,
            rgba(9, 16, 30, 0.86) 100%);
    }
}

/* With no image supplied the hero still has to look deliberate rather than
   unfinished, so it falls back to a drawn chart lattice. */
.tc-hero-fallback {
    position: absolute;
    inset: 0;
    opacity: 0.13;
    background-image:
        linear-gradient(45deg, transparent 49.5%, #fff 49.5%, #fff 50.5%, transparent 50.5%),
        linear-gradient(-45deg, transparent 49.5%, #fff 49.5%, #fff 50.5%, transparent 50.5%);
    background-size: 150px 150px;
}

.tc-hero-inner {
    position: relative;
    /* Min-height rather than padding alone: a banner image needs room to read as
       an image. Below that height the artwork is cropped to a strip and stops
       doing the job it was commissioned for. */
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Without this, every child stretches to the full column width - which is how
       a button becomes a 760px gold bar. */
    align-items: flex-start;
    padding: 5rem 0;
    max-width: 760px;
}

@media (max-width: 860px) {
    .tc-hero-inner { min-height: 420px; padding: 3.5rem 0; }
}

@media (max-width: 560px) {
    .tc-hero-inner { min-height: 340px; padding: 2.8rem 0; }
}

.tc-hero h1 {
    text-shadow: 0 2px 18px rgba(6, 11, 22, 0.55);
    font-family: "IBM Plex Serif", Georgia, serif;
    font-size: clamp(2rem, 5vw, 3.1rem);
    line-height: 1.15;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    color: #fff;
}

.tc-hero p {
    text-shadow: 0 1px 12px rgba(6, 11, 22, 0.5);
    font-size: clamp(1rem, 2.2vw, 1.18rem);
    color: #E3E8F1;
    margin: 0 0 1.6rem;
    max-width: 60ch;
}

.tc-eyebrow {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--brass-lt);
    margin-bottom: 0.9rem;
}

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

.tc-btn {
    display: inline-block;
    padding: 0.85rem 1.9rem;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
}

.tc-btn-gold {
    background: linear-gradient(180deg, #E0B865 0%, #C89B4E 100%);
    color: #9A3412;
    border-color: #B98F44;
    box-shadow: 0 2px 10px rgba(6, 11, 22, 0.28);
}

.tc-btn-gold:hover {
    background: linear-gradient(180deg, #EBC377 0%, #D2A657 100%);
    box-shadow: 0 4px 16px rgba(6, 11, 22, 0.34);
}

.tc-btn-dark { background: var(--deep); color: #fff; border-color: var(--deep); }
.tc-btn-dark:hover { background: #0A1425; }

.tc-btn-ghost { background: transparent; color: #fff; border-color: #46587C; }
.tc-btn-ghost:hover { background: #1D2B48; }

.tc-btn-lg { padding: 1rem 2.4rem; font-size: 1.06rem; }

.tc-btn { transition: background .15s ease, box-shadow .15s ease, transform .15s ease; }
.tc-btn:active { transform: translateY(1px); }
.tc-btn:focus-visible { outline: 3px solid #EBC377; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
    .tc-btn { transition: none; }
    .tc-btn:active { transform: none; }
}

/* The sticky panel's button should fill its column - that one is meant to be wide. */
.tc-buy .tc-btn { width: 100%; text-align: center; }

/* --- Sections ------------------------------------------------------------ */

.tc-section { padding: 3.4rem 0; }
.tc-section.alt { background: #F7F8FA; border-top: 1px solid var(--rule-2); border-bottom: 1px solid var(--rule-2); }

.tc-section h2 {
    font-family: "IBM Plex Serif", Georgia, serif;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 500;
    color: var(--ink);
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

.tc-section .tc-sub {
    font-size: 1rem;
    color: var(--ink-3);
    margin: 0 0 2rem;
    max-width: 64ch;
}

/* --- Course grid --------------------------------------------------------- */

.tc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.4rem;
}

.tc-card {
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

a.tc-card:hover {
    border-color: var(--deep-2);
    box-shadow: 0 6px 18px rgba(16, 27, 49, 0.11);
    transform: translateY(-2px);
}

.tc-card { transition: box-shadow .16s ease, transform .16s ease, border-color .16s ease; }

@media (prefers-reduced-motion: reduce) {
    .tc-card { transition: none; }
    a.tc-card:hover { transform: none; }
}

.tc-card.soon { opacity: 0.82; }

.tc-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    background: #E9ECF2;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Lettered tile for courses with no picture yet. */
.tc-thumb .tc-initials {
    font-family: "IBM Plex Serif", Georgia, serif;
    font-size: 2.6rem;
    font-weight: 500;
    color: #8792A6;
    letter-spacing: 0.04em;
}

.tc-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    background: var(--deep);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.28rem 0.6rem;
    border-radius: 2px;
}

.tc-badge.gold { background: var(--brass-lt); color: #17223A; }

.tc-card-body { padding: 0.95rem 1.05rem 1.15rem; display: flex; flex-direction: column; flex: 1 1 auto; }

.tc-card-body h3 {
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 0.35rem;
    line-height: 1.32;
}

.tc-card-body p {
    font-size: 0.87rem;
    color: var(--ink-3);
    margin: 0 0 0.9rem;
    flex: 1 1 auto;
}

.tc-price { display: flex; align-items: baseline; gap: 0.55rem; flex-wrap: wrap; }

.tc-price .now { font-size: 1.22rem; font-weight: 700; color: var(--ink); }
.tc-price .was { font-size: 0.9rem; color: var(--ink-3); text-decoration: line-through; }
.tc-price .off { font-size: 0.78rem; font-weight: 600; color: var(--flag); }

.tc-soonlabel { font-size: 0.82rem; font-weight: 600; color: var(--ink-3); }

/* --- Detail page --------------------------------------------------------- */

.tc-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .tc-cols { grid-template-columns: 1fr; }
}

.tc-buy {
    background: var(--panel);
    border: 1px solid var(--rule);
    border-top: 4px solid var(--brass-lt);
    border-radius: var(--radius);
    padding: 1.5rem;
    position: sticky;
    top: 1.5rem;
}

@media (max-width: 900px) { .tc-buy { position: static; } }

.tc-buy .tc-price { margin-bottom: 0.3rem; }
.tc-buy .tc-price .now { font-size: 2rem; }

.tc-buy .save { font-size: 0.88rem; color: var(--ink-3); margin: 0 0 1.2rem; }

.tc-buy .tc-btn { width: 100%; text-align: center; }

.tc-buy ul { list-style: none; margin: 1.3rem 0 0; padding: 0; }

.tc-buy li {
    position: relative;
    padding: 0.45rem 0 0.45rem 1.6rem;
    font-size: 0.9rem;
    color: var(--ink-2);
    border-bottom: 1px solid var(--rule-2);
}

.tc-buy li:last-child { border-bottom: 0; }

.tc-buy li::before {
    content: "";
    position: absolute;
    left: 0.15rem;
    top: 0.95rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brass);
}

.tc-secure { margin: 1rem 0 0; font-size: 0.78rem; color: var(--ink-3); text-align: center; }

.tc-prose p { font-size: 1.03rem; color: var(--ink-2); margin: 0 0 1.1rem; max-width: 66ch; }

.tc-chips { display: flex; flex-wrap: wrap; gap: 0.65rem; margin: 0.4rem 0 0; padding: 0; list-style: none; }

.tc-chips li {
    background: #fff;
    border: 1px solid var(--rule);
    border-left: 3px solid var(--brass);
    border-radius: var(--radius);
    padding: 0.65rem 1.05rem;
    font-size: 0.96rem;
    font-weight: 500;
    color: var(--ink);
}

.tc-list { list-style: none; margin: 0; padding: 0; max-width: 70ch; }

.tc-list li {
    position: relative;
    padding: 0.6rem 0 0.6rem 1.7rem;
    border-bottom: 1px solid var(--rule-2);
    font-size: 0.98rem;
    color: var(--ink-2);
}

.tc-list li:last-child { border-bottom: 0; }

.tc-list li::before {
    content: "";
    position: absolute;
    left: 0.2rem;
    top: 1.08rem;
    width: 9px;
    height: 9px;
    border: 1.5px solid var(--brass);
    transform: rotate(45deg);
}

.tc-back {
    display: block;
    width: fit-content;
    margin-bottom: 1.4rem;
    color: #C7CFDF;
    text-decoration: none;
    font-size: 0.9rem;
}
.tc-back:hover { color: #fff; }

/* --- Footer -------------------------------------------------------------- */

.tc-foot {
    background: var(--deep);
    color: #A9B3C6;
    padding: 2.2rem 0;
    font-size: 0.88rem;
}

.tc-foot a { color: var(--brass-lt); text-decoration: none; }
.tc-foot a:hover { text-decoration: underline; }
