/* mextmile.com: the product's public page. Colours follow the application's theme (src/frontend/src/index.css). */

:root {
  --blue: #008feb;
  --blue-deep: #0077c7;
  --ink: #020202;
  --gray: #58585a;
  --paper: #ffffff;
  --paper-cool: #f3f7fa;
  --line: #d9e2ea;
  --on-blue: #ffffff;

  --wide: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #eef3f7;
    --gray: #a9b4bf;
    --paper: #0d1720;
    --paper-cool: #13212d;
    --line: #26394a;
    --blue: #2ea3f2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #eef3f7;
  --gray: #a9b4bf;
  --paper: #0d1720;
  --paper-cool: #13212d;
  --line: #26394a;
  --blue: #2ea3f2;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--wide);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; }
a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Headings: the wide cut of Archivo, like lettering on a trailer. */
h1, h2, h3 {
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}
h1 { font-size: clamp(2.2rem, 5.4vw, 4.6rem); max-width: 17ch; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); max-width: 22ch; }
h3 { font-size: 1.15rem; font-weight: 700; line-height: 1.25; font-stretch: 112%; }

p { margin: 0; max-width: var(--measure); }

.intro { margin-top: 16px; color: var(--gray); font-size: 1.1rem; }

section { scroll-margin-top: 16px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-stretch: 125%;
  font-weight: 800;
  font-size: 1.2rem;
}
.brand svg { width: 34px; height: 34px; flex: none; }
.site-nav {
  margin-left: auto;
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 0.95rem;
}
.site-nav a { text-decoration: none; color: var(--gray); }
.site-nav a:hover { color: var(--ink); }
.site-nav .lang {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 8px;
  color: var(--ink);
}
@media (max-width: 760px) {
  .site-nav .section-link { display: none; }
}

/* Buttons */
.actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
}
.button {
  display: inline-block;
  background: var(--blue-deep);
  color: var(--on-blue);
  text-decoration: none;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: 8px;
}
.button:hover { background: #00609f; }
.button-quiet { display: inline-block; padding: 14px 4px; font-weight: 600; }

/* Hero: the statement, then the road from the logo laid out under it. */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(48px, 7vw, 88px); }
.hero .lead {
  margin-top: 28px;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: var(--gray);
  max-width: 44em;
}
.road-line {
  margin-top: clamp(48px, 7vw, 80px);
  height: 4px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--blue) 0 22px, transparent 22px 36px);
  transform-origin: left;
}
@media (prefers-reduced-motion: no-preference) {
  .road-line { animation: lay 1.6s cubic-bezier(.3, .7, .2, 1) 200ms both; }
}
@keyframes lay { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Experience: projects told as what they solved. */
.experience { padding: 0 0 clamp(56px, 8vw, 104px); }
.projects {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 5vw, 72px);
}
.projects li {
  border-top: 2px solid var(--ink);
  padding: 20px 0 36px;
}
.projects .for {
  margin-top: 6px;
  font-size: 0.95rem;
  color: var(--blue-deep);
  font-weight: 600;
}
.projects p:last-child { margin-top: 12px; color: var(--gray); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .projects .for { color: var(--blue); }
}
:root[data-theme="dark"] .projects .for { color: var(--blue); }
@media (max-width: 760px) {
  .projects { grid-template-columns: minmax(0, 1fr); }
}

/* Areas: a plain list of what we know, not a feature grid. */
.areas {
  background: var(--paper-cool);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(56px, 8vw, 104px) 0;
}
.areas .wrap {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 32px clamp(32px, 5vw, 72px);
}
.areas ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 40px;
}
.areas li {
  break-inside: avoid;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.areas li strong { display: block; font-weight: 700; }
.areas li span { color: var(--gray); font-size: 0.97rem; }
@media (max-width: 860px) {
  .areas .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .areas ul { columns: 1; }
}

/* How an instance comes to be: a real sequence, drawn on the road. */
.process { padding: clamp(56px, 8vw, 104px) 0; }
.steps {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 24px;
  counter-reset: step;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 17px;
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--blue) 0 22px, transparent 22px 36px);
  border-radius: 2px;
}
.steps li { counter-increment: step; position: relative; }
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue-deep);
  color: var(--on-blue);
  font-weight: 800;
  position: relative;
  margin-bottom: 18px;
}
.steps p { margin-top: 8px; font-size: 0.97rem; color: var(--gray); }
@media (max-width: 860px) {
  .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .steps::before {
    left: 17px;
    right: auto;
    top: 0;
    bottom: 0;
    width: 4px;
    height: auto;
    background: repeating-linear-gradient(180deg, var(--blue) 0 22px, transparent 22px 36px);
  }
  .steps li { padding-left: 58px; }
  .steps li::before { position: absolute; left: 0; top: -6px; margin: 0; }
}

/* Instance: what every client gets as its own. */
.instance {
  background: var(--blue-deep);
  color: var(--on-blue);
  padding: clamp(56px, 8vw, 96px) 0;
}
.instance .wrap {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 32px clamp(32px, 5vw, 72px);
}
.instance .address {
  margin-top: 20px;
  font-stretch: 125%;
  font-weight: 700;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  overflow-wrap: anywhere;
}
.instance .address span { opacity: 0.6; }
.instance dl { margin: 0; display: grid; gap: 22px; }
.instance dt { font-weight: 700; font-size: 1.08rem; }
.instance dd { margin: 4px 0 0; opacity: 0.9; max-width: 52ch; }
@media (max-width: 860px) {
  .instance .wrap { grid-template-columns: minmax(0, 1fr); }
}

/* Contact */
.contact { padding: clamp(56px, 8vw, 104px) 0; }
.contact p { margin-top: 16px; color: var(--gray); font-size: 1.1rem; }

/* Footer: who owns MextMile. */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  font-size: 0.92rem;
  color: var(--gray);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 48px;
  justify-content: space-between;
  align-items: flex-start;
}
.owner-logo { display: inline-block; margin-bottom: 12px; }
.owner-logo img { display: block; }
.site-footer address { font-style: normal; margin-top: 6px; }
.site-footer a { color: var(--ink); }

/* Sticky header with the one call to action. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
}
.site-nav .nav-cta {
  background: var(--blue-deep);
  color: var(--on-blue);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
}
.site-nav .nav-cta:hover { background: #00609f; color: var(--on-blue); }
@media (max-width: 420px) {
  .site-nav { gap: 12px; }
  .site-nav .nav-cta { padding: 7px 10px; font-size: 0.88rem; }
}
section { scroll-margin-top: 88px; }

/* Screens: the application as it is, in a browser that shows the client's own address. */
.browser {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 24px 60px -24px rgba(2, 40, 80, 0.35);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  background: var(--paper-cool);
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--gray);
}
.browser-bar .url {
  flex: 1;
  max-width: 340px;
  margin: 0 auto;
  padding: 3px 12px;
  border-radius: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser-bar .url b { color: var(--ink); font-weight: 600; }
.browser img, .phone img { display: block; width: 100%; height: auto; }
.browser.crop img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }

.phone {
  margin: 0;
  width: 100%;
  max-width: 260px;
  border: 8px solid #0f1b26;
  border-radius: 34px;
  overflow: hidden;
  background: #0f1b26;
  box-shadow: 0 24px 50px -20px rgba(2, 40, 80, 0.45);
}
.phone img { aspect-ratio: 390 / 760; object-fit: cover; object-position: top; border-radius: 26px; }

/* Hero: the statement, then the product. */
.hero .showcase {
  position: relative;
  margin-top: clamp(40px, 6vw, 72px);
  padding-right: clamp(0px, 9vw, 120px);
}
.hero .showcase .phone {
  position: absolute;
  right: 0;
  bottom: -40px;
  width: clamp(150px, 20vw, 250px);
}
@media (max-width: 700px) {
  .hero .showcase { padding-right: 0; }
  .hero .showcase .browser { display: none; }
  .hero .showcase .phone { position: static; margin: 0 auto; width: 240px; }
}
.hero + .experience { padding-top: clamp(72px, 10vw, 128px); }

/* Practice: alternating text and screens. */
.practice { padding: clamp(56px, 8vw, 104px) 0 0; }
.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 40px clamp(32px, 5vw, 72px);
  align-items: center;
  padding: clamp(48px, 6vw, 80px) 0;
}
.feature:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature:nth-of-type(even) .feature-text { order: 2; }
.feature h3 { font-size: clamp(1.4rem, 2.6vw, 2rem); font-stretch: 125%; font-weight: 800; }
.feature-text p { margin-top: 14px; color: var(--gray); }
.feature ul { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.feature li { position: relative; padding-left: 28px; }
.feature li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 16px;
  height: 4px;
  border-radius: 2px;
  background: var(--blue);
}
.phones { display: flex; gap: clamp(12px, 3vw, 28px); justify-content: center; align-items: flex-start; }
.phones .phone:nth-child(2) { margin-top: 48px; }
@media (max-width: 860px) {
  .feature, .feature:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); }
  .feature:nth-of-type(even) .feature-text { order: 0; }
}

/* Clients who agreed to be shown, in monochrome so no logo outshouts the page. */
/* Equal cells, logos centred and sized by eye so a tall mark and a long one weigh the same. */
.clients { margin-top: 32px; }
.clients-label { font-size: 0.95rem; color: var(--gray); }
.logos {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.logos li {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  padding: 16px;
}
.logos li + li { border-left: 1px solid var(--line); }
.logos img { display: block; max-width: 100%; height: auto; }
.logos .logo-arval { width: 88px; }
.logos .logo-mhc { width: 178px; }
.logos .logo-erac { width: 111px; }
.logos .logo-delta { width: 112px; }
.logos .logo-ucs { width: 52px; }
@media (max-width: 700px) {
  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logos li:nth-child(odd) { border-left: 0; }
  .logos li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .logos li:last-child:nth-child(odd) { grid-column: span 2; }
}
