/* ============================================================
   Trent.AI Reveal.js Theme
   Usage in frontmatter:
     talktheme: white
     talkcss:   ../trent.css          (from a topic subdirectory)
   For deployed slides use the full URL instead.
   ============================================================ */

/* -- Fonts ---------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');

/* -- Trent brand palette --------------------------------------------------
   Primary orange : #F5821F
   Dark navy      : #1A1A3E
   Peach light    : #FDE9D8
   Peach mid      : #FAE0C8
   Muted text     : #6A6A8A
   ------------------------------------------------------------------ */

/* -- Base slides ---------------------------------------------------------- */
.reveal {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 32px;
    color: #1A1A3E;
    background-color: #ffffff;
}

.reveal .slides {
    text-align: left !important;
}

.reveal .slides > section {
    text-align: left !important;
    /* Brand chrome is on the full-page .slide-background layer */
    background: transparent;
}

/*
 * Full-page colour + brand chrome live on .slide-background (outside the
 * scaled slide; see https://revealjs.com/backgrounds/). That layer does not
 * receive Reveal's scale transform, so sizes use --slide-scale (set from
 * Reveal.getScale() in slides-header.html).
 */
.reveal .slide-background {
    background-color: #ffffff !important;
    background-image:
        url('diagrams/logos/trent-blue.png') !important;
    background-repeat: no-repeat !important;
    background-position:
        left calc(1.5rem * var(--slide-scale, 1)) top calc(1.25rem * var(--slide-scale, 1)) !important;
    background-size:
        calc(160px * var(--slide-scale, 1)) auto !important;
}

/* Reveal white theme sets ul/ol to inline-block, which centres them when
   the parent is text-align:center. Force block so lists sit left. */
.reveal ol,
.reveal dl,
.reveal ul {
    display: block !important;
    text-align: left !important;
    margin: 0.2em 0 0.6em 0 !important;
}

/* -- Headings ------------------------------------------------------------- */
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4 {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.01em;
}

.reveal h2 {
    font-size: 1.4em;
    color: #F5821F;
    font-weight: 700;
    border-bottom: none;
    margin-bottom: 0.5em;
}

.reveal h1 {
    font-size: 2em;
    color: #1A1A3E;
}

.reveal h3 {
    font-size: 1.0em;
    color: #1A1A3E;
}

/* -- Standard title slide (no cover-image) -------------------------------- */
.reveal section#title-slide h1.title {
    font-size: 1.8em;
    font-weight: 800;
    color: #F5821F;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 0.3em;
}

.reveal section#title-slide p.subtitle {
    font-size: 0.9em;
    font-weight: 600;
    color: #1A1A3E;
}

.reveal section#title-slide p.author,
.reveal section#title-slide p.date,
.reveal section#title-slide p.venue {
    font-size: 0.75em;
    color: #6A6A8A;
}

/* -- Trent cover slide (two-column layout when cover-image is set) -------- */
.reveal section#title-slide.trent-cover {
    display: grid !important;
    grid-template-columns: 57% 43%;
    align-items: stretch;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    text-align: left;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    background: transparent;
}

/* Left panel: gradient background */
.trent-title-content {
    background: linear-gradient(150deg, #FDE9D8 0%, #FAE0C8 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem 2rem 2.5rem 2.5rem;
    position: relative;
    min-height: 100%;
}

/* Logo lives on .slide-background; hide the cover markup slot */
.trent-logo {
    display: none;
}

/* Title on cover slide */
.reveal section#title-slide.trent-cover h1.title {
    font-size: 2.1em;
    font-weight: 800;
    color: #F5821F;
    line-height: 1.18;
    text-align: left;
    text-shadow: none;
    margin: 2.5rem 0 0.6rem 0;
}

/* Subtitle on cover slide */
.reveal section#title-slide.trent-cover p.subtitle {
    font-size: 0.85em;
    font-weight: 600;
    color: #4A4A6A;
    text-align: left;
    margin: 0.2rem 0 0.5rem 0;
}

/* Date and venue on cover slide */
.reveal section#title-slide.trent-cover p.date,
.reveal section#title-slide.trent-cover p.venue {
    font-size: 0.7em;
    color: #6A6A8A;
    text-align: left;
    margin: 0.15rem 0;
}

/* Right panel: white, photo centred */
.trent-cover-photo {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.8rem;
}

/* Rounded photo card */
.trent-photo-card {
    width: 78%;
    border-radius: 1.1rem;
    overflow: hidden;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.14);
    margin-bottom: 0.9rem;
}

.trent-photo-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Speaker name and role below card */
.trent-speaker-name {
    font-size: 0.75em;
    font-weight: 700;
    color: #1A1A3E;
    text-align: center;
    margin: 0.2rem 0 0 0;
}

.trent-speaker-role {
    font-size: 0.62em;
    color: #6A6A8A;
    text-align: center;
    margin: 0.1rem 0;
}

/* -- Lists ---------------------------------------------------------------- */
.reveal ul,
.reveal ol {
    margin-left: 1em;
    line-height: 1.5;
}

.reveal li {
    margin-bottom: 0.35em;
}

/* -- Blockquotes ---------------------------------------------------------- */
.reveal blockquote {
    border-left: 4px solid #F5821F;
    background: #FEF3EC;
    color: #1A1A3E;
    padding: 0.5em 1em;
    font-style: italic;
    width: 90%;
    box-shadow: none;
    font-size: 0.9em;
    margin: 0.5em auto;
}

/* -- Inline code & code blocks -------------------------------------------- */
.reveal code {
    background: #f4f0eb;
    color: #c0392b;
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-size: 0.82em;
}

.reveal pre {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    border-radius: 6px;
}

.reveal pre code {
    background: #2b2b3b;
    color: #f8f8f2;
    font-size: 0.75em;
    padding: 0.8em 1em;
}

/* -- Links ---------------------------------------------------------------- */
.reveal a {
    color: #F5821F;
    text-decoration: none;
}

.reveal a:hover {
    color: #C8650F;
    text-decoration: underline;
}

/* -- Progress bar --------------------------------------------------------- */
.reveal .progress {
    background: rgba(245, 130, 31, 0.2);
    color: #F5821F;
}

.reveal .progress span {
    background: #F5821F;
    transition: width 0.8s cubic-bezier(0.26, 0.86, 0.44, 0.985);
}

/* -- Tables --------------------------------------------------------------- */
.reveal table {
    border-collapse: collapse;
    font-size: 0.8em;
}

.reveal table th {
    background: #F5821F;
    color: white;
    padding: 0.4em 0.8em;
    font-weight: 700;
}

.reveal table td {
    padding: 0.35em 0.8em;
    border-bottom: 1px solid #EEE;
}

.reveal table tr:nth-child(even) td {
    background: #FEF3EC;
}

/* -- Utility classes (inherited from existing talks conventions) ----------- */
.reveal .slides section.scrollable {
    overflow-y: auto !important;
    height: 100% !important;
    top: 0 !important;
    text-align: left;
}

.reveal p {
    text-align: left;
}

.reveal li {
    text-align: left;
}

/* Section dividers (\\section with data-state="trent-section").
   Reveal 3.x applies data-state classes to <html>, not .reveal. */
html.trent-section .reveal .slide-background.present {
    background-image: linear-gradient(135deg, #1A1A3E 0%, #2a3a5c 45%, #F5821F 100%) !important;
    background-color: transparent !important;
}

html.trent-section .reveal .slides section.present h2 {
    color: #ffffff !important;
}
