:root {
    /* Color Palette - Premium Light Mode (Apple Style) */
    --bg-color: #fcfcfc;
    --bg-secondary: #f5f5f7;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-dark: #000000;
    --accent-gradient: linear-gradient(135deg, #a855f7 0%, #3b82f6 100%);
    --card-bg: rgba(210, 210, 218, 0.65); /* Enemmän harmaata huurrelasiin */
    --card-border: rgba(255, 255, 255, 0.9); /* Vahvempi ja kirkkaampi reuna */
    --card-hover-bg: rgba(195, 195, 205, 0.75);
    
    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Spacing & Layout */
    --max-width: 1200px;
    --padding-x: 2rem;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Helpers */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-dark { color: var(--text-dark); }
.text-large { font-size: 1.25rem; line-height: 1.7; font-weight: 400; }

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.75rem var(--padding-x);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(210, 210, 218, 0.35); /* Lower opacity for the header specifically */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.06);
}

.logo img {
    /* filter: invert(1); Removed so the new logo displays in its natural colors */
}

.language-toggle {
    display: flex;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    border: 1px solid rgba(0,0,0,0.05);
}

.language-toggle a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.language-toggle a.active {
    color: var(--text-primary);
}

.language-toggle a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8rem var(--padding-x) 4rem;
    position: relative;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 2;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 7rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    color: var(--text-dark);
}

.hero-title span { display: block; }

.text-accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-bottom: 0.15em; /* Prevents descenders like 'g' from being clipped */
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 3rem;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 100px;
    transition: all var(--transition-smooth);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: #000000;
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background: transparent;
    color: #000000;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.btn-outline:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-outline-light {
    background: rgba(40, 40, 40, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-outline-light:hover {
    background: rgba(60, 60, 60, 0.95);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.hero-visual {
    width: 100%;
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    mix-blend-mode: multiply; /* Dark mode had screen, light mode needs multiply */
}

/* Sections */
.content-section {
    padding: 8rem var(--padding-x);
    position: relative;
}

/* Compact toggle sections */
#how-we-work,
#what-makes-us-different,
#end-to-end {
    padding: 2.5rem var(--padding-x);
}

.alternate-bg {
    background-color: var(--bg-secondary);
    border-top: 1px solid rgba(0,0,0,0.03);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.section-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 3.5rem;
    letter-spacing: -0.02em;
    color: var(--text-dark);
}

/* Grids */
.split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* Cards */
.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-smooth);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.bento-card:hover {
    background: var(--card-hover-bg);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.card-large {
    padding: 4rem;
}

.flex-row {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.card-text {
    flex: 1;
}

.card-image-box {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.graphic-img {
    max-width: 100%;
    border-radius: var(--radius-md);
    mix-blend-mode: multiply;
}

.card-content h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.card-content h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.card-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.feature-list strong {
    display: block;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-list ul {
    list-style: none;
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #a855f7;
}

.callout-card {
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
}

.callout-card p {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 500;
    max-width: 800px;
    margin: 0 auto;
}

.center-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.06), inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}
.center-card p { color: var(--text-secondary); }

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    transition: all var(--transition-smooth);
}
.glass-card:hover {
    background: var(--card-hover-bg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* Steps */
.step-card {
    padding: 2rem;
    border-left: 2px solid rgba(0,0,0,0.05);
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    color: rgba(0,0,0,0.25);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.step-card p {
    color: var(--text-secondary);
}

/* Team Profiles */
.team-profiles {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
}

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Footer */
.main-footer {
    padding: 6rem var(--padding-x) 2rem;
}

/* Base Logo Style */
.logo-img {
    height: 52px;
    transition: all var(--transition-smooth);
}

/* Responsive */
@media (max-width: 1024px) {
    .split-grid { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .step-grid { grid-template-columns: 1fr 1fr; }
    .flex-row { flex-direction: column; }
}

/* ============================================
   WHAT WE DO — Full bleed cinematic section
   ============================================ */
.wwd-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.wwd-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    transform: scale(1.04);
    transition: transform 0.1s linear;
}

.wwd-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(5, 5, 5, 0.0) 0%,
        rgba(5, 5, 5, 0.0) 25%,
        rgba(5, 5, 5, 0.6) 55%,
        rgba(5, 5, 5, 0.92) 75%,
        rgba(5, 5, 5, 0.98) 100%
    );
    z-index: 1;
}
.wwd-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 4rem var(--padding-x) 6rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.wwd-card {
    max-width: 720px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    text-align: center;

    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.wwd-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.wwd-headline {
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #ffffff;
    margin-bottom: 2rem;
}

.wwd-paragraph {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.8;
    font-weight: 400;
    max-width: 640px;
    margin: 0 auto;
}
}

.wwd-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.wwd-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 3rem;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.wwd-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.wwd-item h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.wwd-item h4 {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    margin-bottom: 1rem;
}

.wwd-item p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.95rem;
    line-height: 1.7;
}

.wwd-callout {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    font-style: italic;
    text-align: center;
}

/* ============================================
   SERVICES — Three column cards
   ============================================ */
.services-section {
    background: #0a0a0a;
    padding: 7rem var(--padding-x);
}

.services-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 3rem;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.service-card:hover::before {
    opacity: 1;
}

.service-tag {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 1.5rem;
}

.service-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}

.service-subtitle {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.service-intro {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.service-list {
    margin-top: 1.5rem;
}

.service-list-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 1rem;
}

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

.service-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    line-height: 1.6;
}

.service-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-note {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    font-style: italic;
    line-height: 1.7;
}

@media (max-width: 1024px) {
    .services-container { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .wwd-grid { grid-template-columns: 1fr; }
    .wwd-card { padding: 2rem; }
}

@media (max-width: 768px) {
    .logo-img { height: 60px; }
    .hero-title { font-size: clamp(2.5rem, 10vw, 3.5rem); }
    .grid-4 { grid-template-columns: 1fr; }
    .step-grid { grid-template-columns: 1fr; }
    .team-profiles { flex-direction: column; align-items: center; gap: 1.5rem; }
    .team-profiles .profile { width: 100% !important; max-width: 300px; }
    .bento-card { padding: 2rem; }
    .card-large { padding: 2rem; }
    .content-section { padding: 4rem var(--padding-x); }
    .main-footer { padding: 4rem var(--padding-x) 2rem; }
}

@media (max-width: 480px) {
    .logo-img { height: 48px; }
    .bento-card { padding: 1.5rem; }
    .card-large { padding: 1.5rem; }
    .main-header { padding: 1rem var(--padding-x); }
    .split-grid, .grid-4, .step-grid { gap: 1rem; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; }
}

@media (orientation: landscape) and (max-height: 600px) {
    .hero { min-height: 120vh; padding-top: 6rem; }
    .logo-img { height: 50px; }
    .main-header { padding: 0.5rem var(--padding-x); }
}

/* ============================================
   SEE THE WORK
   ============================================ */
.work-section {
    background: #050505;
    padding: 7rem var(--padding-x);
}

.work-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.work-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 3rem;
    text-align: center;
}

.work-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    margin-bottom: 4rem;
}

.work-player iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.work-text {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: center;
}

.work-text p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    line-height: 1.8;
}

.work-text p:first-child {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.2rem;
    font-weight: 500;
}

/* ============================================
   GOAT ENGINE SECTION
   ============================================ */
.engine-section {
    background: #080808;
    padding: 7rem var(--padding-x);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.engine-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.engine-header {
    max-width: 720px;
    margin: 0 auto 4rem auto;
    text-align: center;
}

.engine-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.engine-tagline {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: rgba(255, 255, 255, 0.25);
    margin-bottom: 2rem;
}

.engine-intro {
    color: rgba(255, 255, 255, 0.55);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

/* Project links */
.engine-projects {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
}

.project-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none;
    transition: all var(--transition-smooth);
    cursor: pointer;
}

.project-card:hover {
    padding-left: 1rem;
}

.project-card:hover .project-arrow {
    color: #a855f7;
    transform: translate(4px, -4px);
}

.project-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.18);
    letter-spacing: 0.15em;
    min-width: 2.5rem;
}

.project-info {
    flex: 1;
}

.project-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.3rem;
    transition: color var(--transition-fast);
}

.project-card:hover .project-name {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-desc {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    line-height: 1.6;
}

.project-arrow {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.2);
    transition: all var(--transition-smooth);
}

/* Hush-hush */
.engine-hushhush {
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-lg);
    padding: 3.5rem;
    background: rgba(255, 255, 255, 0.02);
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    }

.hushhush-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.2rem;
}

.hushhush-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.btn-engine-contact {
    display: inline-block;
    padding: 0.85rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all var(--transition-smooth);
    text-decoration: none;
}

.btn-engine-contact:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .engine-hushhush { padding: 2rem; }
}

/* ============================================
   GOAT IP & ORIGINALS
   ============================================ */
.ip-section {
    background: #050505;
    padding: 7rem var(--padding-x);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.ip-container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.ip-header {
    text-align: center;
    margin-bottom: 4rem;
}

.ip-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.ip-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 5rem;
    width: 100%;
}

.ip-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    cursor: pointer;
}

.ip-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.ip-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.ip-card:hover .ip-thumb {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.ip-card:hover .ip-thumb::after {
    opacity: 0.06;
}

.ip-thumb--cta {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ip-cta-icon {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.15);
    font-weight: 300;
    line-height: 1;
    transition: color var(--transition-smooth);
}

.ip-card--cta:hover .ip-cta-icon {
    color: rgba(168, 85, 247, 0.6);
}

.ip-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    transition: color var(--transition-smooth);
}

.ip-card:hover .ip-label {
    color: rgba(255, 255, 255, 0.85);
}

.ip-text {
    max-width: 720px;
    margin: 4rem auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.ip-text p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .ip-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .ip-grid { grid-template-columns: 1fr; }
}

/* ============================================
   HOW WE WORK — toggle
   ============================================ */
.howwework-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    user-select: none;
    transition: opacity var(--transition-fast);
    line-height: 1;
}

.howwework-toggle .text-accent {
    display: inline;
    vertical-align: middle;
    position: relative;
    top: 3px;
}

.howwework-toggle:hover {
    opacity: 0.7;
}

.toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.15);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-secondary);
    transition: all var(--transition-smooth);
    flex-shrink: 0;
}

.howwework-toggle.open .toggle-icon {
    transform: rotate(45deg);
    border-color: #a855f7;
    color: #a855f7;
}

.howwework-steps {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    transition: max-height 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.5s ease,
                margin-top 0.5s ease;
}

.howwework-steps.open {
    max-height: 1000px;
    opacity: 1;
    margin-top: 3.5rem;
}

/* ============================================
   GOAT MANIFESTO
   ============================================ */
.manifesto-section {
    background: #050505;
    padding: 7rem var(--padding-x);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.manifesto-container {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.manifesto-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 1rem;
}

.manifesto-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 3.5rem;
}

.manifesto-player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
}

.manifesto-player iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   GET IN TOUCH
   ============================================ */
.contact-section {
    background: #080808;
    padding: 7rem var(--padding-x);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.contact-container {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.contact-intro {
    margin-bottom: 5rem;
}

.contact-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.contact-lead {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.contact-sub {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
}

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

.contact-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: all var(--transition-smooth);
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.contact-avatar {
    width: 240px;
    height: 240px;
    border-radius: 16px;
    object-fit: cover;
    object-position: center top;
    margin-bottom: 1rem;
    border: none;
    box-shadow: none;
    filter: none;
}

.contact-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
}

.contact-role {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.contact-email {
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: opacity var(--transition-fast);
}

.contact-email:hover {
    opacity: 0.75;
}

.contact-phone {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .contact-grid { grid-template-columns: 1fr; }
}

/* Footer uudistus */
.main-footer {
    padding: 3rem var(--padding-x) 2rem;
    background: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-logo-img {
    height: 120px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-content {
    color: rgba(255, 255, 255, 0.4);
}

.footer-details h4 {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.footer-details p,
.footer-details a {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
}

.copyright {
    color: rgba(255, 255, 255, 0.2) !important;
}

/* ============================================
   END TO END CARD
   ============================================ */
.e2e-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 3rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 3.5rem;
    margin-top: 3.5rem;
}

.e2e-divider {
    width: 1px;
    height: 100%;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.08);
}

.e2e-text {
    color: rgba(255, 255, 255, 0.55);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.e2e-cta {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.3);
    margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
    .e2e-card {
        grid-template-columns: 1fr;
    }
    .e2e-divider {
        width: 100%;
        height: 1px;
        min-height: unset;
    }
}

/* E2E card — vaalea tausta versio */
.alternate-bg .e2e-card {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

.alternate-bg .e2e-text {
    color: var(--text-secondary);
}

.alternate-bg .e2e-cta {
    color: rgba(0, 0, 0, 0.4);
}

.alternate-bg .e2e-divider {
    background: rgba(0, 0, 0, 0.08);
}

.alternate-bg .btn-engine-contact {
    color: var(--text-dark);
    border-color: rgba(0, 0, 0, 0.15);
}

.alternate-bg .btn-engine-contact:hover {
    background: rgba(0, 0, 0, 0.05);
}

.services-header {
    text-align: center;
    margin-bottom: 3rem;
    grid-column: 1 / -1;
}

.services-title {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.btn-vault {
    display: inline-block;
    margin-top: 2.5rem;
    margin-bottom: 3rem;
    padding: 1rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-smooth);
}

.btn-vault:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* IP Section video */
.ip-video {
    position: relative;
    width: 70%;
    margin: 3rem auto;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ip-video iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.copyright p {
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   MOBILE OPTIMIZATION — max-width 768px
   ============================================ */
@media (max-width: 768px) {

    /* Hero */
    .hero {
        min-height: 60vh;
    }

    /* What we do */
    .wwd-card {
        padding: 2rem 1.5rem;
    }
    .wwd-headline {
        font-size: 2rem;
    }

    /* Services */
    .services-container {
        grid-template-columns: 1fr;
    }
    .services-section {
        padding: 4rem var(--padding-x);
    }

    /* See the work */
    .work-section {
        padding: 4rem var(--padding-x);
    }

    /* Goat Engine */
    .engine-container {
        padding: 0;
    }
    .engine-hushhush {
        padding: 2rem 1.5rem;
    }

    /* IP Grid */
    .ip-grid {
        grid-template-columns: 1fr 1fr;
    }
    .ip-video {
        width: 100%;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-avatar {
        width: 180px;
        height: 180px;
    }

    /* Toggle sections */
    .howwework-toggle {
        font-size: 1.5rem;
    }
    .step-grid {
        grid-template-columns: 1fr;
    }
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Manifesto */
    .manifesto-title {
        font-size: 2rem;
    }

    /* Footer */
    .main-footer {
        padding: 3rem 1.5rem 2rem;
    }
    .footer-logo-img {
        height: 80px;
    }
}

/* Footer text brightness fix */
.main-footer h4 {
    color: rgba(250, 248, 248, 0.9);
}

.main-footer p,
.main-footer a {
    color: rgba(255, 255, 255, 0.45);
}

.main-footer a:hover {
    color: rgba(255, 255, 255, 0.75);
}
