/* The Indie Establishment
   Layered on top of Ghost's Source theme (assets/built/screen.css).
   Palette: orange #DC9841, black #000000, turquoise #3C7F72, white.
   Type: Barlow for headlines and body, Josefin Sans italic for the homepage statement line. */

:root {
    --ie-orange: #dc9841;
    --ie-black: #000000;
    --ie-teal: #3c7f72;
    --ie-panel-text: #e6e1d9;
    --ie-radius: 18px;
    --font-sans: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --ie-font-statement: "Josefin Sans", "Barlow", sans-serif;
    --color-darker-gray: #000000;
}

.ie-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid var(--ie-teal);
    outline-offset: 3px;
}

/* ---------- Navigation ---------- */

.gh-navigation,
.gh-navigation .gh-navigation-actions {
    background-color: var(--ie-orange);
    color: var(--ie-black);
}

.gh-navigation {
    font-size: 1.6rem;
    font-weight: 600;
}

.gh-navigation-logo {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gh-navigation .gh-button {
    background-color: var(--ie-black);
    color: #fff;
    border-radius: 999px;
    padding-inline: 22px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* Homepage: the menu sits on top of the hero image, on the left, clear of the microphone */
.home-template .gh-navigation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background-color: transparent;
}

.home-template .gh-navigation .gh-navigation-actions {
    background-color: transparent;
}

.home-template .gh-navigation-logo {
    display: none;
}

@media (min-width: 768px) {
    /* Keep the whole menu in the open orange on the left, never over the microphone */
    .home-template .gh-navigation.is-left-logo .gh-navigation-inner {
        grid-template-columns: 0 1fr auto;
        max-width: min(760px, 62vw);
        margin-left: 0;
    }

    .home-template .gh-navigation.is-left-logo .gh-navigation-menu {
        margin: 0;
    }
}

/* Open phone menu needs a solid background over the hero */
@media (max-width: 767px) {
    .home-template .is-open#gh-navigation {
        background-color: var(--ie-orange);
    }

    .home-template #gh-navigation .gh-navigation-brand {
        grid-template-columns: 1fr auto auto;
    }
}

/* ---------- Homepage hero ---------- */

.ie-hero {
    position: relative;
    background-color: var(--ie-orange);
}

.ie-hero-image {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------- Statement line ---------- */

.ie-statement {
    padding-top: clamp(56px, 7vw, 96px);
    padding-bottom: clamp(48px, 6vw, 88px);
}

.ie-statement-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    text-align: center;
}

.ie-statement-text {
    max-width: 960px;
    font-family: var(--ie-font-statement);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(2.2rem, 1.5rem + 1.4vw, 3.2rem);
    line-height: 1.3;
    color: var(--ie-black);
}

.ie-social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.ie-social:empty {
    display: none;
}

.ie-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--ie-black);
    color: #fff;
}

.ie-social a:hover {
    background-color: var(--ie-teal);
    opacity: 1;
}

.ie-social svg {
    width: 20px;
    height: 20px;
}

/* ---------- Episode grid ---------- */

.ie-episodes {
    padding-bottom: clamp(72px, 8vw, 112px);
}

.ie-section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 32px;
}

.ie-section-title {
    font-size: 3.2rem;
    font-weight: 700;
    letter-spacing: -0.005em;
}

.ie-section-link {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--ie-black);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ie-grid,
.gh-container.is-grid .gh-feed.ie-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    row-gap: 40px;
    overflow: visible;
}

@media (max-width: 991px) {
    .ie-grid,
    .gh-container.is-grid .gh-feed.ie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .ie-grid,
    .gh-container.is-grid .gh-feed.ie-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Archive pages: use the full width and drop Source's divider lines */
.gh-container.is-grid:not(.has-sidebar) :is(.gh-container-title, .gh-main, .gh-more) {
    grid-column: 1 / -1;
}

.gh-container.is-grid .ie-card::before,
.gh-container.is-grid .ie-card::after {
    content: none;
}

/* ---------- Episode card ---------- */

.ie-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ie-card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--ie-radius);
    overflow: hidden;
    background-color: #ececec;
}

.ie-card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ie-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background-color: var(--ie-black);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
}

.ie-badge svg {
    width: 12px;
    height: 12px;
}

.ie-card-panel {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 26px 26px 22px;
    border-radius: var(--ie-radius);
    background-color: var(--ie-black);
    color: #fff;
}

.ie-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--ie-panel-text);
}

.ie-pill {
    padding: 5px 12px;
    border-radius: 999px;
    background-color: var(--ie-teal);
    color: #fff;
    font-weight: 600;
}

.ie-runtime::before {
    content: "•";
    margin-right: 10px;
}

.ie-card-title {
    font-size: clamp(2.2rem, 1.6rem + 0.8vw, 2.7rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.005em;
    color: #fff;
}

.ie-card-title .gh-card-title-link {
    color: inherit;
}

.ie-card:hover .ie-card-title,
.ie-card:focus-within .ie-card-title {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

.ie-card-excerpt {
    display: -webkit-box;
    overflow: hidden;
    font-size: 1.55rem;
    line-height: 1.5;
    color: var(--ie-panel-text);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ie-guest {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgb(255 255 255 / 0.14);
    font-size: 1.45rem;
    font-weight: 600;
}

.ie-guest-photo {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #3a3a3a;
}

/* Section titles on archive and episode pages match the homepage "Episodes" heading */
.gh-container-title {
    margin-bottom: 32px;
    padding-bottom: 0;
    border-bottom: none;
    font-size: 3.2rem;
    font-weight: 700;
    letter-spacing: -0.005em;
    text-transform: none;
}

.post-template .gh-container {
    margin-bottom: clamp(72px, 8vw, 112px);
}

/* ---------- Episode page ---------- */

.gh-article-tag {
    display: inline-block;
    justify-self: start;
    width: fit-content;
    padding: 5px 12px;
    border-radius: 999px;
    background-color: var(--ie-teal);
    color: #fff;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.ie-article-meta .gh-article-meta-content {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ie-guest-photo.is-large {
    width: 48px;
    height: 48px;
    margin-right: 12px;
}

.gh-article-meta .ie-runtime::before {
    margin-right: 10px;
}

/* ---------- Contact page ---------- */

.ie-contact {
    padding-top: clamp(56px, 8vw, 96px);
    padding-bottom: clamp(72px, 9vw, 120px);
}

.ie-contact-inner {
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.ie-contact-title {
    font-size: clamp(3.6rem, 2.4rem + 2vw, 4.4rem);
    font-weight: 700;
}

.ie-contact-intro {
    font-size: 1.8rem;
}

.ie-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.ie-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ie-field label {
    font-size: 1.6rem;
    font-weight: 600;
}

.ie-field input,
.ie-field textarea {
    width: 100%;
    font-size: 1.7rem;
    border: 1.5px solid var(--ie-black);
    border-radius: 12px;
    background-color: #fff;
    color: var(--ie-black);
}

.ie-field input {
    min-height: 48px;
    padding: 0 16px;
}

.ie-field textarea {
    padding: 14px 16px;
    resize: vertical;
}

.ie-form-submit {
    min-height: 48px;
    padding: 0 32px;
    border: none;
    border-radius: 999px;
    background-color: var(--ie-teal);
    color: #fff;
    font-size: 1.7rem;
    font-weight: 600;
    cursor: pointer;
}

.ie-form-submit:hover {
    background-color: #2f665b;
}

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

.gh-footer.ie-footer {
    margin-top: 0;
    padding-top: 40px;
    padding-bottom: 40px;
    background-color: var(--ie-black);
    color: #fff;
}

.ie-footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px 32px;
}

.ie-footer-wordmark {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
}

.ie-footer-menu .nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.ie-footer-menu a {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.ie-footer-menu a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ---------- About page ---------- */

.ie-page-band {
    padding-top: 40px;
    padding-bottom: 72px;
    background-color: var(--ie-orange);
    border-top: 1px solid rgb(0 0 0 / 0.12);
}

.ie-page-band-inner,
.ie-about-inner {
    max-width: 1100px;
}

.ie-page-title {
    font-size: clamp(4.4rem, 3rem + 3vw, 7.2rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--ie-black);
}

.ie-about {
    padding-top: clamp(48px, 6vw, 72px);
    padding-bottom: clamp(72px, 8vw, 96px);
}

.ie-about-inner {
    display: flex;
    flex-direction: column;
    gap: clamp(48px, 6vw, 80px);
}

.ie-about-copy {
    max-width: 820px;
}

.ie-about-copy > p {
    margin: 0 0 1em;
    font-size: clamp(2.1rem, 1.6rem + 0.8vw, 2.7rem);
    font-weight: 500;
    line-height: 1.5;
    color: var(--ie-black);
}

.ie-about-copy > p:last-child {
    margin-bottom: 0;
}

.ie-about-copy a {
    color: var(--ie-teal);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ie-subscribe-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: clamp(32px, 4vw, 48px) clamp(24px, 3.5vw, 40px);
    border-radius: var(--ie-radius);
    background-color: var(--ie-black);
    color: #fff;
}

.ie-subscribe-text {
    max-width: 620px;
    margin: 0;
    font-family: var(--ie-font-statement);
    font-style: italic;
    font-weight: 500;
    font-size: clamp(2.2rem, 1.6rem + 1vw, 2.8rem);
    line-height: 1.3;
}

.ie-subscribe-button {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 30px;
    border-radius: 999px;
    background-color: var(--ie-teal);
    color: #fff;
    font-size: 1.7rem;
    font-weight: 600;
}

.ie-subscribe-button:hover {
    background-color: #2f665b;
    opacity: 1;
}

/* Ghost signup card inside a page using the About template */
.ie-about-copy .kg-signup-card {
    margin-top: clamp(32px, 4vw, 48px);
    border-radius: var(--ie-radius);
    overflow: hidden;
}
