/* ============================================
   IMPORTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}

:root {
    /* Brand colors */
    --primary-color:    #C8531F;
    --primary-hover:    #A84218;
    --accent-color:     #C8A35A;

    /* Backgrounds */
    --bg-primary:       #FDF6E3;
    --bg-secondary:     #F5EDDA;
    --bg-card:          #F0E6D0;
    --bg-card-hover:    #EAD9C5;

    /* Text */
    --text-primary:     #2C1A10;
    --text-secondary:   #5C4535;
    --text-muted:       #9B8070;

    /* Borders & shadows */
    --border-color:     #DDD0BA;
    --border-light:     #EBE1CE;
    --shadow-sm:        0 2px 8px rgba(44, 26, 16, 0.06);
    --shadow-md:        0 6px 20px rgba(44, 26, 16, 0.10);
    --shadow-lg:        0 14px 40px rgba(44, 26, 16, 0.14);

    /* Type */
    --font-serif:       'Lora', Georgia, 'Times New Roman', serif;
    --font-sans:        'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --transition:       all 0.3s ease;
}

/* Night mode: the lighthouse beam against a deep harbor sky */
[data-theme="dark"] {
    --primary-color:    #E2754B;
    --primary-hover:    #F08F66;
    --accent-color:     #D9BC7A;

    --bg-primary:       #15131F;
    --bg-secondary:     #1C1A29;
    --bg-card:          #221F30;
    --bg-card-hover:    #2A2638;

    --text-primary:     #F0E9DC;
    --text-secondary:   #B7AEC2;
    --text-muted:       #7B7390;

    --border-color:     #322E45;
    --border-light:     #2A2638;
    --shadow-sm:        0 2px 8px rgba(0, 0, 0, 0.28);
    --shadow-md:        0 6px 20px rgba(0, 0, 0, 0.36);
    --shadow-lg:        0 14px 40px rgba(0, 0, 0, 0.46);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    line-height: 1.72;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Subtle grain texture */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.028;
    pointer-events: none;
    z-index: 9998;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
}

.content-wrapper {
    position: relative;
    z-index: 10;
}

/* ============================================
   TEMPORARILY HIDDEN SECTIONS
   Remove this rule to bring the Client Results
   section back.
   ============================================ */
.testimonials {
    display: none !important;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(253, 246, 227, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1003;
    transition: var(--transition);
}

.nav.scrolled {
    background: rgba(253, 246, 227, 0.97);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0.9rem 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 1.1rem;
    transition: opacity 0.2s ease;
    position: relative;
}

.nav-logo::before {
    content: '';
    position: absolute;
    left: 32px;
    top: -16px;
    right: -30px;
    bottom: -16px;
    background: linear-gradient(
        to right,
        rgba(200, 163, 90, 0.55) 0%,
        rgba(200, 163, 90, 0.14) 68%,
        transparent 100%
    );
    clip-path: polygon(0 41%, 100% 39%, 100% 96%, 0 51%);
    transform-origin: 0 41%;
    animation: lighthouse-sweep 3s ease-in-out infinite;
    pointer-events: none;
}

.nav-logo:hover {
    opacity: 0.75;
}

.nav-logo-icon {
    height: 32px;
    width: auto;
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.88rem;
    transition: color 0.2s ease;
    letter-spacing: 0.1px;
}

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

.nav-cta {
    background: var(--primary-color) !important;
    color: #fff !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.nav-cta:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 14px 9px;
    margin-right: -9px;
}

.nav-toggle span {
    width: 26px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: auto;
    display: flex;
    align-items: center;
    padding: 128px 0 80px;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-photo {
    position: relative;
    width: 100%;
    max-width: 420px;
    justify-self: end;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    aspect-ratio: 4 / 5;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 48% 30%;
    display: block;
}

.hero-photo figcaption {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    padding: 0.45rem 0.85rem;
    background: rgba(21, 19, 31, 0.75);
    backdrop-filter: blur(6px);
    color: #F0E9DC;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.hero-text {
    position: relative;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.3rem 0.9rem;
    background: rgba(200, 83, 31, 0.08);
    border: 1px solid rgba(200, 83, 31, 0.2);
    border-radius: 4px;
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 1.5rem;
    font-family: var(--font-sans);
}

.hero-label-builder {
    color: var(--primary-color);
}

.builder-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.8;
    flex-shrink: 0;
}

.hero-label-available {
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    background: rgba(52, 168, 83, 0.10);
    border: 1px solid rgba(52, 168, 83, 0.3);
    color: #2D7A47;
}

.hero-label-available:hover {
    background: rgba(52, 168, 83, 0.18);
    border-color: rgba(52, 168, 83, 0.5);
}

.availability-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #3CAF68;
    border-radius: 50%;
    margin-right: 7px;
    vertical-align: middle;
}

.hero-label-clickable {
    cursor: pointer;
    background: rgba(200, 83, 31, 0.10);
    border: 1px solid rgba(200, 83, 31, 0.3);
    color: var(--primary-color);
    font-size: 0.8rem;
    padding: 0.5rem 1.2rem;
    font-weight: 700;
    transition: var(--transition);
}

.hero-label-clickable:hover {
    background: rgba(200, 83, 31, 0.18);
    transform: translateY(-2px);
}

.hero-label-clickable::before,
.hero-label-clickable svg {
    animation: none;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.18;
    margin-bottom: 1.1rem;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.gradient-text {
    color: var(--primary-color);
    -webkit-text-fill-color: unset;
    background: none;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.78;
    font-weight: 400;
}

.hero-sub-line {
    display: block;
}

.hero-body {
    font-size: 0.93rem;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 2rem;
}

.hero-proof {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.hero-proof-item {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.hero-proof-item strong {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.hero-proof-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hero-proof-divider {
    width: 1px;
    height: 28px;
    background: var(--border-color);
    flex-shrink: 0;
}

.hero-cta {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
}

.hero-cta-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-cta-note a {
    display: inline-block;
    padding: 0.75rem 0;
    color: var(--primary-color);
    font-weight: 600;
}

/* ============================================
   TERMINAL
   ============================================ */
/* ============================================
   AGENT FLOW CARD
   ============================================ */
.hero-agent-flow {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    font-family: var(--font-sans);
    overflow: hidden;
}

.af-header {
    padding: 1rem 1.25rem 0.85rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.af-header-icon {
    width: 15px;
    height: 15px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.af-header-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.15px;
}

.af-body {
    padding: 1.25rem 1.25rem 1rem;
}

.af-svg {
    width: 100%;
    height: auto;
    display: block;
    font-family: var(--font-sans);
}

.af-path {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 1.5;
    stroke-linecap: round;
    transition: stroke 0.4s ease, stroke-dashoffset 0.55s ease;
}

.af-path.active {
    stroke: var(--primary-color);
}

.af-svg.af-resetting .af-path,
.af-svg.af-resetting .af-node-g rect {
    transition: none;
}

.af-node-g rect {
    fill: var(--bg-secondary);
    stroke: var(--border-color);
    stroke-width: 1;
    transition: fill 0.35s ease, stroke 0.35s ease;
}

.af-node-g.active rect {
    fill: #FFF6EE;
    stroke: var(--primary-color);
    stroke-width: 1.5;
}

.af-node-center rect {
    fill: var(--bg-secondary);
}

.af-node-center.active rect {
    fill: #FFF6EE;
    stroke: var(--primary-color);
    stroke-width: 2;
}

.af-node-live.active rect {
    fill: #FFF9EC;
    stroke: var(--accent-color);
    stroke-width: 1.5;
}

.af-nt-main {
    font-size: 11.5px;
    font-weight: 600;
    fill: var(--text-muted);
    letter-spacing: 0.2px;
    transition: fill 0.35s ease;
    user-select: none;
}

.af-node-g.active .af-nt-main {
    fill: var(--text-primary);
}

.af-node-live.active .af-nt-main {
    fill: #7A5515;
}

.af-nt-sub {
    font-size: 9px;
    font-weight: 400;
    fill: var(--border-color);
    transition: fill 0.35s ease;
    user-select: none;
}

.af-node-g.active .af-nt-sub {
    fill: var(--text-muted);
}

.af-status-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.7rem;
    margin-top: 0.1rem;
    border-top: 1px solid var(--border-light);
}

.af-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border-color);
    flex-shrink: 0;
    transition: background 0.4s ease;
}

.af-status-dot.af-running {
    background: #3bbf5e;
    animation: afDotBlink 1.8s ease-in-out infinite;
}

@keyframes afDotBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.af-status-text {
    font-size: 0.73rem;
    color: var(--text-muted);
    letter-spacing: 0.1px;
    transition: color 0.3s ease;
}

.typewriter-wrap {
    display: inline;
    white-space: nowrap;
}

.typewriter-text {
    color: var(--primary-color);
    font-weight: 600;
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.1em;
    background: var(--primary-color);
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 0.85s step-start infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    cursor: pointer;
    padding: 0.75rem 1.75rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid transparent;
    letter-spacing: 0.1px;
    font-family: var(--font-sans);
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: rgba(200, 83, 31, 0.4);
}

.btn-secondary:hover {
    background: rgba(200, 83, 31, 0.08);
    border-color: rgba(200, 83, 31, 0.6);
    transform: translateY(-2px);
}

.btn-large {
    padding: 0.9rem 2rem;
    font-size: 0.95rem;
}

/* ============================================
   NEWSLETTER FORM (HERO)
   ============================================ */
.hero-newsletter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.newsletter-form {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    padding: 5px 5px 5px 18px;
    width: 100%;
    max-width: 460px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.newsletter-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(200, 83, 31, 0.10);
}

.newsletter-input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.93rem;
    font-family: var(--font-sans);
}

.newsletter-input::placeholder {
    color: var(--text-muted);
}

.newsletter-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.7rem 1.3rem;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: var(--font-sans);
    letter-spacing: 0.1px;
}

.newsletter-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.newsletter-btn.success {
    background: #3CAF68;
}

.newsletter-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.hero-talk-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.hero-talk-link:hover {
    color: var(--primary-color);
}

/* ============================================
   HERO IMAGE (about page profile)
   ============================================ */
.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.profile-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
}

.profile-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(200, 83, 31, 0.12), transparent);
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.6;
}

.profile-placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.profile-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.profile-placeholder:hover {
    transform: scale(1.03);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: particleFloat 4s ease-in-out infinite;
}

.particle:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 20%; right: 15%; animation-delay: 1s; }
.particle:nth-child(3) { bottom: 15%; left: 20%; animation-delay: 2s; }
.particle:nth-child(4) { bottom: 25%; right: 10%; animation-delay: 3s; }

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
    50% { transform: translateY(-16px) scale(1.2); opacity: 0.7; }
}

/* ============================================
   SECTIONS — SHARED
   ============================================ */
section {
    padding: 70px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-label {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    opacity: 0.85;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 0.97rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about {
    background: transparent;
    padding: 40px 0;
}

.about-content {
    max-width: 1100px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 3fr 5fr;
    gap: 0;
    align-items: start;
    box-shadow: var(--shadow-sm);
}

.about-image {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding-right: 2.5rem;
    border-right: 1px solid var(--border-color);
}

.about-text {
    padding-left: 2.5rem;
}

.about-image .profile-wrapper {
    width: 220px;
    height: 220px;
}

.about-image .profile-glow {
    width: 240px;
    height: 240px;
}

.about-name {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin: 0;
    font-weight: 600;
}

.about-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.about-role {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.about-team-note {
    margin-top: 0.35rem;
    padding: 0.2rem 0.75rem;
    border: 1px dashed rgba(200, 83, 31, 0.45);
    border-radius: 999px;
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 600;
}

.about-socials {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.25rem;
}

.about-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: var(--text-muted);
    transition: var(--transition);
}

.about-social-link:hover {
    color: var(--primary-color);
    background: rgba(200, 83, 31, 0.08);
}

.about-tech-section {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.about-tech-title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    margin: 0;
}

.about-tech-section .tech-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    width: 100%;
    margin-top: 0;
}

.about-tech-section .tech-badge {
    font-size: 0.65rem;
    padding: 0.4rem 0.5rem;
    text-align: center;
}


.about-text h2 {
    font-family: var(--font-serif);
    text-align: left;
    margin-bottom: 1.25rem;
    font-size: 1.8rem;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.about-text p {
    font-size: 0.97rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-text h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    text-align: left;
}

.about-list {
    list-style: none;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: 0;
    margin-right: auto;
    text-align: left;
}

.about-list li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.93rem;
    padding-left: 36px;
    position: relative;
    line-height: 1.8;
    border-bottom: 1px solid var(--border-light);
}

.about-list li:last-child {
    border-bottom: none;
}

.about-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1em;
    width: 24px;
    height: 16px;
    background-image: url("data:image/svg+xml,<svg viewBox='0 0 28 18' xmlns='http://www.w3.org/2000/svg'><rect x='0' y='6' width='13' height='6' rx='3' fill='%23E2754B'/><rect x='11' y='4' width='7' height='10' rx='2' fill='%23C8531F'/><circle cx='17' cy='9' r='3' fill='%23D9BC7A' opacity='0.7'/><line x1='20' y1='9' x2='27' y2='4' stroke='%23D9BC7A' stroke-width='1.5' stroke-linecap='round' opacity='0.65'/><line x1='20' y1='9' x2='28' y2='9' stroke='%23D9BC7A' stroke-width='1.5' stroke-linecap='round' opacity='0.9'/><line x1='20' y1='9' x2='27' y2='14' stroke='%23D9BC7A' stroke-width='1.5' stroke-linecap='round' opacity='0.65'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: left top;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.tech-badge {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1.4rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.88rem;
    transition: var(--transition);
    letter-spacing: 0.2px;
}

.tech-badge:hover {
    transform: translateY(-3px);
    background: var(--primary-color);
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects {
    background: transparent;
}

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

.project-card {
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.project-card:hover {
    border-color: rgba(200, 83, 31, 0.25);
    box-shadow: var(--shadow-lg);
}

.project-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.project-image img,
.project-image video {
    width: 100%;
    height: 100%;
    object-position: center top;
    transition: var(--transition);
}

.project-image img,
.project-image video {
    transition: none;
}

.project-image img {
    object-fit: cover;
}

.project-image video {
    object-fit: contain;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-content h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.55;
    font-size: 0.83rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
    padding-top: 1rem;
}

.tech-tag {
    background: rgba(200, 83, 31, 0.08);
    border: 1px solid rgba(200, 83, 31, 0.2);
    color: var(--primary-color);
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.project-role {
    white-space: nowrap;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
}

.project-role.client {
    background: rgba(200, 83, 31, 0.08);
    color: var(--primary-color);
    border: 1px solid rgba(200, 83, 31, 0.2);
}

.project-role.own {
    background: rgba(200, 163, 90, 0.12);
    color: #7a6030;
    border: 1px solid rgba(200, 163, 90, 0.3);
}

.project-industry {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.project-challenge {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.45;
}

.project-results {
    margin-top: auto;
    padding-top: 0.75rem;
}

.results-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.project-results p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

.project-content .project-summary {
    margin-bottom: 1.25rem;
}

.project-stats {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1rem 0;
    margin-bottom: 1.25rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.project-stats strong {
    display: block;
    font-family: var(--font-serif);
    font-size: 1.45rem;
    line-height: 1.2;
    color: var(--primary-color);
}

.project-stats span {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.76rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.project-footer {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.project-footer a {
    white-space: nowrap;
}

.case-study-read-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.case-study-read-link svg {
    transition: transform 0.25s ease;
}

.case-study-read-link:hover {
    color: var(--primary-hover);
}

.case-study-read-link:hover svg {
    transform: translateX(3px);
}

.project-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.metric {
    background: rgba(200, 163, 90, 0.12);
    border: 1px solid rgba(200, 163, 90, 0.3);
    color: var(--text-secondary);
    padding: 0.25rem 0.65rem;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    padding: 0.4rem 0.8rem;
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: #FDF6E3;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    font-size: 0.78rem;
    box-shadow: 0 2px 6px rgba(200, 83, 31, 0.25);
}

.project-link:hover {
    background: #B04518;
    border-color: #B04518;
    box-shadow: 0 4px 10px rgba(200, 83, 31, 0.35);
}

/* ============================================
   PART DIVIDER
   ============================================ */
.part-divider {
    padding: 60px 0;
}

.part-divider-inner {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.part-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.part-divider-content {
    text-align: center;
    flex-shrink: 0;
    max-width: 520px;
}

.part-divider-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0.75rem 0 0.5rem;
    color: var(--text-primary);
}

.part-divider-sub {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services {
    background: transparent;
}

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

.service-card {
    background: var(--bg-card);
    padding: 1.75rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.service-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: rgba(200, 83, 31, 0.25);
    box-shadow: var(--shadow-lg);
}

.service-card-featured {
    border-color: rgba(200, 83, 31, 0.45);
    box-shadow: var(--shadow-md);
}

/* Stage track: which part of the product journey the service covers */
.service-stages {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-bottom: 1.5rem;
}

.service-stages li {
    position: relative;
    padding-top: 1.1rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.6;
}

/* Dot */
.service-stages li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--border-color);
    z-index: 1;
}

/* Line back to the previous dot */
.service-stages li + li::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 100%;
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.service-stages li.on {
    color: var(--primary-color);
    opacity: 1;
}

.service-stages li.on::before {
    background: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(200, 83, 31, 0.18);
}

.service-stages li.on + li.on::after {
    height: 2px;
    top: 3.5px;
    background: var(--primary-color);
}

.service-fit {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    margin-bottom: 0.65rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: -0.1px;
}

.service-card > p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.68;
    font-size: 0.9rem;
}

.service-list {
    list-style: none;
    margin-bottom: 1.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--border-color);
}

.service-list li {
    padding: 0.35rem 0 0.35rem 1.6rem;
    color: var(--text-secondary);
    position: relative;
    font-size: 0.86rem;
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 0.15rem;
    top: 0.6rem;
    width: 0.65rem;
    height: 0.35rem;
    border-left: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    transform: rotate(-45deg);
}

.service-cta {
    margin-top: auto;
    color: var(--primary-color);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.service-cta:hover {
    color: var(--primary-hover);
}

/* ============================================
   PROCESS SECTION
   ============================================ */
.process {
    background: transparent;
}

.process-timeline {
    display: flex;
    align-items: flex-start;
    position: relative;
}

/* horizontal connector line running through all nodes */
.process-timeline::before {
    content: '';
    position: absolute;
    top: 26px;
    left: calc(12.5% + 27px);
    right: calc(12.5% + 27px);
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.timeline-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.timeline-node {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
    transition: border-color 0.3s ease, background 0.3s ease;
    flex-shrink: 0;
}

.timeline-step:hover .timeline-node {
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.timeline-num {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.timeline-step:hover .timeline-num {
    color: var(--primary-color);
}

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

.process-icon {
    color: var(--primary-color);
    margin-bottom: 0.6rem;
    opacity: 0.85;
}

.timeline-content h3 {
    font-family: var(--font-serif);
    font-size: 1.0rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: 0.84rem;
}

.timeline-fill {
    position: absolute;
    top: 26px;
    left: calc(12.5% + 27px);
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    z-index: 0;
    border-radius: 1px;
    transition: width 1.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.process-timeline.animated .timeline-fill {
    width: calc(75% - 54px);
}

.timeline-node.step-active {
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.timeline-num.step-active {
    color: var(--primary-color);
}

@keyframes timelineNodePulse {
    0%   { box-shadow: 0 0 0 0 rgba(200, 83, 31, 0.45); }
    70%  { box-shadow: 0 0 0 14px rgba(200, 83, 31, 0); }
    100% { box-shadow: 0 0 0 0 rgba(200, 83, 31, 0); }
}

.timeline-node.step-complete {
    animation: timelineNodePulse 0.7s ease-out forwards;
}

/* ============================================
   TESTIMONIALS
   ============================================ */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.testimonial-card:hover {
    border-color: rgba(200, 83, 31, 0.3);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-md);
}

.testimonial-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 0.97rem;
    line-height: 1.75;
    color: var(--text-secondary);
    flex: 1;
}

.testimonial-quote::before {
    content: '\201C';
    font-size: 1.6rem;
    color: var(--primary-color);
    font-style: normal;
    line-height: 0;
    vertical-align: -0.4em;
    margin-right: 2px;
    opacity: 0.7;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(200, 83, 31, 0.1);
    border: 1px solid rgba(200, 83, 31, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.testimonial-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.testimonial-info strong {
    font-size: 0.88rem;
    color: var(--text-primary);
    font-family: var(--font-serif);
}

.testimonial-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    background: transparent;
    position: relative;
}

.contact::before {
    display: none;
}

.contact-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-card);
    padding: 4rem 4rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.contact-options {
    margin-top: 2.5rem;
}

.contact-divider {
    margin: 2.5rem 0;
    position: relative;
}

.contact-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-color), transparent);
}

.contact-divider span {
    background: var(--bg-card);
    padding: 0 2rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.87rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    flex: 1;
    color: var(--text-primary);
    text-decoration: none;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: var(--transition);
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: inherit;
}

.contact-link:hover {
    background: rgba(200, 83, 31, 0.07);
    border-color: rgba(200, 83, 31, 0.35);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
    color: var(--primary-color);
}

button.contact-link {
    cursor: pointer;
}

button.contact-link:hover {
    background: rgba(200, 83, 31, 0.07);
    border-color: rgba(200, 83, 31, 0.35);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
    color: var(--primary-color);
}

.contact-link svg {
    transition: var(--transition);
}

.contact-link:hover svg {
    transform: scale(1.1);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--bg-secondary);
    padding: 0 0 1.5rem;
    position: relative;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-divider {
    height: 0;
    display: none;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 0;
}

.footer-brand {
    flex-shrink: 0;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 1.1rem;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
}

.footer-logo::before {
    content: '';
    position: absolute;
    left: 32px;
    top: -16px;
    right: -30px;
    bottom: -16px;
    background: linear-gradient(
        to right,
        rgba(200, 163, 90, 0.50) 0%,
        rgba(200, 163, 90, 0.12) 68%,
        transparent 100%
    );
    clip-path: polygon(0 41%, 100% 39%, 100% 96%, 0 51%);
    transform-origin: 0 41%;
    animation: lighthouse-sweep 3s ease-in-out infinite;
    pointer-events: none;
}

.footer-logo:hover {
    opacity: 0.75;
}

.footer-logo-img {
    height: 32px;
    width: auto;
}

.footer-logo-name {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 400;
    margin-top: 0.5rem;
}

.footer-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.83rem;
}

.footer-legal-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.footer-legal-links .footer-link {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ============================================
   LEGAL PAGES
   ============================================ */
.legal-page {
    padding: 8rem 0 4rem;
    min-height: 80vh;
}

.legal-page h1 {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 3rem;
}

.legal-section {
    padding: 0;
    margin-bottom: 1.5rem;
}

.legal-section h2 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.legal-section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.legal-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.legal-section ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.legal-section ul li {
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.4rem;
}

.legal-section ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 0.72rem;
    line-height: 1.8;
    color: var(--primary-color);
}

.legal-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.legal-section a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ============================================
   CASE STUDY PAGES
   ============================================ */
.case-study {
    padding: 8rem 0 4rem;
}

.case-study-back {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 2.5rem;
    transition: var(--transition);
}

.case-study-back:hover {
    color: var(--primary-color);
}

.case-study-hero {
    max-width: 760px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.case-study-title {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
    line-height: 1.2;
}

.case-study-tagline {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.case-study-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.case-study-cover {
    max-width: 720px;
    margin: 0 auto 3rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.case-study-cover img,
.case-study-cover video {
    display: block;
    width: 100%;
    height: auto;
}

.case-study-body {
    max-width: 760px;
    margin: 0 auto;
}

.case-study-block {
    padding: 1.25rem 0;
    border-top: 1px solid var(--border-light);
}

.case-study-block:first-of-type {
    margin-top: 0.5rem;
}

.case-study-block h3 {
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.case-study-cta .btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.case-study-pipeline {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.82rem;
    line-height: 1.9;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.25rem 0 1.5rem;
    overflow-x: auto;
    white-space: pre;
}

.case-study-cta {
    max-width: 760px;
    margin: 4rem auto 0;
    padding: 2.5rem;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    text-align: center;
}

.case-study-cta h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.case-study-cta p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .case-study {
        padding: 7rem 0 3rem;
    }

    .case-study-title {
        font-size: 1.85rem;
    }

    .case-study-cta {
        padding: 2rem 1.5rem;
    }
}

/* ============================================
   SCROLL TO TOP
   ============================================ */
.scroll-top {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 46px;
    height: 46px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    pointer-events: none;
    z-index: 10002;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: var(--shadow-sm);
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: all;
}

.scroll-top:hover {
    transform: translateY(-4px);
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.scroll-top svg {
    stroke: var(--text-secondary);
    transition: var(--transition);
}

.scroll-top:hover svg {
    stroke: #fff;
}

.scroll-top:active {
    transform: scale(0.92);
}

/* ============================================
   FLOATING CTA
   ============================================ */
.floating-cta {
    position: fixed;
    bottom: 40px;
    right: 100px;
    height: 46px;
    padding: 0 1.4rem;
    display: flex;
    align-items: center;
    background: var(--primary-color);
    color: #fff;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    z-index: 1002;
}

.floating-cta.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.floating-cta:hover {
    background: var(--primary-hover);
    transform: translateY(-4px);
}

/* ============================================
   PROTOTYPE REVIEW MODAL
   ============================================ */
.review-modal {
    width: min(480px, calc(100% - 32px));
    margin: auto;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
}

.review-modal::backdrop {
    background: rgba(10, 8, 16, 0.65);
    backdrop-filter: blur(4px);
}

.review-modal-body {
    padding: 2rem;
}

.review-modal h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    padding-right: 2rem;
}

.review-modal-intro {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.review-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.review-modal-close:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

#reviewForm label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

#reviewForm label span {
    font-weight: 400;
    color: var(--text-muted);
}

#reviewForm input,
#reviewForm textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 1rem;
    resize: vertical;
}

#reviewForm input:focus,
#reviewForm textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.review-form-status {
    min-height: 1.2em;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 0.82rem;
}

#reviewSubmit {
    width: 100%;
    justify-content: center;
    text-align: center;
}

#reviewSubmit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.review-form-fineprint {
    margin-top: 0.85rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

.review-modal a {
    color: var(--primary-color);
}

.review-modal-success p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

/* ============================================
   ANIMATIONS — REVEAL
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Scroll-triggered card fade-ins */
.fade-in-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ============================================
   HERO ACTIONS
   ============================================ */
.hero-actions {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* ============================================
   LIGHTHOUSE SWEEP ANIMATION
   ============================================ */
@keyframes lighthouse-sweep {
    0%   { transform: rotate(-12deg); opacity: 0.3; }
    50%  { transform: rotate(10deg);  opacity: 1; }
    100% { transform: rotate(-12deg); opacity: 0.3; }
}

/* ============================================
   RESPONSIVE — 1024px
   ============================================ */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1.5rem;
    }

    .process-timeline {
        flex-wrap: wrap;
    }

    .timeline-step {
        flex: 0 0 50%;
        padding: 0 0.75rem 2.5rem;
    }

    .process-timeline::before {
        left: 25%;
        right: 25%;
        top: 27px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 3rem;
    }

    .about-image {
        position: static;
        justify-content: center;
        padding-right: 0;
        border-right: none;
    }

    .about-text {
        padding-left: 0;
    }

    .about-tech-section .tech-stack {
        max-width: 100%;
    }

    .contact-content {
        padding: 3rem 2.5rem;
    }

    .tech-badge {
        padding: 0.65rem 1.2rem;
        font-size: 0.84rem;
    }
}

/* ============================================
   RESPONSIVE — 968px
   ============================================ */
@media (max-width: 968px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .profile-wrapper {
        width: 240px;
        height: 240px;
    }

    .section-title {
        font-size: 1.9rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
    }

    .part-divider-inner {
        flex-direction: column;
        gap: 1.5rem;
    }

    .part-divider-line {
        width: 80px;
        flex: none;
    }

    .part-divider-title {
        font-size: 1.6rem;
    }
}

/* ============================================
   RESPONSIVE — 900px (tablet)
   ============================================ */
@media (max-width: 900px) {
    /* Nav: show hamburger and overlay menu */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background: rgba(253, 246, 227, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 3rem 2rem;
        transition: left 0.4s ease;
        gap: 2rem;
        border-top: 1px solid var(--border-color);
    }

    [data-theme="dark"] .nav-menu {
        background: rgba(21, 19, 31, 0.98);
    }

    .nav-menu.active {
        left: 0;
    }

    /* Hero: stack to single column */
    .hero {
        padding: 112px 0 60px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-photo {
        max-width: 520px;
        width: 100%;
        margin: 0 auto;
        aspect-ratio: 4 / 3;
    }

    /* Services: 2-column grid, last card spans the full row */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-card:last-child {
        grid-column: span 2;
    }

    /* Projects: single centered column so media stays a sensible size */
    .projects-grid {
        grid-template-columns: 1fr;
        max-width: 560px;
        margin: 0 auto;
    }
}

/* ============================================
   RESPONSIVE — 768px (mobile)
   ============================================ */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background: rgba(253, 246, 227, 0.98);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 3rem 2rem;
        transition: left 0.4s ease;
        gap: 2rem;
        border-top: 1px solid var(--border-color);
    }

    [data-theme="dark"] .nav-menu {
        background: rgba(21, 19, 31, 0.98);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding: 104px 0 56px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-photo {
        max-width: 500px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .services-grid,
    .projects-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .service-card:last-child {
        grid-column: auto;
    }

    .process-timeline {
        flex-direction: column;
        align-items: stretch;
        padding-left: 1.5rem;
    }

    .process-timeline::before,
    .timeline-fill {
        display: none;
    }

    .timeline-step:not(:last-child)::after {
        content: '';
        position: absolute;
        left: 26px;
        top: 54px;
        bottom: 0;
        width: 2px;
        background: var(--border-color);
        z-index: 0;
    }

    .timeline-step {
        flex: none;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 1.25rem;
        padding: 0 0 2.5rem 0;
    }

    .timeline-step:last-child {
        padding-bottom: 0;
    }

    .timeline-node {
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .timeline-content {
        align-items: flex-start;
        padding-top: 0.85rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        padding: 2.5rem;
    }

    .about-image {
        position: static;
        justify-content: center;
    }

    .about-tech-section .tech-stack {
        max-width: 100%;
    }

    .contact-content {
        padding: 2.5rem 1.75rem;
    }

    .footer-top {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        padding: 2rem 0;
    }

    .footer-nav {
        gap: 1.25rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }

    .floating-cta {
        bottom: 20px;
        right: 74px;
        height: 42px;
    }
}


/* ============================================
   BUTTON RIPPLE
   ============================================ */
.btn-primary {
    position: relative;
    overflow: hidden;
}

span.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-anim {
    to { transform: scale(4); opacity: 0; }
}

/* ============================================
   RESPONSIVE — 480px
   ============================================ */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    /* Keep both CTAs on the first screen: the subtitle carries the message, the body repeats in Services */
    .hero-body {
        display: none;
    }

    .hero-subtitle {
        margin-bottom: 1.5rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-cta-note {
        margin-bottom: 1.25rem;
        text-align: center;
    }

    .hero-proof {
        display: grid;
        grid-template-columns: 1fr auto 1fr auto 1fr;
        gap: 0.75rem;
    }

    .hero-proof-item span {
        font-size: 0.72rem;
    }

    .newsletter-form {
        flex-direction: column;
        padding: 12px;
        border-radius: 10px;
        gap: 10px;
    }

    .newsletter-input {
        width: 100%;
        text-align: center;
    }

    .newsletter-btn {
        width: 100%;
        padding: 0.75rem;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-link {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .about-content {
        padding: 1.75rem;
        grid-template-columns: minmax(0, 1fr);
    }

    .about-image .profile-wrapper {
        width: 180px;
        height: 180px;
    }

    .about-tech-section {
        width: 100%;
    }

    .project-stats strong {
        font-size: 1.25rem;
    }

    /* Drops to 2 columns on very narrow screens instead of overflowing the card */
    .about-tech-section .tech-stack {
        grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    }
}

/* ============================================
   THEME TOGGLE — day / night horizon switch
   A small sky that shifts from dawn to a starlit
   harbor, echoing the lighthouse beam in the logo.
   ============================================ */
.theme-toggle {
    border: none;
    background: none;
    padding: 0;
    margin-left: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 0;
}

.theme-toggle-track {
    position: relative;
    display: block;
    width: 56px;
    height: 30px;
    border-radius: 999px;
    background: linear-gradient(120deg, #FBE6C3 0%, #F2CC9C 45%, #E6AC79 100%);
    box-shadow: inset 0 1px 4px rgba(44, 26, 16, 0.2), inset 0 -1px 1px rgba(255, 255, 255, 0.35);
    overflow: hidden;
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

.theme-toggle-stars {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.45s ease;
}

.theme-toggle-stars span {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #D9BC7A;
}

.theme-toggle-stars span:nth-child(1) { top: 7px;  left: 9px; }
.theme-toggle-stars span:nth-child(2) { top: 17px; left: 17px; }
.theme-toggle-stars span:nth-child(3) { top: 9px;  left: 27px; }

.theme-toggle-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #FFEFD2, #E8A33D 60%, #C97A28);
    box-shadow: 0 0 10px 1px rgba(232, 163, 61, 0.5), 0 2px 5px rgba(44, 26, 16, 0.3);
    transform: translateX(0);
    transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1), background 0.5s ease, box-shadow 0.5s ease;
}

[data-theme="dark"] .theme-toggle-track {
    background: linear-gradient(120deg, #2A2738 0%, #1D1B2B 55%, #131220 100%);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.45), inset 0 -1px 1px rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .theme-toggle-stars {
    opacity: 1;
}

[data-theme="dark"] .theme-toggle-knob {
    transform: translateX(26px);
    background: radial-gradient(circle at 65% 35%, #F4EFE6, #C7C0D6 60%, #948CAA);
    box-shadow: 0 0 10px 1px rgba(201, 196, 224, 0.4), 0 2px 5px rgba(0, 0, 0, 0.4);
}

/* ============================================
   DARK THEME — contrast adjustments
   A handful of badges and surfaces use fixed
   colors tuned for the cream background; give
   them night-friendly counterparts here.
   ============================================ */
[data-theme="dark"] .hero-label-available {
    color: #7FD89A;
}

[data-theme="dark"] .project-role.own {
    color: #E6CB8C;
}

/* Navbar: swap the cream glass for a night-harbor glass */
[data-theme="dark"] .nav {
    background: rgba(21, 19, 31, 0.88);
}

[data-theme="dark"] .nav.scrolled {
    background: rgba(21, 19, 31, 0.97);
}

/* "How I build with you" agent-flow diagram: the active-step
   highlight used a bright cream fill that reads as a glaring
   white box on a dark canvas — replace it with a warm glow that
   matches the lighthouse-beam accent instead. */
[data-theme="dark"] .af-node-g.active rect {
    fill: rgba(226, 117, 75, 0.16);
}

[data-theme="dark"] .af-node-center.active rect {
    fill: rgba(226, 117, 75, 0.2);
}

[data-theme="dark"] .af-node-live.active rect {
    fill: rgba(217, 188, 122, 0.18);
}

[data-theme="dark"] .af-node-live.active .af-nt-main {
    fill: #E6CB8C;
}
