
/* Blue preloader tint */
body.blue-theme #preloader {
    background: var(--bg);
}

body.blue-theme .pre-char {
    color: var(--text);
}

body.blue-theme .pre-line {
    background: var(--accent);
}

body.blue-theme .pre-tagline {
    color: var(--text-muted);
}

/* Blue accent on numbers and labels */
body.blue-theme .label-num {
    color: var(--accent-2);
}

body.blue-theme .blink {
    color: var(--accent-2);
}

body.blue-theme .section-label {
    color: var(--text-muted);
}

/* Blue card fills */
body.blue-theme .approach-card::before {
    background: var(--accent);
}

/* Status bar */
body.blue-theme #status-bar {
    background: rgba(232, 240, 254, 0.8);
}

/* Inner Page Hero Banner */
.page-hero {
    height: 60vh;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 0 10% 8vh;
    position: relative;
    overflow: hidden;
    background: var(--bg-dark);
    color: var(--text-light);
    text-align: left;
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(10, 22, 40, 0.5), rgba(10, 22, 40, 0.9));
    z-index: 1;
}

.page-hero-img {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.page-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(50%) contrast(1.1);
}

.page-hero-img picture {
    width: 100%;
    height: 100%;
    display: block;
}

/* Raw Hero - No Zoom, No Filters, No Overlays */
.raw-hero .page-hero-img img {
    object-fit: cover;
    filter: none;
}

.raw-hero .page-hero-overlay {
    display: none;
}

/* Raw Image BW (B&W to Color on hover) */
.raw-img-bw {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.8s ease;
}

.raw-img-bw:hover {
    filter: grayscale(0%);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: left;
    mix-blend-mode: difference;
}

.page-hero .hero-eyebrow {
    font-family: var(--f-mono);
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    opacity: 0.6;
    margin-bottom: 1.5rem;
}

.page-hero h1 {
    font-family: var(--f-sans);
    font-size: clamp(3rem, 7vw, 7rem);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.03em;
}

.page-hero .color-invert {
    color: var(--bg);
}

.page-hero h1 em {
    font-family: var(--f-serif);
    font-style: italic;
    font-weight: 400;
}

/* Page Content Sections */
.page-section {
    padding: 12vh 10%;
    max-width: 1800px;
    margin: 0 auto;
    text-align: left;
}

/* Text Block */
.text-block {
    max-width: 100%;
    text-align: left;
}

.text-block h2 {
    font-family: var(--f-sans);
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 500;
    line-height: 1.1;
    margin-bottom: 2rem;
    text-align: left;
}

.text-block h2 em {
    font-family: var(--f-serif);
    font-style: italic;
    font-weight: 400;
}

.text-block p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    text-align: left;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3px;
    margin: 8vh 0;
}

.stat-card {
    background: var(--bg-card);
    padding: 40px 30px;
    text-align: center;
    transition: background 0.5s, color 0.5s;
}

.stat-card:hover {
    background: var(--accent);
    color: white;
}

.stat-num {
    font-family: var(--f-sans);
    font-size: 3.5rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.6;
}

.stat-card:hover .stat-label {
    opacity: 1;
}

/* Services Grid */
.services-grid {
    display: flex;
    overflow-x: auto;
    gap: 3px;
    padding-bottom: 20px;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.services-grid::-webkit-scrollbar {
    display: none;
}

.service-item {
    flex: 0 0 calc(25% - 3px);
    min-width: 380px;
    padding: 50px 40px;
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
    transition: color 0.5s;
    cursor: pointer;
}

/* Domains 3-Column Grid Override */
.services-grid.domains-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    gap: 3px;
}

.domains-grid .service-item {
    flex: none;
    min-width: 0;
}

@media (max-width: 1024px) {
    .services-grid.domains-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid.domains-grid {
        grid-template-columns: 1fr;
    }
}

.service-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 0;
}

.service-item:hover::before {
    transform: scaleY(1);
}

.service-item:hover {
    color: white;
}

.service-item>* {
    position: relative;
    z-index: 1;
}

.service-item .si-num {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--accent-2);
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    transition: color 0.4s;
}

.service-item:hover .si-num {
    color: rgba(255, 255, 255, 0.5);
}

.service-item h3 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.service-item p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    transition: color 0.4s;
}

.service-item:hover p {
    color: rgba(255, 255, 255, 0.8);
}

/* Portfolio Marquee */
.portfolio-marquee-wrap {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}

.portfolio-marquee {
    display: inline-flex;
    gap: 3px;
    animation: marquee-slide 40s linear infinite;
    padding-bottom: 20px;
}

.portfolio-marquee:hover {
    animation-play-state: paused;
}

.portfolio-card-new {
    flex-shrink: 0;
    width: 400px;
    padding: 50px 40px;
    background: var(--bg-card);
    transition: color 0.5s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    white-space: normal;
}

.portfolio-card-new::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 0;
}

.portfolio-card-new:hover::before {
    transform: scaleY(1);
}

.portfolio-card-new:hover {
    color: white;
}

.portfolio-card-new>* {
    position: relative;
    z-index: 1;
}

/* Client Logo — top right corner */
.client-logo {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    object-fit: contain;
    border-radius: 8px;
    opacity: 0.7;
    transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
    filter: brightness(1.2);
    z-index: 2;
    /* Needs to be above the hover fill */
}

.portfolio-card-new:hover .client-logo {
    opacity: 1;
    transform: scale(1.1);
}

a.portfolio-card-new {
    display: block;
    text-decoration: none;
}

.pc-num {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    color: var(--accent-2);
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    transition: color 0.4s;
    display: block;
}

.portfolio-card-new:hover .pc-num {
    color: rgba(255, 255, 255, 0.5);
}

.portfolio-card-new h3 {
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 1rem;
    line-height: 1.2;
    padding-right: 65px; /* Protect against client-logo overlap */
}

.portfolio-card-new p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-muted);
    transition: color 0.4s;
}

.portfolio-card-new:hover p {
    color: rgba(255, 255, 255, 0.8);
}

@keyframes marquee-slide {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 1.5px));
    }
}

/* Portfolio Static Grid (for portfolio.html) */
.portfolio-text-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    width: 100%;
}

.portfolio-text-grid .portfolio-card-new {
    width: 100%;
    flex-shrink: unset;
    text-decoration: none;
    display: block;
}

@media (max-width: 1024px) {
    .portfolio-text-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-text-grid {
        grid-template-columns: 1fr;
    }
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--bg-card);
    overflow: hidden;
    transition: transform 0.5s;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-8px);
}

.blog-card-img {
    height: 250px;
    overflow: hidden;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s;
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.08);
}

.blog-card-body {
    padding: 30px;
}

.blog-card-date {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--accent-2);
    margin-bottom: 1rem;
}

.blog-card-body h3 {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.blog-card-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10vw;
    align-items: start;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-family: var(--f-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-group input,
.form-group textarea {
    font-family: var(--f-sans);
    font-size: 1rem;
    padding: 15px 20px;
    border: 1px solid rgba(0, 71, 153, 0.15);
    background: var(--bg-card);
    color: var(--text);
    outline: none;
    transition: border-color 0.3s;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-2);
}

.form-submit {
    font-family: var(--f-mono);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 18px 40px;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.4s;
    align-self: flex-start;
}

.form-submit:hover {
    background: var(--accent-2);
}

.contact-info {
    margin-top: 2vh;
}

.contact-info h3 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.contact-info h3 em {
    font-family: var(--f-serif);
    font-style: italic;
    font-weight: 400;
}

.ci-item {
    margin-bottom: 2rem;
}

.ci-item span {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.ci-item p,
.ci-item a {
    font-size: 1.2rem;
}

/* Responsive inner pages */
@media (max-width: 1024px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .rnd-ongoing-grid, .methodology-steps, .founders-grid, .feature-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-card {
        height: 35vh;
    }

    .portfolio-card-new {
        width: 300px;
        min-height: 250px;
        padding: 20px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .hero-eyebrow {
        font-size: 0.65rem;
    }
}

/* ═══════════════════════════════════════
   HOMEPAGE BLUE OVERRIDES
   ═══════════════════════════════════════ */

/* Homepage blue theme overrides for marquee/origin sections */
body.blue-theme #marquee-section {
    border-color: rgba(13, 27, 42, 0.1);
}

body.blue-theme .dot {
    color: var(--accent-2);
}

body.blue-theme .marquee-content {
    color: var(--text-muted);
}

/* Origin section on homepage with blue theme */
body.blue-theme #origin {
    background: var(--bg);
}

body.blue-theme .origin-text p {
    color: var(--text-muted);
}

/* Origin Story Link */
.origin-link {
    display: inline-block;
    margin-top: 3rem;
    font-family: var(--f-mono);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--accent-2);
    border-bottom: 1px solid var(--accent-2);
    padding-bottom: 4px;
    transition: color 0.3s, border-color 0.3s;
}

.origin-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* ═══════════════════════════════════════
   DARK SECTION (Ongoing R&D)
   ═══════════════════════════════════════ */
.dark-section {
    background: var(--bg-dark);
    color: var(--text-light);
}

.rnd-ongoing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    margin-top: 5vh;
}

.rnd-ongoing-card {
    background: rgba(232, 240, 254, 0.04);
    border: 1px solid rgba(232, 240, 254, 0.06);
    padding: 40px 30px;
    transition: background 0.5s, border-color 0.5s, transform 0.5s;
    cursor: pointer;
    position: relative;
}

.rnd-ongoing-card:hover {
    background: rgba(1, 142, 239, 0.08);
    border-color: rgba(1, 142, 239, 0.25);
    transform: translateY(-5px);
}

.rnd-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.rnd-ongoing-card h3 {
    font-family: var(--f-sans);
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.rnd-ongoing-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(232, 240, 254, 0.55);
    margin-bottom: 1.5rem;
}

.rnd-status {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: #22C55E;
}

/* R&D Logo — top right corner */
.rnd-logo {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
    opacity: 0.7;
    transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
    filter: brightness(1.2);
}

.rnd-ongoing-card:hover .rnd-logo {
    opacity: 1;
    transform: scale(1.1);
}

/* R&D Link cards — anchor tag styled as block */
a.rnd-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ═══════════════════════════════════════
   R&D PAGE — METHODOLOGY STEPS
   ═══════════════════════════════════════ */
.methodology-section {
    padding: 12vh 10%;
}

.methodology-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-top: 5vh;
    position: relative;
}

.methodology-step {
    padding: 50px 35px;
    position: relative;
    border-right: 1px solid rgba(0, 71, 153, 0.1);
    transition: background 0.5s;
}

.methodology-step:last-child {
    border-right: none;
}

.methodology-step:hover {
    background: var(--bg-card);
}

.ms-num {
    font-family: var(--f-mono);
    font-size: 4rem;
    font-weight: 700;
    color: rgba(0, 71, 153, 0.08);
    line-height: 1;
    margin-bottom: 1.5rem;
}

.methodology-step:hover .ms-num {
    color: rgba(1, 142, 239, 0.15);
}

.ms-title {
    font-family: var(--f-sans);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text);
}

.ms-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-muted);
}

/* Arrow between steps */
.methodology-step::after {
    content: '→';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--accent-2);
    z-index: 2;
}

.methodology-step:last-child::after {
    content: none;
}

/* ═══════════════════════════════════════
   ORIGIN PAGE — TORN PAPER EFFECT
   ═══════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=Special+Elite&display=swap');

.paper-section {
    padding: 10vh 10%;
    display: flex;
    justify-content: center;
}

.paper-wrap {
    position: relative;
    max-width: 900px;
    width: 100%;
    overflow: visible;
}

.paper {
    background: #F5F0E1;
    background-image:
        repeating-linear-gradient(0deg,
            transparent,
            transparent 31px,
            rgba(139, 90, 43, 0.08) 31px,
            rgba(139, 90, 43, 0.08) 32px);
    padding: 60px 70px;
    position: relative;
    overflow: visible;
    box-shadow:
        0 2px 15px rgba(139, 90, 43, 0.15),
        inset 0 0 80px rgba(139, 90, 43, 0.06);
    transform: rotate(-0.5deg);
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.paper:hover {
    transform: rotate(0deg) scale(1.01);
}

/* Paper aging textures */
.paper::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(139, 90, 43, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 90, 43, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(100, 60, 20, 0.03) 0%, transparent 80%);
    pointer-events: none;
    z-index: 1;
}

/* ── Realistic Torn Paper Corner ── */

/* The torn corner is a triangular area with jagged irregular edges
   that reveals the background behind the paper, as if someone ripped
   the corner off. Each paper gets a different corner torn. */

/* Torn corner — TOP RIGHT */
.paper.torn-tr {
    clip-path: polygon(0% 0%,
            /* top edge up to near top-right corner */
            72% 0%,
            /* jagged tear line going diagonally from top-right area to right edge */
            74% 2%, 76% 1%, 77% 3.5%, 78.5% 2%, 80% 4%,
            81% 3%, 82.5% 5.5%, 83% 4%, 84.5% 6%,
            85.5% 5%, 86% 7.5%, 87.5% 6.5%, 88% 8%,
            89% 7%, 89.5% 9.5%, 90.5% 8.5%, 91% 10.5%,
            91.5% 9.5%, 92.5% 12%, 93% 11%, 93.5% 13%,
            94% 12%, 95% 14.5%, 95.5% 13.5%, 96% 15.5%,
            96.5% 15%, 97% 17%, 97.5% 16%, 98% 18.5%,
            98.5% 18%, 99% 20%, 99.5% 19.5%, 100% 22%,
            /* down the right edge */
            100% 100%,
            0% 100%);
}

/* After pseudo-element for the torn corner shadow/depth */
.paper.torn-tr::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg,
            transparent 48%,
            rgba(139, 90, 43, 0.06) 49%,
            rgba(139, 90, 43, 0.12) 50%,
            transparent 55%);
    pointer-events: none;
    z-index: 2;
}

/* Torn corner — BOTTOM RIGHT */
.paper.torn-br {
    clip-path: polygon(0% 0%,
            100% 0%,
            /* right edge down to near bottom-right */
            100% 78%,
            /* jagged tear going diagonally from right edge to bottom */
            99.5% 79%, 99% 80.5%, 98.5% 80%, 98% 81.5%,
            97.5% 81%, 97% 83%, 96.5% 82%, 96% 84%,
            95.5% 83.5%, 95% 85.5%, 94.5% 85%, 94% 86.5%,
            93.5% 86%, 93% 87.5%, 92.5% 87%, 92% 88.5%,
            91.5% 88%, 91% 89.5%, 90.5% 89%, 90% 90.5%,
            89.5% 90%, 89% 91.5%, 88.5% 91%, 88% 92%,
            87.5% 91.5%, 87% 93%, 86.5% 92.5%, 86% 94%,
            85% 93.5%, 84% 95%, 83% 94.5%, 82% 96%,
            81% 95.5%, 80% 97%, 79% 96.5%, 78% 98%,
            77% 97.5%, 75% 99%, 74% 98.5%, 72% 100%,
            /* bottom edge */
            0% 100%);
}

.paper.torn-br::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 220px;
    height: 180px;
    background: linear-gradient(-135deg,
            transparent 48%,
            rgba(139, 90, 43, 0.06) 49%,
            rgba(139, 90, 43, 0.12) 50%,
            transparent 55%);
    pointer-events: none;
    z-index: 2;
}

/* Guard padding to prevent mobile text from entering the deep bottom-right tear */
@media (max-width: 768px) {
    .paper.torn-br {
        padding-bottom: 200px;
    }
}

/* Torn corner — BOTTOM LEFT */
.paper.torn-bl {
    clip-path: polygon(0% 0%,
            100% 0%,
            100% 100%,
            /* bottom edge from right to just near the corner */
            8% 100%,
            /* tiny jagged tear — just the very corner */
            7.5% 99.5%, 7% 99.8%, 6.5% 99%, 6% 99.5%,
            5.5% 98.8%, 5% 99.2%, 4.5% 98.5%, 4% 99%,
            3.5% 98.2%, 3% 98.8%, 2.5% 98%, 2% 98.5%,
            1.5% 97.5%, 1% 98%, 0.5% 97.2%, 0% 97.5%,
            /* up the left edge */
            0% 0%);
}

.paper.torn-bl::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: -2px;
    width: 80px;
    height: 30px;
    background: linear-gradient(-45deg,
            transparent 48%,
            rgba(139, 90, 43, 0.06) 49%,
            rgba(139, 90, 43, 0.12) 50%,
            transparent 55%);
    pointer-events: none;
    z-index: 2;
}

/* Hide the legacy classes */
.paper-tear,
.paper-tear-bottom,
.paper-tear-top,
.paper-tear-right,
.paper-fold {
    display: none;
}

/* Paper typography — 60s/70s feel */
.paper-title {
    font-family: 'IM Fell English', serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: #3D2B1F;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.paper-title em {
    font-family: 'IM Fell English', serif;
    font-style: italic;
}

.paper-body {
    font-family: 'Special Elite', cursive;
    font-size: 1.05rem;
    line-height: 2;
    color: #5C4033;
    margin-bottom: 1.5rem;
}

.paper-body:last-of-type {
    margin-bottom: 0;
}

/* ── Notice Board Pins: 2 top, 1 bottom ── */
.pin {
    position: absolute;
    width: 20px;
    height: 20px;
    z-index: 15;
    pointer-events: none;
}

/* Pin head */
.pin::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle at 7px 6px, #d4c4a8, #8b7355 45%, #5a4a32 100%);
    box-shadow:
        1px 3px 6px rgba(0, 0, 0, 0.45),
        inset 0 -2px 3px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* Pin specular highlight */
.pin::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 5px;
    width: 6px;
    height: 5px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    transform: rotate(-20deg);
}

/* Pin positions: 2 top (tl + tr), 1 bottom (bm) */
.pin-tl {
    top: 15px;
    left: 20px;
}

.pin-tr {
    top: 15px;
    right: 20px;
}

.pin-bm {
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
}

/* When a corner is torn, shift pin away from the torn area */
.paper.torn-tr .pin-tr {
    right: 35%;
}

.paper.torn-br .pin-bm {
    left: 30%;
}

.paper.torn-bl .pin-bm {
    left: 70%;
}

/* Signature Style */
.signature-font {
    font-family: 'Instrument Serif', serif !important;
    font-style: italic !important;
    font-size: 2rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #2b1d12 !important;
}

/* Paper date stamp */
.paper-date {
    font-family: 'Special Elite', cursive;
    font-size: 0.85rem;
    color: rgba(92, 64, 51, 0.5);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(139, 90, 43, 0.2);
}

/* Coffee stain ring */
.paper-stain {
    position: absolute;
    bottom: 40px;
    right: 50px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid rgba(139, 90, 43, 0.08);
    opacity: 0.5;
}

/* ═══════════════════════════════════════
   FOUNDERS SECTION — Side-by-side photos
   ═══════════════════════════════════════ */
.founders-section {
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: nowrap;
}

/* Founder photo containers */
.founder-photo {
    flex-shrink: 0;
    align-self: center;
}

/* The polaroid-style photo card */
.founder-photo-card {
    position: relative;
    background: #F8F4EB;
    padding: 12px 12px 45px 12px;
    width: 300px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.15),
        0 1px 4px rgba(0, 0, 0, 0.1),
        inset 0 0 30px rgba(139, 90, 43, 0.04);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.founder-photo-card:hover {
    transform: rotate(0deg) scale(1.03) !important;
}

/* Photo image */
.founder-photo-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    filter: saturate(0.85) contrast(1.05);
    transition: filter 0.4s ease;
}

.founder-photo-card:hover img {
    filter: saturate(1) contrast(1);
}

/* Vintage photo overlay (grain + age) */
.founder-photo-card::before {
    content: '';
    /* adjust overlay to cover the image area dynamically */
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 45px;
    background:
        linear-gradient(180deg,
            rgba(139, 90, 43, 0.06) 0%,
            transparent 30%,
            transparent 70%,
            rgba(139, 90, 43, 0.08) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Paper texture on the polaroid border */
.founder-photo-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 90%, rgba(139, 90, 43, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 10%, rgba(139, 90, 43, 0.04) 0%, transparent 40%);
    pointer-events: none;
    z-index: 1;
}

/* Founder name — handwritten signature style */
.founder-name {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 1.5rem !important;
    color: #3D2B1F;
    z-index: 3;
}

/* Pin on the photo card — centered at top */
.founder-pin {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
    .founders-section {
        gap: 25px;
    }

    .founder-photo-card {
        width: 250px;
    }
}

@media (max-width: 1024px) {
    .founders-section {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 30px;
    }

    .founders-section .paper-wrap {
        order: 0;
        width: 100%;
    }

    .founders-section .founder-left {
        order: 1;
    }

    .founders-section .founder-right {
        order: 1;
    }

    .founder-photo-card {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .paper {
        padding: 40px 30px;
        transform: rotate(0);
    }

    .pin::before {
        width: 16px;
        height: 16px;
    }

    .pin {
        width: 16px;
        height: 16px;
    }

    .founders-section {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .founders-section .founder-photo {
        order: -1;
    }

    .founders-section .founder-right {
        order: 1;
    }

    .founder-photo-card {
        width: 200px;
    }

    .founders-section {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .founders-section .paper-wrap {
        order: 1;
        width: 100%;
    }

    .founders-section .founder-left {
        order: 0;
    }

    .founders-section .founder-right {
        order: 0;
    }
}

/* ═══════════════════════════════════════
   PAGE TRANSITION OVERLAY
   Smooth blue → cream color morph
   ═══════════════════════════════════════ */
#page-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    /* Start as the homepage blue, will animate to cream */
    background: #E8F0FE;
}

#page-transition-overlay.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: all;
}

/* ═══════════════════════════════════════
   CAREERS PAGE — No Openings Card
   ═══════════════════════════════════════ */
.no-openings-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 60px 50px;
    text-align: left;
    margin-top: 3rem;
}

.no-openings-icon {
    color: var(--accent);
    margin-bottom: 2rem;
    opacity: 0.6;
}

.no-openings-card h3 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: var(--text);
    margin-bottom: 1rem;
    text-align: left;
}

.no-openings-card p {
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.7;
    color: var(--text-muted);
    margin: 0;
    text-align: left;
}

.no-openings-sub {
    margin-top: 1.5rem !important;
    opacity: 0.7;
}

.no-openings-sub a {
    color: var(--accent);
    text-decoration: underline;
    transition: color 0.3s;
}

.no-openings-sub a:hover {
    color: var(--accent-2);
}

/* ═══════════════════════════════════════
   UPDATES PAGE — Timeline
   ═══════════════════════════════════════ */
.updates-timeline {
    max-width: 900px;
    margin: 4rem auto 0;
    position: relative;
}

/* Vertical line */
.updates-timeline::before {
    content: '';
    position: absolute;
    left: 80px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(180deg,
            transparent 0%,
            rgba(255, 255, 255, 0.15) 10%,
            rgba(255, 255, 255, 0.15) 90%,
            transparent 100%);
}

.update-item {
    display: flex;
    gap: 40px;
    padding: 30px 0;
    position: relative;
}

.update-item+.update-item {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Date column */
.update-date {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    position: relative;
}

.update-date::after {
    content: '';
    position: absolute;
    right: -21px;
    top: 50%;
    transform: translateY(-50%);
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent, #6C8EBF);
    border: 2px solid var(--bg-dark, #0a0a0a);
    z-index: 2;
}

.update-month {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    color: var(--accent, #6C8EBF);
    font-weight: 700;
}

.update-year {
    display: block;
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    margin-top: 2px;
}

/* Content column */
.update-content {
    flex: 1;
    padding-left: 20px;
}

.update-tag {
    display: inline-block;
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: rgba(108, 142, 191, 0.15);
    color: var(--accent, #6C8EBF);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.update-content h3 {
    font-family: 'Instrument Serif', serif;
    font-size: clamp(1.3rem, 2vw, 1.6rem);
    color: var(--text-light, #fff);
    margin-bottom: 0.75rem;
}

.update-content p {
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    line-height: 1.7;
    color: var(--text-muted, rgba(255, 255, 255, 0.6));
}

.update-link {
    display: inline-block;
    margin-top: 1rem;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--accent, #6C8EBF);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.update-link:hover {
    color: #fff;
    transform: translateX(4px);
}

/* Social pills row */
.social-links-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.social-pill {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--text-light, #fff);
    padding: 12px 28px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.social-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent, #6C8EBF);
    color: var(--accent, #6C8EBF);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .updates-timeline::before {
        left: 20px;
    }

    .update-date {
        width: 40px;
    }

    .update-date::after {
        right: -21px;
    }

    .update-item {
        gap: 20px;
    }

    .update-content {
        padding-left: 10px;
    }

    .no-openings-card {
        padding: 40px 25px;
    }
}

