/*
   FeynmanLM: Research desk theme
   Quiet, product-first, and deliberately free of landing-page decoration.
*/

:root {
    --paper: #f7f7f4;
    --paper-deep: #efefea;
    --surface: #ffffff;
    --ink: #1f211f;
    --ink-soft: #555a55;
    --muted: #7b817b;
    --line: #dcded8;
    --line-dark: #c7cac3;
    --accent: #395b52;
    --accent-soft: #e7eeea;
    --dark: #232522;
    --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    background-image: radial-gradient(rgba(31, 33, 31, 0.15) 0.55px, transparent 0.55px);
    background-size: 6px 6px;
    content: "";
    inset: 0;
    opacity: 0.035;
    pointer-events: none;
    position: fixed;
    z-index: 1000;
}

.container {
    margin: 0 auto;
    max-width: 1180px;
    padding: 0 32px;
}

h1,
h2,
h3 {
    font-weight: 500;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

p {
    color: var(--ink-soft);
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

::selection {
    background: #cbd9d4;
    color: var(--ink);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* Motion is intentionally quiet. */
.reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* Navigation */
.nav {
    background: rgba(247, 247, 244, 0.92);
    border-bottom: 1px solid transparent;
    left: 0;
    position: fixed;
    right: 0;
    top: 0;
    transition: border-color 0.2s ease;
    z-index: 100;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.nav.scrolled {
    border-bottom-color: var(--line);
}

.nav-inner {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1180px;
    padding: 18px 32px;
}

.nav-logo,
.footer-brand {
    align-items: center;
    display: flex;
    font-size: 1.02rem;
    font-weight: 650;
    gap: 10px;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.nav-icon,
.footer-icon,
.cta-icon {
    align-items: center;
    background: var(--ink);
    color: var(--paper);
    display: inline-flex;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 700;
    justify-content: center;
    letter-spacing: -0.08em;
}

.nav-icon,
.footer-icon {
    border-radius: 3px;
    font-size: 17px;
    height: 26px;
    padding-right: 2px;
    width: 26px;
}

.nav-links {
    align-items: center;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #383b38;
    font-size: 0.89rem;
    font-weight: 500;
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-auth {
    align-items: center;
    display: inline-flex;
}

.nav-cloudkit-auth {
    align-items: center;
    display: inline-flex;
    min-height: 44px;
}

.nav-cloudkit-auth > :only-child {
    margin: 0;
}

.nav-cta {
    background: var(--dark);
    border-radius: 6px;
    color: #fff !important;
    padding: 9px 15px;
}

.nav-cta:hover {
    background: #3a3d39;
}

/* Download page */
.download-page {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.download-main {
    flex: 1;
    padding: 76px 0 96px;
}

.download-header {
    padding: clamp(84px, 11vw, 132px) 0 58px;
    text-align: center;
}

.download-header h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    letter-spacing: -0.06em;
    margin-bottom: 22px;
}

.download-header p {
    font-size: 1.1rem;
}

.download-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.download-card {
    background: var(--surface);
    border: 1px solid var(--line-dark);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    min-height: 365px;
    padding: 30px;
}

.download-card-icon {
    align-items: center;
    background: var(--paper-deep);
    border-radius: 7px;
    color: var(--ink);
    display: inline-flex;
    height: 46px;
    justify-content: center;
    margin-bottom: 32px;
    width: 46px;
}

.download-card-icon svg {
    height: 23px;
    width: 23px;
}

.download-platform {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    margin-bottom: 13px;
    text-transform: uppercase;
}

.download-card h2 {
    font-size: 1.65rem;
    margin-bottom: 14px;
}

.download-card p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.download-card .btn {
    margin-top: auto;
    width: 100%;
}

.btn-disabled {
    background: var(--paper-deep);
    border-color: var(--line);
    color: var(--muted);
    cursor: default;
}

.btn-disabled:hover {
    transform: none;
}

/* Hero */
.hero {
    padding-top: 76px;
}

.hero > .container {
    padding-bottom: 64px;
    padding-top: clamp(90px, 12vw, 150px);
    text-align: center;
}

.section-badge,
.price-kicker,
.demo-reel-copy > span {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(3rem, 6.3vw, 5.65rem);
    font-weight: 500;
    letter-spacing: -0.06em;
    margin: 0 auto 30px;
    max-width: 980px;
}

.hero-title em {
    color: var(--muted);
    font-style: normal;
    font-weight: 400;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 1.6vw, 1.22rem);
    line-height: 1.6;
    margin: 0 auto 34px;
    max-width: 670px;
}

.hero-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.btn {
    align-items: center;
    border: 1px solid var(--line-dark);
    border-radius: 6px;
    display: inline-flex;
    font-size: 0.92rem;
    font-weight: 600;
    gap: 9px;
    justify-content: center;
    min-height: 48px;
    padding: 0 19px;
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

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

.btn-dark:hover {
    background: #393c38;
    border-color: #393c38;
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
}

.btn-ghost:hover {
    background: var(--surface);
    border-color: #b7bbb3;
}

.hero-note {
    font-size: 0.8rem;
    margin-top: 17px;
}

.hero-shot {
    border-bottom: 1px solid var(--line);
    position: relative;
}

.hero-shot-band {
    display: none;
}

.hero-shot .container {
    position: relative;
}

.hero-shot-frame {
    background: var(--surface);
    border: 1px solid #cfd2cc;
    border-radius: 8px;
    box-shadow: 0 28px 70px rgba(25, 27, 24, 0.12);
    overflow: hidden;
}

.hero-shot-frame video {
    display: block;
    height: auto;
    width: 100%;
}

.window-chrome {
    align-items: center;
    background: #f5f5f2;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 6px;
    min-height: 30px;
    padding: 0 12px;
}

.dot {
    background: #b9bcb6;
    border-radius: 50%;
    height: 8px;
    width: 8px;
}

.hero-loop {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0 auto;
    padding: 30px 0 44px;
}

.loop-step {
    align-items: flex-start;
    border-left: 1px solid var(--line);
    display: grid;
    gap: 6px;
    grid-template-columns: 30px 1fr;
    padding: 3px 18px;
    text-align: left;
}

.loop-step:first-child {
    border-left: 0;
    padding-left: 0;
}

.loop-step > span {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.67rem;
    padding-top: 3px;
}

.loop-step div {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.loop-step strong {
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.3;
}

.loop-step small {
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

/* Source list */
.sources-strip {
    padding: 96px 0 62px;
}

.strip-title {
    font-size: clamp(1.9rem, 3.4vw, 3rem);
    margin-bottom: 36px;
    text-align: center;
}

.marquee {
    margin: 0 auto;
    max-width: 1050px;
    overflow: visible;
    padding: 0 32px;
}

.marquee-track {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 0;
    justify-content: center;
    width: auto;
}

.src-chip {
    align-items: center;
    color: var(--ink-soft);
    display: inline-flex;
    font-size: 0.9rem;
    gap: 8px;
    padding: 0 13px;
    white-space: nowrap;
}

.src-chip + .src-chip {
    border-left: 1px solid var(--line-dark);
}

.src-chip:nth-child(n + 13) {
    display: none;
}

.tdot {
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
    height: 5px;
    opacity: 0.7;
    width: 5px;
}

/* Shared section framing */
.content-workflows,
.demo,
.mcp,
.researchers,
.icloud,
.pricing,
.cta {
    padding: 120px 0;
}

.section-header {
    margin-bottom: 58px;
    max-width: 760px;
}

.section-badge {
    display: block;
    margin-bottom: 18px;
}

.section-header h2,
.mcp-copy h2,
.icloud-copy h2,
.cta h2 {
    font-size: clamp(2.25rem, 4.4vw, 4.1rem);
    margin-bottom: 22px;
}

.section-sub,
.mcp-copy > p,
.icloud-copy > p,
.cta-sub {
    font-size: 1.04rem;
    line-height: 1.65;
    max-width: 690px;
}

/* Research inbox */
.content-workflows {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    border-top: 1px solid var(--line);
}

.workflow-grid {
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workflow-card {
    border-top: 1px solid var(--line);
    min-height: 230px;
    padding: 34px 48px 38px 0;
}

.workflow-card:nth-child(even) {
    border-left: 1px solid var(--line);
    padding-left: 48px;
}

.workflow-index,
.diff-index {
    color: var(--muted);
    display: block;
    font-family: var(--mono);
    font-size: 0.68rem;
    margin-bottom: 42px;
}

.workflow-card h3,
.diff-card h3,
.price-card h3 {
    font-size: 1.45rem;
    margin-bottom: 14px;
}

.workflow-card p,
.diff-card p {
    font-size: 0.94rem;
    line-height: 1.65;
    max-width: 500px;
}

/* Product recordings */
.demo {
    padding-bottom: 140px;
}

.demo-reels {
    display: grid;
    gap: 72px 24px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.demo-reel-primary {
    grid-column: 1 / -1;
}

.demo-reel-media {
    background: #e8e8e3;
    border: 1px solid var(--line-dark);
    border-radius: 7px;
    overflow: hidden;
}

.demo-reel-media video {
    display: block;
    width: 100%;
}

.carplay-demo-media {
    align-items: center;
    background: #dfe2dc;
    display: flex;
    justify-content: center;
    min-height: 590px;
    padding: clamp(28px, 6vw, 76px);
}

.carplay-dash {
    background: linear-gradient(145deg, #303333, #0f1111 54%, #252828);
    border: 1px solid #050606;
    border-radius: 48px;
    box-shadow: 0 38px 72px rgba(24, 27, 24, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.24);
    max-width: 880px;
    padding: 18px;
    width: 100%;
}

.carplay-screen {
    aspect-ratio: 3 / 2;
    background: #111314;
    border: 2px solid #060707;
    border-radius: 33px;
    display: grid;
    grid-template-columns: 82px 1fr;
    overflow: hidden;
}

.carplay-rail {
    align-items: center;
    background: #1c1f20;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 24px 12px 22px;
}

.carplay-time {
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.carplay-grid-icon {
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(2, 5px);
    margin: auto 0;
}

.carplay-grid-icon i {
    background: #a7acac;
    border-radius: 50%;
    height: 5px;
    width: 5px;
}

.carplay-app-mark {
    align-items: center;
    background: #f5f5f1;
    border-radius: 12px;
    color: #111314;
    display: flex;
    font-family: var(--font);
    font-size: 1.2rem;
    font-weight: 700;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.carplay-voice-surface {
    align-items: center;
    display: flex;
    justify-content: center;
    position: relative;
}

.carplay-status {
    align-items: flex-end;
    display: flex;
    gap: 4px;
    position: absolute;
    right: 28px;
    top: 26px;
}

.carplay-status span {
    background: #c7cbcb;
    border-radius: 2px;
    display: block;
    height: 5px;
    width: 5px;
}

.carplay-status b {
    border: 2px solid #c7cbcb;
    border-radius: 3px;
    display: block;
    height: 10px;
    margin-left: 4px;
    position: relative;
    width: 20px;
}

.carplay-status b::after {
    background: #c7cbcb;
    border-radius: 1px;
    content: "";
    height: 4px;
    position: absolute;
    right: -5px;
    top: 1px;
    width: 2px;
}

.carplay-sources {
    background: #2b2e2f;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 8px 15px;
    position: absolute;
    right: 28px;
    top: 54px;
}

/* Keep this speaking palette aligned with CarPlayVoiceOrbRenderer in the iOS app. */
.carplay-speaking-orb {
    animation: carplay-speaking 0.95s ease-in-out infinite alternate;
    background:
        radial-gradient(circle at 28% 23%, rgba(255, 255, 255, 0.58), transparent 31%),
        radial-gradient(circle at 78% 72%, rgba(255, 148, 46, 0.9), transparent 48%),
        linear-gradient(145deg, #f23366 5%, #943deb 51%, #ff942e 100%);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 50%;
    box-shadow: 0 12px 34px rgba(242, 51, 102, 0.35), 0 0 54px rgba(148, 43, 230, 0.18);
    height: clamp(118px, 17vw, 178px);
    width: clamp(118px, 17vw, 178px);
}

.carplay-end {
    align-items: center;
    bottom: 30px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: absolute;
}

.carplay-end span {
    align-items: center;
    background: #d6373f;
    border-radius: 50%;
    display: flex;
    font-family: var(--font);
    font-size: 1.6rem;
    font-weight: 300;
    height: 48px;
    justify-content: center;
    line-height: 1;
    width: 48px;
}

.carplay-end small {
    font-size: 0.68rem;
    font-weight: 600;
}

@keyframes carplay-speaking {
    from { transform: scale(0.965) translateY(2px); }
    to { transform: scale(1.035) translateY(-2px); }
}

.demo-reel-copy {
    padding-top: 21px;
}

.demo-reel-copy h3 {
    font-size: clamp(1.25rem, 2vw, 1.72rem);
    font-weight: 500;
    line-height: 1.3;
    margin-top: 11px;
    max-width: 760px;
}

.demo-window[hidden] {
    display: none !important;
}

/* MCP */
.mcp {
    background: #e9ece8;
    border-bottom: 1px solid #d5d8d3;
    border-top: 1px solid #d5d8d3;
}

.mcp-grid {
    align-items: center;
    display: grid;
    gap: clamp(60px, 9vw, 120px);
    grid-template-columns: minmax(0, 0.9fr) minmax(440px, 1.1fr);
}

.mcp-copy > p + p {
    margin-top: 15px;
}

.mcp-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 32px;
}

.mcp-logo {
    align-items: center;
    color: var(--ink-soft);
    display: inline-flex;
    font-size: 0.8rem;
    gap: 7px;
}

.mcp-logo svg {
    height: 17px;
    width: 17px;
}

.mcp-terminal {
    background: #262a27;
    border: 1px solid #171917;
    border-radius: 6px;
    box-shadow: 0 20px 50px rgba(24, 28, 24, 0.12);
    color: #d9ded9;
    font-family: var(--mono);
    font-size: 0.73rem;
    padding: 24px;
}

.terminal-title {
    border-bottom: 1px solid #414641;
    color: #929a93;
    font-size: 0.66rem;
    letter-spacing: 0.07em;
    margin: -4px 0 22px;
    padding-bottom: 14px;
    text-transform: uppercase;
}

.terminal-line {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 17px;
}

.t-call {
    color: #b9d7c9;
}

.t-arg {
    color: #a6aca6;
}

.terminal-result {
    border-left: 1px solid #596059;
    color: #878e88;
    line-height: 1.55;
    margin: 8px 0 0 8px;
    padding-left: 12px;
}

.t-check {
    color: #a9cfb9;
}

/* Research principles */
.researchers {
    background: var(--surface);
}

.diff-grid {
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.diff-card {
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
    min-height: 275px;
    padding: 30px;
}

.diff-card:nth-child(3n + 1) {
    border-left: 0;
    padding-left: 0;
}

.diff-card-featured {
    background: transparent;
}

/* iCloud */
.icloud {
    padding-top: 30px;
}

.icloud-card {
    align-items: center;
    background: #eceee9;
    border: 1px solid #d7dad4;
    display: grid;
    gap: 70px;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
    min-height: 570px;
    overflow: hidden;
    padding: 72px;
}

.icloud-list,
.price-card ul {
    list-style: none;
}

.icloud-list {
    border-top: 1px solid #cfd3cc;
    margin-top: 32px;
}

.icloud-list li {
    border-bottom: 1px solid #cfd3cc;
    color: var(--ink-soft);
    font-size: 0.88rem;
    padding: 13px 0;
}

.icloud-list li::before {
    color: var(--accent);
    content: "•";
    margin-right: 10px;
}

.icloud-visual {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.device-stage {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: 360px;
    position: relative;
    width: 100%;
}

.device-halo {
    background: #dde2db;
    border-radius: 50%;
    height: 330px;
    position: absolute;
    width: 330px;
}

.icloud-phone {
    filter: drop-shadow(0 24px 35px rgba(25, 28, 24, 0.18));
    max-height: 380px;
    max-width: 100%;
    position: relative;
    width: auto;
}

.device-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.device-pill {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 0.65rem;
    text-transform: uppercase;
}

.device-pill + .device-pill::before {
    content: "·";
    margin-right: 8px;
}

/* Pricing */
.pricing {
    border-bottom: 1px solid var(--line);
}

.price-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.price-card {
    background: var(--surface);
    border: 1px solid var(--line-dark);
    border-radius: 6px;
    min-height: 470px;
    padding: 38px;
}

.price-card-featured {
    border-color: #7a817a;
}

.price-kicker {
    display: block;
    margin-bottom: 36px;
}

.price-line {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 38px 0 7px;
}

.price-big {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 500;
    letter-spacing: -0.06em;
    line-height: 1;
}

.price-once,
.price-note {
    color: var(--muted);
    font-size: 0.8rem;
}

.price-card ul {
    border-top: 1px solid var(--line);
    margin-top: 34px;
}

.price-card li {
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.86rem;
    padding: 12px 0 12px 20px;
    position: relative;
}

.price-card li::before {
    content: "↳";
    left: 0;
    position: absolute;
}

.price-footnote {
    font-size: 0.76rem;
    line-height: 1.6;
    margin: 24px auto 0;
    max-width: 850px;
    text-align: center;
}

/* Final invitation */
.cta {
    padding-bottom: 110px;
    padding-top: 110px;
}

.cta-inner {
    align-items: center;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.cta-icon {
    border-radius: 7px;
    font-size: 28px;
    height: 50px;
    margin-bottom: 32px;
    padding-right: 3px;
    width: 50px;
}

.cta h2 {
    max-width: 760px;
}

.cta-sub {
    margin: 0 auto 30px;
}

.btn-large {
    min-height: 52px;
    padding: 0 22px;
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 38px 0;
}

.footer-inner {
    align-items: center;
    display: grid;
    gap: 24px;
    grid-template-columns: auto 1fr auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    justify-content: center;
}

.footer-links a,
.footer-copy {
    color: var(--muted);
    font-size: 0.75rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--ink);
}

/* The old scripted demo remains in the DOM for compatibility, but is not visible. */
.demo-window {
    display: none;
}

@media (max-width: 960px) {
    .nav-links { gap: 18px; }

    .download-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .download-card:last-child { grid-column: 1 / -1; min-height: 300px; }

    .hero-loop { grid-template-columns: repeat(2, 1fr); }
    .loop-step:nth-child(3) { border-left: 0; }
    .loop-step:nth-child(n + 3) { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 20px; }

    .mcp-grid { gap: 56px; grid-template-columns: 1fr; }
    .mcp-terminal { max-width: 720px; }

    .diff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .diff-card:nth-child(3n + 1) { border-left: 1px solid var(--line); padding-left: 30px; }
    .diff-card:nth-child(odd) { border-left: 0; padding-left: 0; }

    .icloud-card { gap: 20px; grid-template-columns: 1fr 0.8fr; padding: 54px; }

    .footer-inner { grid-template-columns: 1fr; text-align: center; }
    .footer-brand { justify-content: center; }
}

@media (max-width: 700px) {
    .container,
    .nav-inner,
    .marquee { padding-left: 20px; padding-right: 20px; }

    .nav-inner { padding-bottom: 15px; padding-top: 15px; }
    .nav-links { gap: 14px; }

    .download-main { padding-bottom: 72px; }
    .download-header { padding-bottom: 42px; padding-top: 70px; }
    .download-grid { grid-template-columns: 1fr; }
    .download-card,
    .download-card:last-child { grid-column: auto; min-height: 330px; }

    .hero { padding-top: 65px; }
    .hero > .container { padding-bottom: 46px; padding-top: 76px; }
    .hero-title { font-size: clamp(2.65rem, 13vw, 4rem); }
    .hero-subtitle { font-size: 1rem; }
    .hero-actions { align-items: stretch; flex-direction: column; }
    .btn { width: 100%; }

    .hero-loop { grid-template-columns: 1fr; padding: 24px 0 30px; }
    .loop-step { border-left: 0; border-top: 1px solid var(--line); margin: 0 !important; padding: 16px 0 !important; }
    .loop-step:first-child { border-top: 0; }

    .sources-strip { padding: 76px 0 30px; }
    .src-chip { border: 0 !important; font-size: 0.8rem; padding: 4px 8px; }

    .content-workflows,
    .demo,
    .mcp,
    .researchers,
    .icloud,
    .pricing,
    .cta { padding: 86px 0; }

    .section-header { margin-bottom: 42px; }

    .workflow-grid,
    .diff-grid,
    .price-grid,
    .demo-reels { grid-template-columns: 1fr; }

    .workflow-card,
    .workflow-card:nth-child(even),
    .diff-card,
    .diff-card:nth-child(3n + 1),
    .diff-card:nth-child(odd) {
        border-left: 0;
        min-height: 0;
        padding: 28px 0 32px;
    }

    .workflow-index,
    .diff-index { margin-bottom: 25px; }

    .demo-reels { gap: 48px; }
    .demo-reel-primary { grid-column: auto; }
    .carplay-demo-media { min-height: 0; padding: 20px; }
    .carplay-dash { border-radius: 28px; padding: 10px; }
    .carplay-screen { border-radius: 20px; grid-template-columns: 54px 1fr; }
    .carplay-rail { padding: 14px 7px; }
    .carplay-time { font-size: 0.55rem; }
    .carplay-app-mark { border-radius: 8px; font-size: 0.9rem; height: 30px; width: 30px; }
    .carplay-status { right: 14px; top: 14px; }
    .carplay-sources { font-size: 0.6rem; padding: 5px 9px; right: 14px; top: 34px; }
    .carplay-end { bottom: 12px; gap: 2px; }
    .carplay-end span { font-size: 1rem; height: 30px; width: 30px; }
    .carplay-end small { font-size: 0.52rem; }

    .mcp-grid { gap: 42px; }
    .mcp-terminal { font-size: 0.67rem; margin-left: -8px; margin-right: -8px; padding: 20px 16px; }

    .icloud { padding-top: 10px; }
    .icloud-card { gap: 34px; grid-template-columns: 1fr; min-height: 0; padding: 38px 24px; }
    .device-stage { min-height: 300px; }
    .device-halo { height: 270px; width: 270px; }
    .icloud-phone { max-height: 310px; }

    .price-card { min-height: 0; padding: 30px 24px; }

    .footer-links { gap: 12px 18px; }
}
