/* ================================================================
   OLIOMO CORPORATION — Official Stylesheet
   Classification: Unrestricted (External Distribution)
   Division of Applied Digital Curiosities
   ================================================================ */

/* ----------------------------------------------------------------
   DESIGN TOKENS
   ---------------------------------------------------------------- */
:root {
    --bg:           #f2ece0;   /* warm cream */
    --panel:        #e8e0d0;   /* slightly darker cream for panels */
    --panel-dark:   #d8ccb8;   /* darker cream for inactive tabs, placeholders */
    --text:         #1c1812;   /* near-black with warm cast */
    --accent:       #bb3311;   /* brick red */
    --accent-dark:  #8a2200;   /* dark red for hover states */
    --border:       #c4aa88;   /* warm tan border */
    --muted:        #7a6a58;   /* secondary / caption text */

    --font-head:    'Oswald', 'Arial Narrow', Arial, sans-serif;
    --font-body:    'Special Elite', 'Courier New', Courier, serif;
}

/* ----------------------------------------------------------------
   RESET & BASE
   ---------------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-dark);
    text-decoration: underline;
}

/* ----------------------------------------------------------------
   LAYOUT
   ---------------------------------------------------------------- */
.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 28px;
}

/* Flex column so footer sticks to bottom */
.home-page,
.app-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.home-page main,
.app-page main {
    flex: 1;
    /* Use padding-top/bottom only — padding shorthand would zero out the
       28px side padding inherited from .container, making main wider than
       the header's .container and misaligning them. */
    padding-top: 32px;
    padding-bottom: 48px;
}

/* ----------------------------------------------------------------
   HEADER
   ---------------------------------------------------------------- */
.site-header {
    padding: 24px 0 0;
    background: var(--bg);
}

/* Logo on the left, slogan centred in the remaining space to the right */
.header-top {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-bottom: 14px;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
    line-height: 0;
    flex-shrink: 0; /* logo never squishes */
}

.logo {
    height: 60px;
    width: auto;
    display: block;
}

/* Double-rule below header — atomic-age certificate style.
   Width matches the container, same as the intro-text box below. */
.header-rule {
    height: 7px;
    border-top: 3px solid var(--accent);
    border-bottom: 1px solid var(--accent);
}

/* ----------------------------------------------------------------
   SECTION DIVIDERS
   ---------------------------------------------------------------- */
.section-rule {
    margin: 16px 0;
    border: none;
    border-top: 1px solid var(--border);
}

/* ----------------------------------------------------------------
   FOOTER
   ---------------------------------------------------------------- */
.site-footer {
    padding: 12px 0 22px;
    font-family: var(--font-head);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: auto;
}

.footer-rule {
    border-top: 1px solid var(--border);
    margin-bottom: 12px;
}

.site-footer a {
    color: var(--muted);
}

.site-footer a:hover {
    color: var(--accent);
    text-decoration: none;
}

/* ================================================================
   HOME PAGE
   ================================================================ */

/* ----------------------------------------------------------------
   HERO / INTRO SECTION
   ---------------------------------------------------------------- */
.hero {
    margin-top: 28px;
    margin-bottom: 32px;
}

/* Slogan lives in .header-top, to the right of the logo.
   flex: 1 makes it fill all remaining horizontal space;
   text-align: center keeps the text optically centred in that space. */
.slogan {
    flex: 1;
    text-align: center;
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 1.55;
}

.intro-text {
    background: var(--panel);
    border-left: 4px solid var(--accent);
    padding: 18px 22px;
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text);
}

/* ----------------------------------------------------------------
   APP CATALOG LIST
   ---------------------------------------------------------------- */
.section-title {
    font-family: var(--font-head);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--text);
    margin-bottom: 4px;
}

.app-catalog {
    margin-bottom: 36px;
}

.app-list {
    list-style: none;
    border: 1px solid var(--border);
    border-bottom: none;
}

.app-item {
    border-bottom: 1px solid var(--border);
}

.app-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.12s ease;
}

.app-link:hover {
    background: var(--panel);
    color: var(--text);
    text-decoration: none;
}

.app-link:hover .app-name {
    color: var(--accent);
}

.app-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.app-icon-placeholder {
    width: 40px;
    height: 40px;
    background: var(--panel-dark);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.app-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-name {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text);
    transition: color 0.12s ease;
}

.app-tagline {
    font-size: 0.85rem;
    color: var(--muted);
}

.app-arrow {
    font-size: 0.75rem;
    color: var(--accent);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.12s ease;
}

.app-link:hover .app-arrow {
    opacity: 1;
}

/* ----------------------------------------------------------------
   DISCLAIMER (home page footer text)
   ---------------------------------------------------------------- */
.disclaimer-text {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.65;
    font-style: italic;
}

/* ================================================================
   APP INDEX PAGES
   ================================================================ */

.app-title {
    font-family: var(--font-head);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--text);
    margin-bottom: 0;
}

/* Two-column layout: screenshot | tabs
   align-items: start lets the screenshot sit at its natural height.
   JS (tabs.js) measures that height and sets .app-tabs-wrapper to match. */
.app-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
    align-items: start;
}

/* ----------------------------------------------------------------
   SCREENSHOT
   ---------------------------------------------------------------- */
.app-screenshot {
    width: 100%;
    display: block;
    border: 3px solid var(--text);
    box-shadow: 6px 6px 0 var(--accent);
}

.screenshot-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--panel-dark);
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-head);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
    padding: 20px;
    line-height: 1.5;
}

/* ----------------------------------------------------------------
   TABS
   ---------------------------------------------------------------- */
/* Height is set by JS to exactly match the screenshot.
   Flex column: buttons are fixed height, panels fill the rest. */
.app-tabs-wrapper {
    display: flex;
    flex-direction: column;
    overflow: hidden; /* clip if JS hasn't run yet */
}

.tab-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    flex-shrink: 0; /* buttons never shrink; remaining space goes to .tab-panels */
    /* Tab bar sits on top of the panel border */
    position: relative;
    z-index: 1;
}

.tab-btn {
    font-family: var(--font-head);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 7px 14px;
    background: var(--panel-dark);
    border: 1px solid var(--border);
    border-bottom: none;
    cursor: pointer;
    color: var(--muted);
    transition: background 0.12s, color 0.12s;
    /* Overlap the top panel border by 1px */
    position: relative;
    bottom: -1px;
    margin-right: 3px;
    outline: none;
}

.tab-btn:hover {
    background: var(--panel);
    color: var(--text);
}

.tab-btn.active {
    background: var(--bg);
    color: var(--accent);
    border-color: var(--accent);
    border-bottom-color: var(--bg); /* hides the bottom border inside the panel */
    font-weight: 700;
}

/* Fills remaining height inside .app-tabs-wrapper after the tab buttons.
   min-height: 0 is critical — without it, flex children won't shrink below
   their content size, so overflow-y: auto on the active panel never kicks in. */
.tab-panels {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-top: 2px solid var(--accent);
}

.tab-panel {
    display: none;
    padding: 20px 22px;
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--text);
}

/* Active panel fills the panel area; scrolls when content exceeds the height
   set by the screenshot. min-height: 0 allows flex shrinking. */
.tab-panel.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

/* ----------------------------------------------------------------
   LAUNCH AREA
   ---------------------------------------------------------------- */
.launch-area {
    text-align: center;
}

.launch-btn {
    display: inline-block;
    background: var(--accent);
    color: var(--bg);
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.28em;
    padding: 16px 52px;
    border: 3px solid var(--accent-dark);
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}

.launch-btn:hover {
    background: var(--accent-dark);
    border-color: var(--text);
    color: var(--bg);
    text-decoration: none;
    box-shadow: 4px 4px 0 var(--text);
}

.launch-disclaimer {
    margin-top: 14px;
    font-size: 0.76rem;
    color: var(--muted);
    font-style: italic;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 620px) {
    .app-content {
        grid-template-columns: 1fr;
    }

    .app-title {
        font-size: 1.9rem;
    }

    .launch-btn {
        font-size: 1.05rem;
        padding: 14px 32px;
        letter-spacing: 0.16em;
    }

    .section-title {
        font-size: 1.25rem;
    }
}
