/* ==========================================================================
   Custom Properties
   ========================================================================== */

:root {
    /* Colors */
    --bg-primary: #FAF8F5;
    --bg-secondary: #F3F0EB;
    --text-primary: #1A1A1A;
    --text-secondary: #6B6560;
    --text-tertiary: #9B9590;
    --border-light: #E5E0DB;
    --border-medium: #C8C3BD;

    /* Fonts */
    --font-serif: 'Lora', 'Georgia', serif;
    --font-sans: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;

    /* Transitions */
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* ==========================================================================
   Typography
   ========================================================================== */

h1 {
    font-family: var(--font-serif);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 1.5rem;
}

h2 {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-top: 0;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 1rem;
}

p {
    font-size: 12px;
    font-weight: 300;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.7;
}

/* Links — no bright blue */
a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-thickness: 0.5px;
    text-underline-offset: 3px;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--text-secondary);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */

.navigation-bar {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-primary);
}

.nav-email {
    font-family: var(--font-serif);
    font-size: 12px;
    font-weight: 400;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    gap: 32px;
}

.nav-menu li {
    margin-bottom: 0;
}

.nav-link {
    font-family: var(--font-serif);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-decoration: none;
    display: block;
    padding: 4px 0;
    text-transform: capitalize;
    transition: color var(--transition-base);
}

.nav-link:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.nav-link.active {
    color: var(--text-primary);
    text-decoration: none;
}

/* ==========================================================================
   Main Content
   ========================================================================== */

.main-content {
    flex: 1;
    padding: 0 24px 80px;
}

.content-frame {
    max-width: 100%;
}

.content-section {
    margin-top: 40px;
}

/* ==========================================================================
   Tabs
   ========================================================================== */

.content-tabs {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.tab-link {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 300;
    color: var(--text-secondary);
    padding: 6px 0;
    text-decoration: none;
    transition: color var(--transition-base);
}

.tab-link:hover {
    color: var(--text-primary);
}

.tab-link.active {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-thickness: 0.5px;
    text-underline-offset: 3px;
}

.tab-panel[hidden] {
    display: none;
}

/* ==========================================================================
   Service Lists
   ========================================================================== */

.service-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.service-list li {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.7;
}

.service-list li a {
    color: var(--text-primary);
}

.service-list li a:hover {
    color: var(--text-secondary);
}

/* ==========================================================================
   Menu Items
   ========================================================================== */

.menu-item {
    margin-bottom: 28px;
}

.dish-name {
    font-family: var(--font-serif);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.dish-name a {
    color: var(--text-primary);
    text-decoration: underline;
    text-decoration-thickness: 0.5px;
    text-underline-offset: 3px;
    transition: color var(--transition-base);
}

.dish-name a:hover {
    color: var(--text-secondary);
}

.dish-ingredients {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   Tables (Motion Resources & Page Content)
   ========================================================================== */

.motion-resources .last-update {
    color: var(--text-tertiary);
    font-size: 10px;
    margin-top: 8px;
}

.motion-resources table,
.page-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    border-radius: 4px;
    border: 0.5px solid var(--border-medium);
    overflow: hidden;
}

.motion-resources th,
.motion-resources td,
.page-content th,
.page-content td {
    border-right: 0.5px solid var(--border-light);
    border-bottom: 0.5px solid var(--border-light);
    padding: 12px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 300;
    transition: background-color var(--transition-base);
}

.motion-resources tr:hover td,
.page-content tr:hover td {
    background-color: var(--bg-secondary);
}

.motion-resources th:last-child,
.motion-resources td:last-child,
.page-content th:last-child,
.page-content td:last-child {
    border-right: none;
}

.motion-resources tr:last-child td,
.page-content tr:last-child td {
    border-bottom: none;
}

.motion-resources th:first-child,
.motion-resources td:first-child,
.page-content th:first-child,
.page-content td:first-child {
    width: 150px;
    white-space: nowrap;
}

.motion-resources th,
.page-content th {
    font-weight: 400;
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* ==========================================================================
   Work Experience
   ========================================================================== */

.role-experience {
    margin: 20px 0 25px 0;
}

.role-experience span {
    text-transform: uppercase;
}

.role-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    margin-bottom: 8px;
}

.role-row:last-child {
    margin-bottom: 0;
}

.role-row span {
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.role-title {
    width: 200px;
}

.role-company {
    width: 120px;
}

.role-location {
    width: 80px;
    text-align: right;
}

.location-note {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* ==========================================================================
   Section Divider
   ========================================================================== */

.section-divider {
    border: none;
    border-top: 0.5px solid var(--border-light);
    margin: 24px 0;
}

/* ==========================================================================
   Waitlist Form (002 page)
   ========================================================================== */

.waitlist-form {
    margin-top: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 400;
    font-size: 10px;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    max-width: 400px;
    padding: 12px 14px;
    border: 1px solid var(--border-medium);
    background-color: transparent;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 300;
    color: var(--text-primary);
    transition: border-color var(--transition-base);
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--text-primary);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.submit-button {
    padding: 12px 28px;
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 400;
    text-transform: uppercase;
    transition: background-color var(--transition-base), color var(--transition-base);
}

.submit-button:hover {
    background-color: var(--text-primary);
    color: var(--bg-primary);
}

.submit-button:disabled {
    border-color: var(--border-medium);
    color: var(--text-tertiary);
    cursor: not-allowed;
}

.submit-button:disabled:hover {
    background-color: transparent;
    color: var(--text-tertiary);
}

.success-message {
    display: none;
    margin-top: 16px;
    padding: 14px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    font-size: 12px;
}

.error-message {
    display: none;
    margin-top: 16px;
    padding: 14px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    color: var(--text-secondary);
    font-size: 12px;
}

/* ==========================================================================
   About Intro
   ========================================================================== */

/* Hero Section */
.hero-section {
    position: relative;
    margin-bottom: 60px;
}

.hero-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 50%;
    max-height: 90%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

#hero-bg-24-01 {
    left: 33%;
    top: 45%;
}

#hero-bg-26-01 {
    max-width: 40%;
    max-height: 72%;
    left: 70%;
}

.hero-bg.active {
    opacity: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 24px;
    position: relative;
    z-index: 1;
}

.hero-cell {
    padding: 20px;
    min-height: 120px;
}

a.hero-cell--project {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

a.hero-cell--project:hover {
    color: inherit;
}

.hero-project-number,
.hero-project-name,
.hero-project-type,
.hero-project-year {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 300;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.about-intro {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 24px;
    align-items: start;
    text-align: left;
}

.about-right {
    grid-column: 2;
}

.about-location {
    grid-column: 3;
    align-self: end;
    text-align: right;
}

.about-location p {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    font-optical-sizing: auto;
    color: var(--text-primary);
    margin: 0;
}

.about-studio-name {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    font-optical-sizing: auto;
    color: var(--text-primary);
    margin-bottom: 0;
}

.about-label {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 500;
    font-optical-sizing: auto;
    color: var(--text-primary);
    margin-bottom: 0;
}

.about-vision {
    font-family: var(--font-serif);
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.8;
    margin: 0;
}

/* ==========================================================================
   Page-specific Components
   ========================================================================== */

/* Hero image (002 page) */
.page-hero-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 24px;
}

/* App icon (overthere page) */
.app-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    border-radius: 18px;
}

/* Product page layout */
.product-page {
    max-width: 504px;
    margin: 0 auto;
}

.product-page h1 {
    font-size: 30px;
}

.product-page .content-section {
    margin-top: 56px;
}

/* Legal links */
.legal-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legal-links a {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* FAQ styling */
.faq-item {
    margin-top: 28px;
}

.faq-item:first-child {
    margin-top: 0;
}

.faq-question {
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.faq-answer {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Footer */
.site-footer {
    padding: 40px 24px;
}

.site-footer p {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 300;
    color: var(--text-primary);
    margin: 0;
}

/* Heading link (no underline, inherits color) */
.heading-link {
    color: inherit;
    text-decoration: none;
}

.heading-link:hover {
    color: var(--text-secondary);
}

/* Last update note */
.last-update-note {
    color: var(--text-secondary);
    margin-top: 40px;
}

/* List label (bold-ish inline label) */
.list-label {
    color: var(--text-primary);
}

/* Substack embed */
.substack-embed {
    padding-top: 48px;
}

/* ==========================================================================
   Project Grid
   ========================================================================== */

.project-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5rem 3rem;
    align-items: end;
    margin-top: 40px;
}

.project-card a {
    text-decoration: none;
    display: block;
}

.project-card-image {
    aspect-ratio: 3 / 4;
}

.project-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.project-card-number {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 300;
    color: var(--text-tertiary);
    margin: 8px 0 0;
}

.project-card-name {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.project-card-type {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 300;
    color: var(--text-primary);
    margin: 0;
}

/* ==========================================================================
   Responsive — Tablet (1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .project-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem 2rem;
    }
}

/* ==========================================================================
   Responsive — Mobile (768px)
   ========================================================================== */

@media (max-width: 768px) {
    .navigation-bar {
        padding: 32px 20px 24px;
    }

    .nav-menu {
        gap: 20px;
    }

    .main-content {
        padding: 0 20px 60px;
    }

    /* Hero carousel: stack project cells, show one at a time */
    .hero-section {
        position: relative;
        height: calc(100svh - 240px);
        margin-bottom: 40px;
        overflow: hidden;
    }

    .hero-grid {
        display: block;
        position: static;
    }

    /* Hide non-project cells */
    .hero-cell:not(.hero-cell--project) {
        display: none;
    }

    .hero-cell--project {
        position: absolute;
        bottom: 24px;
        left: 0;
        width: 100%;
        top: auto;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.6s ease, visibility 0.6s ease;
        padding: 0 20px;
        min-height: auto;
    }

    .hero-cell--project.active {
        opacity: 1;
        visibility: visible;
    }

    /* Hero images: absolutely centered in container */
    .hero-bg {
        position: absolute;
        top: 45%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: block;
        width: auto;
        max-width: 75%;
        max-height: 70%;
        object-fit: contain;
        opacity: 0;
        transition: opacity 0.6s ease;
        margin: 0;
        pointer-events: none;
        z-index: 0;
    }

    .hero-bg.active {
        opacity: 1;
    }

    /* Override individual image positioning */
    #hero-bg-24-01,
    #hero-bg-25-01,
    #hero-bg-26-01 {
        position: absolute;
        top: 45%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-width: 75%;
        max-height: 70%;
    }

    /* Center-align project text */
    .hero-project-number,
    .hero-project-name,
    .hero-project-type {
        text-align: center;
    }

    .about-intro {
        grid-template-columns: 1fr;
    }

    .about-right {
        grid-column: auto;
    }

    .about-location {
        grid-column: auto;
    }

    .site-footer {
        padding: 40px 20px;
    }

    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Product page responsive */
    .product-page {
        max-width: 100%;
    }

    .product-page h1 {
        font-size: 24px;
    }

    .product-page .content-section {
        margin-top: 40px;
    }

    .nav-email {
        display: none;
    }

    /* Table horizontal scroll */
    .motion-resources,
    .page-content {
        overflow-x: auto;
    }

    .motion-resources table,
    .page-content table {
        min-width: 400px;
    }
}
