/* v6: contact card shape (both themes) and a solid-color dark theme. */

/* Contact + footer become one rounded card instead of a full-bleed blue block. */
.contact,
.site-footer {
  margin-inline: var(--gutter);
  background: #2a46d6;
}

.contact {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 40px 40px 0 0;
}

.site-footer {
  margin-bottom: var(--gutter);
  border-radius: 0 0 40px 40px;
}

/* Concentric arcs echo the brand's refraction curve without adding new colors. */
.contact:before {
  content: '';
  position: absolute;
  z-index: -1;
  top: -340px;
  right: -260px;
  width: 760px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid #ffffff33;
  box-shadow: 0 0 0 90px #ffffff0a, 0 0 0 180px #ffffff06;
  pointer-events: none;
}

.contact > .wrap {
  position: relative;
}

@media (max-width: 760px) {
  .contact {
    border-radius: 28px 28px 0 0;
  }

  .site-footer {
    border-radius: 0 0 28px 28px;
  }

  .contact:before {
    top: -220px;
    right: -260px;
    width: 460px;
    box-shadow: 0 0 0 60px #ffffff0a, 0 0 0 120px #ffffff06;
  }
}

/* Dark theme: deep night, neutral greys and the brand blue as a solid accent. */
[data-theme=dark],
[data-theme=dark] .galaxy-hero {
  --night: #06070c;
  --night-raised: #10131c;
  --paper: #08090f;
  --white: #10131c;
  --ink: #f5f6fb;
  --muted: #a4a8b6;
  --line: #22273a;
  --blue: #6a85ff;
  --blue-hover: #8a9fff;
  --blue-soft: #131a3a;
  --bg: #08090f;
  --surface: #10131c;
  --text: #f5f6fb;
  --text-secondary: #a4a8b6;
  --border: #262b3d;
  --action: #3355ff;
  --action-hover: #4a68ff;
  --on-action: #fff;
  --on-action-hover: #fff;
  --secondary-hover: #ffffff12;
  --on-secondary-hover: #fff;
  --focus: #8a9fff;
}

[data-theme=dark] ::selection {
  background: #3355ff;
  color: #fff;
}

/* Header */
[data-theme=dark] .site-header {
  background: #07080dcc;
  border-bottom-color: #ffffff0f;
}

[data-theme=dark] .nav-links a {
  color: #c3c6d2;
  transition: color var(--duration-fast);
}

[data-theme=dark] .nav-links a:hover {
  color: #fff;
}

[data-theme=dark] .theme-toggle,
[data-theme=dark] .menu-toggle {
  background: #ffffff0a;
  border-color: #ffffff1f;
  color: #e9eaf2;
}

[data-theme=dark] .theme-toggle:hover,
[data-theme=dark] .menu-toggle:hover {
  background: #ffffff14;
  border-color: #ffffff38;
  color: #fff;
}

/* Buttons: solid brand blue, white label. */
[data-theme=dark] .btn:not(.ghost):not(.secondary) {
  background: var(--action);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 30px -14px #3355ffcc;
}

[data-theme=dark] .btn:not(.ghost):not(.secondary):hover {
  background: var(--action-hover);
  color: #fff;
}

[data-theme=dark] .btn.secondary {
  background: #ffffff08;
  border-color: #ffffff26;
  color: #fff;
}

[data-theme=dark] .btn.secondary:hover {
  background: #ffffff12;
  border-color: #ffffff47;
  color: #fff;
}

[data-theme=dark] .btn.ghost {
  color: #f5f6fb;
}

[data-theme=dark] .btn.ghost:hover {
  color: #fff;
  text-decoration-color: var(--blue);
  text-decoration-thickness: 1.5px;
}

[data-theme=dark] .contact .btn:not(.ghost):not(.secondary),
[data-theme=dark] .contact .btn:not(.ghost):not(.secondary):hover {
  background: #d9f991;
  color: #17191e !important;
  box-shadow: none;
}

[data-theme=dark] .contact .btn:not(.ghost):not(.secondary):hover {
  background: #e5ffb2;
}

/* Highlighted words: one solid, vivid blue. */
[data-theme=dark] .hero h1 em,
[data-theme=dark] .hero-signature i {
  /* Same blue as the primary buttons, so the accent reads as one color. */
  color: var(--action);
  text-shadow: none;
}

[data-theme=dark] .hero .eyebrow .dot {
  background: var(--blue);
  box-shadow: 0 0 0 6px #6a85ff24;
}

[data-theme=dark] .hero-copy p {
  color: #b4b8c6;
}

/* Strip, services, process */
[data-theme=dark] .service-strip {
  background: #0b0d15;
  color: #e9eaf2;
  border-block: 1px solid #ffffff0d;
}

[data-theme=dark] .strip-inner i {
  color: var(--blue);
}

[data-theme=dark] .service-row:hover {
  background: linear-gradient(90deg, #3355ff1c, #3355ff08 60%, transparent);
}

[data-theme=dark] .service-row .arrow,
[data-theme=dark] summary:after {
  color: var(--blue);
}

[data-theme=dark] .system-callout {
  background: #11173a;
  border: 1px solid #3355ff33;
}

/* Showcase */
[data-theme=dark] .showcase {
  background: var(--night);
}

[data-theme=dark] .showcase .eyebrow {
  color: var(--blue);
}

[data-theme=dark] .work {
  border-color: #ffffff17;
}

[data-theme=dark] .work-meta {
  background: #0f121b;
}

/* Contact card */
[data-theme=dark] .contact,
[data-theme=dark] .site-footer {
  background: #2440cc;
}

[data-theme=dark] .contact .eyebrow,
[data-theme=dark] .contact p {
  color: #dfe4ff;
}

/* Preview bar and scroll progress */
[data-theme=dark] .preview-bar {
  background: #10131ce6;
  border-color: #ffffff1a;
  backdrop-filter: blur(14px);
}

[data-theme=dark] .preview-bar button {
  background: var(--action);
  color: #fff;
}

[data-theme=dark] .progress-track {
  background: var(--action);
}

/* ---------- Design review polish (both themes) ---------- */

/* One light background temperature: the hero fades into the same paper as the rest of the page. */
:root[data-theme="light"] .site-header {
  background: #f6f5f1e6;
}

:root[data-theme="light"] .galaxy-hero {
  background: linear-gradient(180deg, #f2f1fa 0%, #f3f2f7 72%, var(--paper) 100%);
}

/* Hero hierarchy: the signature line supports the H1 instead of competing with it. */
.hero-signature {
  padding: 96px 0 64px;
}

.hero-signature p {
  font-size: clamp(40px, 5.2vw, 76px);
}

.hero-signature:before {
  bottom: 72px;
}

/* Small mono labels were 8–10px: raise them to a readable minimum. */
.hero-bottom,
.hero-signature > .eyebrow,
.hero-signature .signature-end {
  font-size: 11px;
}

.hero-bottom {
  color: var(--text-secondary);
}

/* Section titles share one scale. */
.faq h2 {
  font-size: var(--heading);
}

.faq {
  padding-top: 112px;
}

/* Process: the animated rule sits on the existing hairline instead of doubling it. */
.process-step:before {
  height: 1px;
  top: -1px;
}

@media (max-width: 1050px) {
  .hero-signature p {
    font-size: 56px;
  }
}

@media (max-width: 760px) {
  .hero-signature {
    padding: 72px 0 40px;
  }

  .hero-signature p {
    font-size: 44px;
  }

  .hero-bottom,
  .hero-signature .signature-end {
    font-size: 10px;
  }

  .faq {
    padding-top: 64px;
  }
}

/* Dark: sections that sat on the same black now read as distinct planes. */
[data-theme=dark] .showcase {
  background: #0c0f17;
  border-block: 1px solid #ffffff0d;
}

[data-theme=dark] .work-meta {
  background: #131722;
}

[data-theme=dark] .site-header {
  border-bottom-color: #ffffff12;
}

/* Preview bar tucks away while reading. */
.preview-bar {
  transition: transform 420ms var(--ease), opacity 300ms var(--ease);
}

.preview-bar.is-tucked {
  transform: translate(-50%, calc(100% + 24px));
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .preview-bar {
    transition: none;
  }
}

/* ---------- Content hierarchy ---------- */

/* Hero: one message per screen. The intro is centred and the studio line sits at the bottom. */
.galaxy-hero {
  display: flex;
  flex-direction: column;
  min-height: min(calc(100svh - var(--header-height)), 900px);
}

.galaxy-hero > .wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.galaxy-hero .hero-intro {
  flex: 1;
  padding: 40px 0 72px;
}

/* The brand line now titles the showcase; its accent matches the buttons. */
.showcase h2 em {
  font-style: normal;
  color: #3355ff;
}

/* Fewer orphans and awkward breaks everywhere. */
h1,
h2,
h3,
summary {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .galaxy-hero {
    min-height: calc(100svh - var(--header-height));
  }

  .galaxy-hero .hero-intro {
    padding: 8px 0 48px;
    gap: 28px;
    align-content: center;
  }

  .hero h1 {
    font-size: clamp(42px, 12.5vw, 64px);
    line-height: 1.02;
    margin-top: 20px;
  }

  .hero-copy p {
    font-size: 16px;
    line-height: 1.6;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .hero-actions .btn:not(.ghost) {
    justify-content: space-between;
  }

  .hero-actions .btn.ghost {
    justify-content: center;
    min-height: 48px;
  }

  .hero-bottom {
    padding: 18px 0 22px;
  }

  /* Header: lighter controls so the logo leads. */
  .theme-toggle,
  .menu-toggle {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 12px;
  }

  /* Section heads: give the supporting line room under the title. */
  .section-head h2 {
    font-size: clamp(34px, 9.6vw, 44px);
  }

  .section-head > p,
  .section-head .muted {
    margin-top: 16px;
    font-size: 15px;
  }

  /* Services: title and text share one column, the arrow stays on the title line. */
  .service-row {
    grid-template-columns: 32px 1fr 20px;
    column-gap: 12px;
    row-gap: 10px;
    padding-block: 24px;
  }

  .service-row h3 {
    font-size: 21px;
    line-height: 1.15;
  }

  .service-row .num {
    padding-top: 6px;
  }

  .service-row p {
    font-size: 15px;
    line-height: 1.55;
    max-width: none;
  }

  /* Process: smaller step titles, numbers aligned to them. */
  .process-title h2 {
    font-size: clamp(34px, 9.6vw, 44px);
  }

  .process-title p {
    font-size: 15px;
  }

  .process-step {
    grid-template-columns: 36px 1fr;
    gap: 8px;
    padding: 28px 0;
  }

  .process-step .eyebrow {
    padding-top: 6px;
  }

  .process-step h3 {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .process-step p {
    font-size: 15px;
    line-height: 1.55;
  }

  .system-callout {
    padding: 22px;
  }

  /* FAQ */
  .faq h2 {
    font-size: clamp(34px, 9.6vw, 44px);
  }

  summary {
    font-size: 16px;
    line-height: 1.35;
  }

  details p {
    font-size: 15px;
    margin-right: 0;
  }

  /* Showcase */
  .work-meta h3 {
    font-size: 18px;
  }

  /* Contact */
  .contact h2 {
    font-size: clamp(40px, 11.5vw, 56px);
    line-height: 1.02;
  }

  .contact p {
    font-size: 16px;
  }
}

/* ---------- Logo: one lockup, N symbol + "ovuns" in a single SVG ---------- */
.logo.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-size: 0;
  line-height: 0;
}

.logo .logo-mark {
  display: block;
  height: 26px;
  width: auto;
  flex: none;
  overflow: visible;
}

.logo-mark .logo-n {
  fill: var(--blue);
}

.logo-mark .logo-word {
  font-family: var(--font);
  font-weight: 800;
  font-size: 64px;
  letter-spacing: -3.5px;
  fill: currentColor;
}

[data-theme=dark] .logo-mark .logo-n,
.site-footer .logo-mark .logo-n {
  fill: currentColor;
}

.site-footer .logo-lockup {
  color: #fff;
}

/* ---------- Header: links in the middle, all actions grouped on the right ---------- */
.nav {
  gap: 24px;
}

.nav-links {
  margin-inline: auto;
}

.nav-links a {
  position: relative;
  padding-block: 6px;
}

.nav-links a.is-current {
  color: var(--text);
}

.nav-links a.is-current:after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  border-radius: 2px;
  background: var(--action);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.nav-cta {
  display: none;
}

.theme-toggle.theme-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
}

.theme-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon .icon-moon {
  fill: currentColor;
  stroke: none;
}

[data-theme=dark] .theme-icon .icon-moon,
[data-theme=light] .theme-icon .icon-sun {
  display: none;
}

/* The header CTA joins once the hero's CTA has scrolled away. */
.header-cta {
  transition: opacity 260ms var(--ease), transform 260ms var(--ease), visibility 260ms;
}

.site-header:not(.show-cta) .header-cta {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
}

/* ---------- Service rows and project cards open the brief for that service ---------- */
.service-row {
  cursor: pointer;
}

.work-meta {
  align-items: center;
}

.work-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid #ffffff2e;
  border-radius: var(--radius-pill);
  background: transparent;
  color: #fff;
  font: 600 13px var(--font);
  cursor: pointer;
  transition: background var(--duration-fast), border-color var(--duration-fast);
}

.work-cta:hover {
  background: #ffffff14;
  border-color: #ffffff5c;
}

/* ---------- Footer: brand + nav on top, credits + back-to-top below ---------- */
.footer-top {
  align-items: flex-start;
}

.footer-brand {
  display: grid;
  gap: 14px;
}

.footer-brand p {
  font-size: 13px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.footer-nav a,
.to-top {
  color: #fff;
  font-size: 14px;
  text-decoration: none;
  opacity: .85;
}

.footer-nav a:hover,
.to-top:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 28px;
}

.footer-bottom p {
  margin: 0;
  font-size: 11px;
  color: #e0e6ff;
}

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .logo .logo-mark {
    height: 22px;
  }

  .nav-links {
    margin: 0;
    gap: 4px;
  }

  .nav-links a {
    width: 100%;
  }

  .nav-links a.is-current:after {
    display: none;
  }

  .site-header .nav-links .nav-cta {
    display: inline-flex;
    width: 100%;
    justify-content: space-between;
    margin-top: 16px;
  }

  .nav-actions {
    gap: 8px;
  }

  .header-cta {
    display: none;
  }

  .work-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .work-cta {
    width: 100%;
    justify-content: space-between;
  }

  .footer-top {
    gap: 28px;
  }

  .footer-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
  }

  .footer-bottom {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 12px;
  }
}

/* ---------- Header geometry: true centre for the links, actions flush to the right edge ---------- */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.nav > .logo {
  justify-self: start;
}

.nav-actions {
  justify-self: end;
}

/* Theme toggle is always the last item, so its distance to the edge matches the logo's. */
.header-cta {
  order: -1;
}

@media (min-width: 761px) {
  .nav-links,
  [data-theme=dark] .nav-links {
    margin: 0;
    background: none;
  }
}

/* Glass header: one continuous translucent surface, nothing inside it paints its own box. */
.site-header {
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
}

:root[data-theme="light"] .site-header {
  background: #f6f5f1b8;
  border-bottom-color: #17191e10;
}

[data-theme=dark] .site-header {
  background: #08090fa6;
}

@media (max-width: 760px) {
  .nav {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    backdrop-filter: saturate(160%) blur(18px);
  }

  :root[data-theme="light"] .nav-links {
    background: #f6f5f1f2;
  }

  [data-theme=dark] .nav-links {
    background: #08090ff2;
  }
}

/* ---------- Motion system ----------
   One easing, two durations. Entrances fade up a short distance, grouped items follow in order,
   hovers respond immediately. Nothing rotates, scales in or loops for decoration. */
:root {
  --motion-ease: cubic-bezier(.16, 1, .3, 1);
  --motion-enter: 820ms;
  --motion-hover: 240ms;
  --motion-step: 70ms;
}

.motion-ready .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity var(--motion-enter) var(--motion-ease) var(--delay, 0ms),
    transform var(--motion-enter) var(--motion-ease) var(--delay, 0ms);
}

.motion-ready .reveal.visible {
  opacity: 1;
  transform: none;
}

.motion-ready .service-row.reveal,
.motion-ready .process-step.reveal,
.motion-ready .work.reveal {
  clip-path: none !important;
  transform: translateY(22px);
  transition:
    opacity var(--motion-enter) var(--motion-ease) var(--delay, 0ms),
    transform var(--motion-enter) var(--motion-ease) var(--delay, 0ms),
    background var(--motion-hover) ease-out 0s,
    border-color var(--motion-hover) ease-out 0s !important;
}

.motion-ready .service-row.visible,
.motion-ready .process-step.visible,
.motion-ready .work.visible {
  transform: none;
}

/* Masked headline lines keep room for descenders (g, p, ç) so nothing is clipped. */
.section-head h2 .line-reveal,
.kinetic-mask,
.hero h1 .word-mask {
  padding-bottom: .2em;
  margin-bottom: -.2em;
}

.motion-ready .section-head h2 .line-reveal span {
  transform: translateY(110%);
  transition: transform 900ms var(--motion-ease) !important;
  transition-delay: calc(var(--i, 0) * 90ms) !important;
}

.motion-ready .section-head.visible h2 .line-reveal span {
  transform: none;
}

.kinetic-word {
  transition: transform 900ms var(--motion-ease), opacity 700ms var(--motion-ease);
  transition-delay: calc(var(--word, 0) * 45ms);
}

/* Hero entrance: eyebrow, title lines, copy and actions arrive once, in reading order. */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@keyframes line-in {
  from {
    transform: translateY(105%);
  }
}

.motion-ready .hero .eyebrow {
  animation: rise-in 700ms var(--motion-ease) both;
}

.motion-ready .hero h1 .word-mask > span {
  animation: line-in 1000ms var(--motion-ease) both !important;
  animation-delay: calc(120ms + var(--i, 0) * 110ms) !important;
  opacity: 1 !important;
}

.motion-ready .hero-copy p {
  animation: rise-in 800ms var(--motion-ease) 380ms both;
}

.motion-ready .hero-actions {
  animation: rise-in 800ms var(--motion-ease) 480ms both;
}

.motion-ready .hero-bottom {
  animation: rise-in 800ms var(--motion-ease) 620ms both;
}

/* Project cards: mockups sit straight; on hover they lift a little and the card edge brightens. */
.browser-mock,
.phone {
  transform: none;
  transition: transform 600ms var(--motion-ease), box-shadow 600ms var(--motion-ease);
}

.work:hover .browser-mock,
.work:hover .phone,
.work:focus-within .browser-mock,
.work:focus-within .phone {
  transform: translateY(-8px);
  box-shadow: 0 40px 60px -20px #0006;
}

.work {
  transition: border-color var(--motion-hover) ease-out;
}

.work:hover,
.work:focus-within {
  border-color: #ffffff40;
}

/* Service rows: immediate, small feedback. */
.service-row h3,
.service-row .arrow {
  transition: transform var(--motion-hover) var(--motion-ease) !important;
}

/* Buttons: a short lift on hover, none on press. */
.btn {
  transition:
    transform var(--motion-hover) var(--motion-ease),
    background-color var(--motion-hover) ease-out,
    color var(--motion-hover) ease-out,
    border-color var(--motion-hover) ease-out,
    box-shadow var(--motion-hover) ease-out;
}

.btn:active {
  transform: translateY(0) scale(.98);
}

.motion-off .hero .eyebrow,
.motion-off .hero h1 .word-mask > span,
.motion-off .hero-copy p,
.motion-off .hero-actions,
.motion-off .hero-bottom {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .hero .eyebrow,
  .hero h1 .word-mask > span,
  .hero-copy p,
  .hero-actions,
  .hero-bottom {
    animation: none !important;
  }

  .browser-mock,
  .phone,
  .btn {
    transition: none;
  }
}

/* ---------- Focus and form fields ----------
   One focus language: fields swap to the brand border with a soft halo (no ring stacked on a border);
   buttons and links get a ring that sits clear of their edge. */
:is(a, button, summary):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  transition: border-color var(--motion-hover) ease-out, box-shadow var(--motion-hover) ease-out, background-color var(--motion-hover) ease-out;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: color-mix(in srgb, var(--action) 45%, var(--border));
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--action);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--action) 18%, transparent);
}

.field select {
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8f9c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-secondary);
  opacity: .7;
}

.field [aria-invalid=true] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 16%, transparent);
}

[data-theme=dark] .field input,
[data-theme=dark] .field select,
[data-theme=dark] .field textarea {
  background-color: #0d1018;
  border-color: #2a3042;
}

.brief-form .field {
  font-weight: 600;
  font-size: 13px;
}

.close-btn {
  transition: background-color var(--motion-hover) ease-out, border-color var(--motion-hover) ease-out;
}

.close-btn:hover {
  background: var(--secondary-hover);
}

/* ---------- Hero composition: a diagonal ----------
   The title anchors the upper left; copy and its single CTA sit lower right, sharing one left edge. */
@media (min-width: 1051px) {
  .galaxy-hero .hero-intro {
    align-items: stretch;
    padding: 48px 0 56px;
  }

  .galaxy-hero .hero-intro > div:first-child {
    align-self: start;
  }

  .galaxy-hero .hero-copy {
    align-self: end;
    justify-self: end;
    margin: 0;
    padding: 0 0 8px;
    max-width: 380px;
  }
}

.galaxy-hero .hero-copy p {
  margin: 0;
}

.galaxy-hero .hero-actions {
  margin-top: 28px;
}

/* Tablet: stacked, but the copy block still steps in from the title. */
@media (min-width: 761px) and (max-width: 1050px) {
  .galaxy-hero .hero-copy {
    margin-left: auto;
    max-width: 420px;
    padding-top: 24px;
  }
}

@media (max-width: 760px) {
  .galaxy-hero .hero-actions {
    margin-top: 24px;
  }
}

/* Phones: the sky frames only the introduction; the next section peeks in below it. */
@media (max-width: 760px) {
  /* The first screen ends exactly where the service strip ends, on any phone height.
     svh keeps it stable while the browser bars show and hide. */
  .galaxy-hero {
    min-height: calc(100svh - var(--header-height) - var(--strip-height, 82px));
  }

  .galaxy-hero .hero-intro {
    flex: 1;
    align-content: center;
    padding: 32px 0 40px;
    gap: 56px;
  }

  .galaxy-hero .hero-bottom {
    padding: 14px 0 16px;
  }
}

/* ---------- Service strip: an endless loop ----------
   The list is repeated as many times as the screen needs (polish-v6.js) and the track moves by exactly
   one copy, so new text always enters from the right and there is never an empty end. Edge to edge. */
.service-strip .strip-inner {
  width: 100%;
}

.service-strip .marquee-track {
  gap: 0;
  animation-name: marquee-loop;
  animation-duration: var(--marquee-duration, 42s);
}

.service-strip .marquee-set {
  padding-right: 42px;
}

@keyframes marquee-loop {
  to { transform: translateX(calc(-1 * var(--marquee-shift, 50%))); }
}

.motion-off .service-strip .marquee-track {
  animation: none;
}

@media (max-width: 760px) {
  .service-strip .marquee-set { padding-right: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .service-strip .marquee-track { animation: none; }
}

/* ---------- Closing card: three starter packages ----------
   Replaces the generic "start my project" ending with a concrete first step.
   Cards sit on the brand blue: two light, the middle one inverted (ink) as the recommended choice. */
.contact {
  padding: 96px 0 72px;
}

.plans-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 48px;
}

.plans-head h2 {
  margin: 0;
  font-size: clamp(44px, 6vw, 84px);
  line-height: .98;
}

.contact .plans-head > p {
  max-width: 36ch;
  margin: 0;
  color: #e0e6ff;
  font-size: 17px;
  line-height: 1.55;
}

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px;
  border-radius: 24px;
  background: #f6f5f1;
  color: #17191e;
  transition: transform var(--motion-hover) var(--motion-ease);
}

.plan:hover {
  transform: translateY(-4px);
}

.plan.featured {
  background: #10131c;
  color: #f5f6fb;
}

.plan-badge {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #d9f991;
  color: #17191e;
  font: 600 11px var(--font);
}

.plan-tag {
  font: 500 11px var(--mono, monospace);
  letter-spacing: .1em;
  opacity: .55;
}

.plan h3 {
  margin: 10px 0 8px;
  font-size: 30px;
  letter-spacing: -.03em;
  line-height: 1;
}

.contact .plan header p {
  margin: 0;
  color: inherit;
  opacity: .7;
  font-size: 14px;
  line-height: 1.5;
}

.plan-price {
  display: grid;
  gap: 2px;
  padding-block: 18px;
  border-block: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.plan-price small {
  font-size: 12px;
  opacity: .6;
}

.plan-price strong {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -.04em;
  line-height: 1;
}

.plan ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.plan li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.plan li::before {
  content: '';
  flex: none;
  width: 14px;
  height: 8px;
  border-left: 2px solid #2a46d6;
  border-bottom: 2px solid #2a46d6;
  transform: rotate(-45deg) translateY(-2px);
}

.plan.featured li::before {
  border-color: #8a9fff;
}

.plan-cta {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #17191e;
  color: #fff;
  font: 600 15px var(--font);
  cursor: pointer;
  transition: background var(--motion-hover) ease-out, transform var(--motion-hover) var(--motion-ease);
}

.plan-cta:hover {
  background: #2a46d6;
}

.plan.featured .plan-cta {
  background: #3355ff;
}

.plan.featured .plan-cta:hover {
  background: #4a68ff;
}

.plans-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 28px;
}

.contact .plans-foot p {
  margin: 0;
  font-size: 13px;
  color: #c9d2ff;
}

.plans-talk {
  flex: none;
  border: 0;
  background: none;
  padding: 8px 0;
  color: #fff;
  font: 600 15px var(--font);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  cursor: pointer;
}

.plans-talk:hover {
  text-decoration-thickness: 2px;
}

[data-theme=dark] .plan:not(.featured) {
  background: #f5f6fb;
}

[data-theme=dark] .plan.featured {
  background: #08090f;
}

@media (max-width: 1050px) {
  .plans {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .plans-head {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .contact {
    padding: 64px 0 48px;
  }

  .plans-head {
    gap: 16px;
    margin-bottom: 32px;
  }

  .plan {
    padding: 22px;
    gap: 20px;
  }

  .plan-price strong {
    font-size: 34px;
  }

  .plans-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .plan,
  .plan-cta {
    transition: none;
  }
}

/* Phone: packages become a swipe track, like the showcase. The next card peeks in from the right. */
@media (max-width: 760px) {
  .plans {
    display: flex;
    gap: 12px;
    max-width: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 8px;
    scroll-padding-inline: var(--gutter);
  }

  .plans::-webkit-scrollbar {
    display: none;
  }

  .plans .plan {
    flex: 0 0 min(84%, 340px);
    scroll-snap-align: start;
  }

  .plans .plan:hover {
    transform: none;
  }

  /* Cards to the side belong to the same group: they enter together. */
  .motion-ready .plans .plan.reveal {
    transform: translateX(24px);
  }

  .motion-ready .plans .plan.visible {
    transform: none;
  }
}
