/* ==========================================================================
   TopTech School - Portal homepage
   Editorial-luxury minimalism. Warm monochrome, quiet motion, GPU-safe.
   Self-contained: this page does not load the theme's main.css.
   ========================================================================== */

:root {
    --bg: #f3f1ea;
    --bg-2: #faf8f3;
    --surface: #ffffff;
    --ink: #1a1b16;
    --ink-2: #34352d;
    --muted: #7c7b70;
    --line: rgba(26, 24, 18, 0.12);
    --line-soft: rgba(26, 24, 18, 0.07);

    --navy: #24406e;
    --academy-tint: #f4e9d3;
    --academy-ink: #855216;
    --academy-accent: #b4712a;
    --services-tint: #e5eef9;
    --services-ink: #235496;
    --services-accent: #2f5fa0;

    --radius-lg: 22px;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 7px;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);

    --shadow-soft: 0 2px 10px rgba(26, 26, 23, 0.04);
    --shadow-lift: 0 24px 50px -28px rgba(26, 26, 23, 0.28);

    --serif: 'Instrument Serif', 'Newsreader', Georgia, 'Times New Roman', serif;
    --sans: 'Hanken Grotesk', 'SF Pro Display', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', 'SF Mono', ui-monospace, 'Cascadia Code', monospace;

    --nav-h: 74px;
    --pad-x: clamp(18px, 4vw, 56px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body.ttp {
    margin: 0;
    background: var(--bg);
    color: var(--ink-2);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: -0.006em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

.ttp a { color: inherit; text-decoration: none; }
.ttp img { display: block; max-width: 100%; }
.ttp ul { list-style: none; margin: 0; padding: 0; }
.ttp button { font-family: inherit; }

/* Ambient depth: a single, fixed, ultra-low-opacity warm light spot. */
.tt-ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(52vw 52vw at 18% 8%, rgba(25, 42, 83, 0.05), transparent 60%),
        radial-gradient(46vw 46vw at 88% 96%, rgba(122, 90, 18, 0.045), transparent 62%);
}

.tt-shell { position: relative; z-index: 1; }

/* ---------- Typography helpers ---------- */
.tt-serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; }
.tt-kicker {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}

/* ==========================================================================
   Navigation - floating glass island (not glued edge-to-edge)
   ========================================================================== */
.tt-nav {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - clamp(20px, 4vw, 48px));
    max-width: 1240px;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: var(--nav-h);
    padding: 0 12px 0 22px;
    background: rgba(247, 246, 243, 0.72);
    backdrop-filter: saturate(150%) blur(16px);
    -webkit-backdrop-filter: saturate(150%) blur(16px);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.5s var(--ease), transform 0.5s var(--ease), background 0.5s var(--ease);
}
.tt-nav.is-scrolled {
    box-shadow: 0 18px 40px -30px rgba(26, 26, 23, 0.4);
    background: rgba(247, 246, 243, 0.86);
}

.tt-nav-logo { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.tt-nav-logo img { height: 30px; width: auto; }

.tt-nav-links { display: flex; align-items: center; gap: 4px; }
.tt-nav-link {
    position: relative;
    padding: 9px 14px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--ink-2);
    border-radius: var(--radius-xs);
    transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.tt-nav-link:hover { color: var(--ink); background: rgba(26, 26, 23, 0.045); }
.tt-nav-link .tt-ext { opacity: 0.5; margin-left: 3px; vertical-align: -1px; }

.tt-nav-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }

/* ---------- Buttons ---------- */
.tt-btn {
    --_bg: var(--ink);
    --_fg: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--_fg);
    background: var(--_bg);
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.4s var(--ease-spring), background 0.3s var(--ease), box-shadow 0.3s var(--ease), color 0.3s var(--ease);
}
.tt-btn:hover { background: #33332d; }
.tt-btn:active { transform: scale(0.975); }
.tt-btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.tt-btn .tt-arrow { transition: transform 0.4s var(--ease-spring); }
.tt-btn:hover .tt-arrow { transform: translate(2px, -2px); }

/* Buttons are <a> elements. This out-specifies the `.ttp a { color: inherit }`
   reset so the label color applies (white on the Register pill, ink on Login). */
.ttp a.tt-btn,
.ttp button.tt-btn { color: var(--_fg); }

.tt-btn--ghost {
    --_bg: transparent;
    --_fg: var(--ink);
    border-color: var(--line);
}
.tt-btn--ghost:hover { background: rgba(26, 26, 23, 0.045); }

.tt-btn--quiet {
    --_bg: transparent;
    --_fg: var(--ink);
    padding: 10px 14px;
}
.tt-btn--quiet:hover { background: rgba(26, 26, 23, 0.055); }

/* ---------- Mobile menu button ---------- */
.tt-burger {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    position: relative;
    flex: 0 0 auto;
}
.tt-burger span {
    position: absolute;
    left: 12px;
    right: 12px;
    height: 1.6px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.45s var(--ease-spring), opacity 0.3s var(--ease);
}
.tt-burger span:nth-child(1) { top: 16px; }
.tt-burger span:nth-child(2) { top: 22px; }
.tt-burger span:nth-child(3) { top: 28px; }
body.tt-menu-open .tt-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.tt-menu-open .tt-burger span:nth-child(2) { opacity: 0; }
body.tt-menu-open .tt-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Mobile drawer overlay ---------- */
.tt-drawer {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 96px var(--pad-x) 48px;
    background: rgba(247, 246, 243, 0.9);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s var(--ease), visibility 0.5s var(--ease);
}
body.tt-menu-open .tt-drawer { opacity: 1; visibility: visible; }
.tt-drawer-link {
    font-family: var(--serif);
    font-size: clamp(34px, 9vw, 56px);
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--ink);
    padding: 6px 0;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
    transition-delay: calc(var(--i, 0) * 55ms);
}
body.tt-menu-open .tt-drawer-link { opacity: 1; transform: none; }
.tt-drawer-sub { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ==========================================================================
   Hero
   ========================================================================== */
.tt-hero {
    min-height: 100dvh;
    padding: calc(var(--nav-h) + 40px) var(--pad-x) clamp(40px, 6vh, 72px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(26px, 4vh, 44px);
    max-width: 1300px;
    margin: 0 auto;
}

.tt-hero-head { max-width: 720px; }
.tt-hero-head .tt-kicker { display: inline-flex; align-items: center; gap: 9px; }
.tt-hero-head .tt-kicker::before {
    content: "";
    width: 20px;
    height: 1px;
    background: currentColor;
    opacity: 0.5;
}
.tt-hero-title {
    font-family: var(--serif);
    font-size: clamp(40px, 7vw, 76px);
    letter-spacing: -0.025em;
    line-height: 1;
    color: var(--ink);
    margin: 16px 0 0;
}
.tt-hero-title em { font-style: italic; color: var(--navy); }
.tt-hero-sub {
    margin: 18px 0 0;
    font-size: clamp(16px, 1.4vw, 18.5px);
    color: var(--muted);
    max-width: 54ch;
}

/* ---------- Split ---------- */
.tt-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(16px, 2vw, 26px);
}

/* Double-bezel panel (outer shell) rendered as a single clickable link */
.tt-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: min(60vh, 560px);
    padding: 8px;
    background: var(--bg-2);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    color: var(--ink-2);
    overflow: hidden;
    transition: transform 0.55s var(--ease-spring), box-shadow 0.55s var(--ease-spring), border-color 0.4s var(--ease);
    will-change: transform;
}
.tt-panel:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lift);
    border-color: var(--line);
}
.tt-panel:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

/* inner core */
.tt-panel-inner {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: clamp(22px, 2.6vw, 38px);
    background: var(--surface);
    border-radius: calc(var(--radius-lg) - 8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.tt-panel--academy .tt-panel-inner { background: #fdf8ee; }
.tt-panel--services .tt-panel-inner { background: #f5f9fe; }
.tt-panel--academy .tt-panel-index { color: var(--academy-accent); }
.tt-panel--services .tt-panel-index { color: var(--services-accent); }

.tt-panel-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.tt-panel-index { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; color: var(--muted); }
.tt-badge {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 500;
}
.tt-panel--academy .tt-badge { background: var(--academy-tint); color: var(--academy-ink); box-shadow: inset 0 0 0 1px rgba(180, 113, 42, 0.16); }
.tt-panel--services .tt-badge { background: var(--services-tint); color: var(--services-ink); box-shadow: inset 0 0 0 1px rgba(47, 95, 160, 0.16); }

.tt-panel-title {
    font-family: var(--serif);
    font-size: clamp(30px, 3.6vw, 46px);
    letter-spacing: -0.02em;
    line-height: 1.02;
    color: var(--ink);
    margin: 20px 0 0;
}
.tt-panel-desc {
    margin: 14px 0 0;
    font-size: 15.5px;
    color: var(--muted);
    max-width: 44ch;
}

/* ---------- Academy programs grid (many classes) ---------- */
.tt-media { margin-top: 24px; }
.tt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.tt-tile { display: flex; flex-direction: column; gap: 9px; }
.tt-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    border-radius: 11px;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    background: #efece4;
}
.tt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.96) contrast(1.02);
    transition: transform 0.7s var(--ease);
}
.tt-tile:hover .tt-thumb img { transform: scale(1.06); }
.tt-tile b {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.01em;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (max-width: 400px) { .tt-grid { grid-template-columns: 1fr; } }

/* ---------- Services preview (faux window chrome) ---------- */
.tt-preview {
    margin-top: auto;
    margin-top: 26px;
    border-radius: var(--radius);
    border: 1px solid var(--line-soft);
    background: var(--surface);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}
.tt-preview-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line-soft);
    background: #fbfbfa;
}
.tt-dots { display: flex; gap: 6px; }
.tt-dots span { width: 9px; height: 9px; border-radius: 50%; background: #dcdad3; }
.tt-preview-url {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--muted);
    padding: 4px 10px;
    background: #f2f1ec;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tt-service-list { padding: 6px 8px; }
.tt-service-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.25s var(--ease);
}
.tt-service-row + .tt-service-row { border-top: 1px solid var(--line-soft); }
.tt-panel:hover .tt-service-row:first-child { background: var(--services-tint); }
.tt-service-ico {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--services-tint);
    color: var(--services-ink);
}
.tt-service-ico svg { width: 17px; height: 17px; }
.tt-service-txt { display: flex; flex-direction: column; line-height: 1.3; }
.tt-service-txt b { font-size: 14.5px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.tt-service-txt span { font-size: 12.5px; color: var(--muted); }
.tt-service-row .tt-chev { margin-left: auto; color: var(--muted); opacity: 0.6; }

/* ---------- Panel CTA (button-in-button trailing icon) ---------- */
.tt-panel-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
    align-self: flex-start;
    padding: 11px 12px 11px 20px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    background: rgba(26, 26, 23, 0.04);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.tt-panel--academy:hover .tt-panel-cta { background: var(--academy-accent); color: #fff; border-color: transparent; }
.tt-panel--services:hover .tt-panel-cta { background: var(--services-accent); color: #fff; border-color: transparent; }
.tt-cta-ico {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    transition: transform 0.45s var(--ease-spring), background 0.3s var(--ease), color 0.3s var(--ease);
}
.tt-panel:hover .tt-cta-ico { transform: translate(3px, -3px); }
.tt-cta-ico svg { width: 15px; height: 15px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.tt-footer {
    position: relative;
    z-index: 1;
    margin-top: clamp(40px, 6vh, 80px);
    background: #16161a;
    color: #cbcbc4;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}
.tt-footer-in {
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(48px, 7vw, 84px) var(--pad-x) 32px;
}
.tt-foot-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
    gap: clamp(28px, 4vw, 56px);
}
.tt-foot-brand img { height: 34px; margin-bottom: 20px; }
.tt-foot-brand p { max-width: 34ch; color: #97968f; font-size: 14.5px; margin: 0 0 22px; }
.tt-social { display: flex; gap: 10px; }
.tt-social a {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbcbc4;
    transition: background 0.3s var(--ease), transform 0.3s var(--ease-spring), color 0.3s var(--ease);
}
.tt-social a:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); color: #fff; }
.tt-social svg { width: 16px; height: 16px; }

.tt-foot-title {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #75746d;
    margin: 6px 0 18px;
    font-weight: 500;
}
.tt-foot-links li { margin-bottom: 11px; }
.tt-foot-links a { color: #b6b5ad; font-size: 14.5px; transition: color 0.25s var(--ease); }
.tt-foot-links a:hover { color: #fff; }
.tt-foot-contact { font-size: 14.5px; line-height: 1.7; color: #b6b5ad; font-style: normal; }
.tt-foot-contact a:hover { color: #fff; }
.tt-foot-contact strong { color: #e9e8e2; font-weight: 600; }

.tt-foot-bottom {
    max-width: 1240px;
    margin: 0 auto;
    padding: 22px var(--pad-x);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #75746d;
}
.tt-foot-bottom a { color: #97968f; }
.tt-foot-bottom a:hover { color: #cbcbc4; }

/* ==========================================================================
   Reveal motion (JS-gated so content is visible without JS)
   ========================================================================== */
.js .tt-reveal {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
    transition: opacity 0.85s var(--ease), transform 0.85s var(--ease), filter 0.85s var(--ease);
    transition-delay: calc(var(--i, 0) * 90ms);
}
.js .tt-reveal.is-in { opacity: 1; transform: none; filter: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
    .tt-split { grid-template-columns: 1fr; }
    .tt-panel { min-height: auto; }
}

@media (max-width: 860px) {
    .tt-nav-links { display: none; }
    .tt-nav-actions .tt-actions-desktop { display: none; }
    .tt-burger { display: block; }
    .tt-nav { padding: 0 10px 0 18px; }
}

@media (min-width: 861px) {
    .tt-drawer { display: none; }
}

@media (max-width: 520px) {
    .tt-panel-inner { padding: 22px 18px; }
    .tt-hero { padding-top: calc(var(--nav-h) + 26px); }
    .tt-foot-grid { grid-template-columns: 1fr 1fr; }
    .tt-foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
    .tt-foot-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Accessibility - honor reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .ttp *, .ttp *::before, .ttp *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
    .js .tt-reveal { opacity: 1 !important; transform: none !important; filter: none !important; }
    .tt-slide-img { transform: none !important; }
}
