/* Homepage refinement. Scoped to keep article and service templates stable. */
.dd-home {
  --dd-ease: cubic-bezier(.22, 1, .36, 1);
  --dd-flow-surface: oklch(23% .025 185);
  --dd-flow-line: oklch(43% .04 185);
  --dd-soft-accent: oklch(84% .105 178);
}
.dd-home .landing-brand { align-items: flex-start; }
.dd-home .landing-header nav > a { transition: color 180ms var(--dd-ease), background 180ms var(--dd-ease); }
.dd-home .landing-header .landing-nav-cta { border-color: var(--dd-flow-line); }
.dd-home .landing-header .landing-nav-cta:hover { background: var(--dd-flow-surface); }
.dd-home .dd-hero {
  padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(3.5rem, 7vw, 6rem);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.dd-home .dd-eyebrow { font-weight: 650; font-size: .72rem; letter-spacing: .15em; }
.dd-home .dd-hero h1 { max-width: 11ch; font-size: clamp(3.15rem, 6.1vw, 5.5rem); font-weight: 600; line-height: 1.04; letter-spacing: -.055em; }
.dd-home .dd-hero h1 > span { display: block; color: var(--dd-soft-accent); }
.dd-home .dd-hero .dd-lede { max-width: 44ch; font-size: clamp(1.05rem, 1.35vw, 1.22rem); line-height: 1.7; margin-top: 1.65rem; }
.dd-home .dd-hero .dd-actions { gap: .75rem; align-items: flex-start; flex-direction: column; margin-top: 1.7rem; }
.dd-home .dd-button { gap: 1.25rem; font-weight: 650; padding: .9rem 1.2rem; transition: transform 200ms var(--dd-ease), background 200ms var(--dd-ease), border-color 200ms var(--dd-ease); }
.dd-home .dd-button-arrow { font-size: 1.35rem; line-height: 1; transition: transform 200ms var(--dd-ease); }
.dd-home .dd-button:hover { transform: translateY(-2px); background: var(--dd-soft-accent); border-color: var(--dd-soft-accent); }
.dd-home .dd-button:hover .dd-button-arrow { transform: translate(2px, -2px); }
.dd-home .dd-button:active { transform: translateY(0); }
.dd-home .dd-button:disabled { opacity: .65; cursor: wait; transform: none; }
.dd-home .dd-text-link { font-size: .95rem; text-decoration-color: var(--dd-flow-line); transition: color 180ms var(--dd-ease), text-decoration-color 180ms var(--dd-ease); }
.dd-home .dd-text-link:hover { color: var(--dd-soft-accent); text-decoration-color: currentColor; }
.dd-home .dd-hero-person { display: flex; align-items: center; gap: .8rem; margin-top: 1.8rem; }
.dd-home .dd-hero-person img { display: block; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.dd-home .dd-hero-person p { margin: 0; font-size: .85rem; line-height: 1.5; }
.dd-home .dd-hero-person strong { display: block; font-weight: 650; }
.dd-home .dd-hero-person p > span { display: block; color: var(--dd-paper-300); font-size: .73rem; }
/* The diagram is readable in full before JavaScript enhances it. */
.dd-home .dd-system-map { position: relative; padding: clamp(1.25rem, 2.5vw, 2rem); background: var(--dd-flow-surface); border: 1px solid var(--dd-flow-line); border-radius: .9rem; box-shadow: 0 24px 60px oklch(12% .01 185 / .2); }
.dd-home .dd-flow-caption { display: flex; justify-content: space-between; gap: 1rem; color: var(--dd-soft-accent); font-size: .65rem; text-transform: uppercase; letter-spacing: .12em; }
.dd-home .dd-flow-caption > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dd-home .dd-system-map h2 { margin: 1rem 0 1.25rem; color: var(--dd-paper-100); font-size: clamp(1.7rem, 2.5vw, 2.25rem); line-height: 1.12; letter-spacing: -.035em; font-weight: 600; }
.dd-home .dd-message { display: flex; align-items: center; gap: .65rem; padding: .85rem 1rem; background: oklch(30% .04 185); border: 1px solid var(--dd-flow-line); border-radius: .6rem .6rem .6rem 0; font-size: .92rem; }
.dd-home .dd-message svg { flex-shrink: 0; color: var(--dd-soft-accent); }
.dd-home .dd-message small { margin-left: auto; color: var(--dd-paper-300); font-size: .65rem; }
.dd-home .dd-system-flow { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: 0; }
.dd-home .dd-system-step { position: relative; display: flex; align-items: center; gap: .85rem; min-height: 70px; padding: .65rem .4rem; border: 0; background: transparent; box-shadow: none; }
.dd-home .dd-system-step::after { content: ''; position: absolute; left: 1.4rem; top: calc(50% + 18px); bottom: -17px; width: 1px; background: var(--dd-flow-line); transform-origin: top; }
.dd-home .dd-system-step:last-child::after { content: none; }
.dd-home .dd-step-number { position: relative; z-index: 1; flex: 0 0 34px; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--dd-flow-line); border-radius: 50%; background: var(--dd-flow-surface); color: var(--dd-paper-300); font-size: .65rem; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.dd-home .dd-step-copy { display: block; min-width: 0; text-align: left; text-transform: none; letter-spacing: normal; }
.dd-home .dd-step-copy > span { color: var(--dd-paper-300); font-size: .64rem; font-weight: 500; letter-spacing: .09em; }
.dd-home .dd-step-copy strong { margin-top: .1rem; color: var(--dd-paper-100); font-size: .91rem; font-weight: 600; line-height: 1.4; }
.dd-home .dd-step-check { margin-left: auto; color: var(--dd-soft-accent); opacity: 0; transform: scale(.8); transition: transform 220ms var(--dd-ease), opacity 220ms var(--dd-ease); }
.dd-home .dd-step-control { display: flex; align-items: center; gap: .85rem; width: 100%; min-height: 58px; padding: .4rem; border: 1px solid transparent; border-radius: .4rem; background: transparent; color: inherit; cursor: pointer; font: inherit; transition: background 180ms var(--dd-ease), border-color 180ms var(--dd-ease); }
.dd-home .dd-system-step:has(.dd-step-control) { padding: .15rem 0; }
.dd-home .dd-step-control:hover { background: oklch(28% .03 185); }
.dd-home .dd-system-step.is-active .dd-step-control { background: oklch(28% .04 185); border-color: var(--dd-flow-line); }
.dd-home .dd-system-step.is-active .dd-step-number { background: var(--dd-soft-accent); color: var(--dd-ink-950); border-color: var(--dd-soft-accent); }
.dd-home .dd-system-step.is-complete .dd-step-number { color: var(--dd-soft-accent); border-color: var(--dd-soft-accent); }
.dd-home .dd-system-step.is-active.is-complete .dd-step-number { color: var(--dd-ink-950); }
.dd-home .dd-system-step.is-complete::after { background: var(--dd-soft-accent); }
.dd-home .dd-system-step.is-complete .dd-step-check { opacity: 1; transform: none; }
.dd-home .dd-flow-detail { min-height: 5rem; padding: .85rem 0 .6rem; border-top: 1px solid var(--dd-flow-line); }
.dd-home .dd-flow-detail p { margin: 0; color: var(--dd-paper-300); font-size: .85rem; line-height: 1.55; max-width: 48ch; }
.dd-home .dd-flow-toolbar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; min-height: 44px; font-size: .65rem; color: var(--dd-paper-300); }
.dd-home .dd-flow-replay { min-height: 44px; display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .2rem .4rem .5rem; background: transparent; border: 0; color: var(--dd-soft-accent); font: inherit; font-size: .75rem; cursor: pointer; }
.dd-home .dd-flow-replay[hidden] { display: none; }
.dd-home .dd-flow-replay > span { font-size: 1.25rem; }
.dd-home .dd-system-note { margin: .3rem 0 0; font-size: .68rem; line-height: 1.5; color: var(--dd-paper-300); }
/* Varied section rhythm and stronger differentiation for the featured work. */
.dd-home .dd-section { padding-block: clamp(3.5rem, 7vw, 6rem); }
.dd-home .dd-section-heading { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: clamp(2rem, 6vw, 5rem); margin-bottom: 2.5rem; }
.dd-home .dd-section-heading h2 { font-weight: 600; font-size: clamp(2rem, 3.9vw, 3.5rem); line-height: 1.12; }
.dd-home .dd-section-heading > p { font-size: 1rem; }
.dd-home .dd-evidence { border: 0; background: none; gap: 2.5rem; }
.dd-home .dd-evidence article { padding: 1.5rem 0 0; border-top: 1px solid var(--dd-flow-line); background: transparent; }
.dd-home .dd-evidence strong { font-size: clamp(2.2rem, 4vw, 3.5rem); font-weight: 550; letter-spacing: -.04em; }
.dd-home .dd-evidence p { font-size: .95rem; max-width: 29ch; }
.dd-home .dd-evidence small { font-size: .74rem; }
.dd-home [data-home-section="case-study"] { background: var(--dd-flow-surface); border: 1px solid var(--dd-flow-line); border-radius: .75rem; padding: clamp(1.5rem, 4vw, 3.5rem); margin-block: 1rem clamp(2rem, 5vw, 4rem); }
.dd-home .dd-featured-case { gap: clamp(2rem, 4vw, 4rem); align-items: center; }
.dd-home .dd-featured-case h3 { font-weight: 600; font-size: clamp(1.9rem, 3.5vw, 3rem); letter-spacing: -.035em; }
.dd-home .dd-featured-case p, .dd-home .dd-featured-case li { font-size: .95rem; }
.dd-home .dd-featured-case ul { padding-left: 1.2rem; }
.dd-home .dd-featured-case li + li { margin-top: .5rem; }
.dd-home .dd-case-facts { background: transparent; padding: 0; border: 0; }
.dd-home .dd-case-facts div { padding: 1.2rem 0; }
.dd-home .dd-case-facts dd { font-size: 1rem; }
.dd-home .dd-route { position: relative; transition: background 180ms var(--dd-ease); }
.dd-home .dd-route h3 { font-weight: 600; letter-spacing: -.02em; transition: color 180ms var(--dd-ease), transform 220ms var(--dd-ease); }
.dd-home .dd-route p { font-size: .95rem; }
.dd-home .dd-route-arrow { display: inline-block; transition: transform 220ms var(--dd-ease); }
.dd-home .dd-route:hover h3 { transform: translateX(5px); }
.dd-home .dd-route:hover .dd-route-arrow { transform: translateX(5px); }
.dd-home .dd-process { gap: 2.5rem; }
.dd-home .dd-process article { position: relative; border-top-width: 1px; padding-top: 1.75rem; }
.dd-home .dd-process article::before { content: ''; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--dd-cyan-400); }
.dd-home .dd-process h3 { font-weight: 600; font-size: 1.25rem; }
.dd-home .dd-process p { font-size: .95rem; }
.dd-home .dd-about { grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); align-items: center; }
.dd-home .dd-portrait { border-radius: .5rem; }
.dd-home .dd-about-copy h2 { margin: 1rem 0 1.5rem; font-weight: 600; letter-spacing: -.04em; }
.dd-home #contact { scroll-margin-top: 2rem; }
.dd-home #contact .dd-section-heading h2 { color: var(--dd-soft-accent); }
.dd-home .contact-form { max-width: 100%; }
.dd-home .contact-form input, .dd-home .contact-form textarea { transition: border-color 180ms var(--dd-ease), background 180ms var(--dd-ease); }
.dd-home .contact-form input:focus, .dd-home .contact-form textarea:focus { border-color: var(--dd-cyan-400); background: var(--dd-flow-surface); }
.dd-home .contact-fallback { width: 100%; margin-top: 2rem; }
/* Content starts visible. JS adds one-time animations only upon intersection. */
@keyframes dd-enter { from { opacity: 1; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes dd-connect { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes dd-step-enter { from { transform: scale(.92); } to { transform: scale(1); } }
@media (prefers-reduced-motion: no-preference) {
  .dd-home .dd-is-entering { animation: dd-enter 650ms var(--dd-ease) both; }
  .dd-home .dd-system-step.is-complete::after { animation: dd-connect 500ms var(--dd-ease); }
  .dd-home .dd-system-step.is-active .dd-step-number { animation: dd-step-enter 350ms var(--dd-ease); }
  .dd-home .landing-header nav[data-open="true"] { animation: dd-enter 220ms var(--dd-ease); }
}
@media (max-width: 1000px) and (min-width: 781px) {
  .dd-home .dd-hero { gap: 2rem; grid-template-columns: 1fr 1fr; }
  .dd-home .dd-hero h1 { font-size: clamp(3rem, 6vw, 4.5rem); }
  .dd-home .dd-system-map { padding: 1.25rem; }
  .dd-home .dd-message { flex-wrap: wrap; }
  .dd-home .dd-flow-detail { min-height: 6.2rem; }
}
@media (max-width: 780px) {
  .dd-home .dd-hero { grid-template-columns: 1fr; gap: 2.75rem; padding-top: 3rem; }
  .dd-home .dd-hero h1 { font-size: clamp(3rem, 11.5vw, 5rem); max-width: 12ch; }
  .dd-home .dd-hero .dd-lede { max-width: 50ch; }
  .dd-home .dd-hero-person { margin-top: 1.25rem; }
  .dd-home .dd-system-map { width: 100%; max-width: 34rem; justify-self: center; }
  .dd-home .dd-section-heading, .dd-home .dd-about { grid-template-columns: 1fr; gap: 1.5rem; }
  .dd-home .dd-evidence { gap: 1.5rem; }
  .dd-home .dd-evidence article { display: grid; grid-template-columns: 7.5rem 1fr; column-gap: 1.25rem; }
  .dd-home .dd-evidence strong { grid-row: span 2; font-size: 2.2rem; }
  .dd-home .dd-evidence p { margin: 0 0 .5rem; }
  .dd-home .dd-route { gap: .65rem 1rem; }
  .dd-home .dd-route p { grid-column: 2; }
  .dd-home .dd-route-arrow { grid-column: 3; grid-row: 1 / span 2; }
  .dd-home .dd-process { gap: 1.75rem; }
  .dd-home .dd-portrait { max-width: 23rem; }
  .dd-home .dd-featured-case { grid-template-columns: 1fr; }
  .dd-home .dd-flow-detail { min-height: 5.5rem; }
}
@media (max-width: 360px) {
  .dd-home .dd-system-map { padding: 1rem; }
  .dd-home .dd-message { padding: .75rem; flex-wrap: wrap; }
  .dd-home .dd-step-control { gap: .55rem; }
  .dd-home .dd-step-copy strong { font-size: .84rem; }
  .dd-home .dd-flow-detail { min-height: 6.5rem; }
  .dd-home .dd-evidence article { grid-template-columns: 6.25rem 1fr; gap: .75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dd-home *, .dd-home *::before, .dd-home *::after { animation: none !important; transition: none !important; }
  .dd-home .dd-route:hover h3, .dd-home .dd-route:hover .dd-route-arrow,
  .dd-home .dd-button:hover, .dd-home .dd-button:hover .dd-button-arrow { transform: none; }
}
