/* Mobimedia holding page. Design: "The two circles", second iteration (from _variants/circles-v2).
   AI is a field of points, the real world is a printed contour map, and where they
   meet the terrain is drawn in points on Mobimedia blue. Everything else stays quiet.
   Shared by the home pages, the legal notice and privacy pages, the thank-you pages and 404. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/inter-latin-400.8909904a.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/inter-latin-700.6f56409f.woff2") format("woff2");
}

:root {
  color-scheme: light;

  --paper: #F4F6F9;
  --band: #E8ECF2;
  --surface: #FFFFFF;
  --ink: #0F1B33;
  --text: #2A3550;
  --muted: #535E76;
  --blue: #1B4298;
  --blue-deep: #142F6E;
  --on-blue: #FFFFFF;
  --link: #1B4298;
  --rule: #D3DAE5;
  --field-bg: #FFFFFF;
  --field-border: #737E93;
  --focus: #1B4298;
  --error: #B42318;
  --error-bg: #FDF1F0;

  /* AI: a field of points */
  --ai-1: #C6D4F2;
  --ai-2: #E3E9F6;
  --ai-dot: #1B4298;
  --ai-dot-opacity: 0.5;
  /* The real world: a printed contour map on warm stone */
  --world-1: #F6F1E9;
  --world-2: #E9DFCE;
  --contour: #B9987A;
  --contour-index: #9A7552;
  --world-rim: #9A7552;
  /* Where they meet */
  --lens: #1B4298;
  --lens-dot: #FFFFFF;
  --ai-rim: #1B4298;

  --gutter: clamp(1.25rem, 4.2vw, 3.5rem);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "cv11" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--blue);
  color: var(--on-blue);
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
}
.skip-link:focus { top: 0.75rem; }

main:focus { outline: none; }

/* Header: its own strip, so the picture never runs under the links. */

.site-header {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding: 1.5rem var(--gutter) 1.375rem;
  background: var(--paper);
  border-top: 3px solid var(--blue);
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.languages ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}
.languages a {
  color: var(--muted);
  text-decoration: none;
  padding-block: 0.25rem;
}
.languages a:hover { color: var(--ink); }
.languages a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--blue);
}

/* Notices (form round trip) */

.notice,
.error-summary {
  margin: 0;
  padding: 0.875rem 1.125rem;
  border-left: 4px solid var(--error);
  background: var(--error-bg);
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
}
.notice a { color: var(--ink); font-weight: 700; }

#form-notice {
  position: relative;
  z-index: 3;
  padding-inline: var(--gutter);
  border-left: 0;
  border-bottom: 2px solid var(--error);
}

#form-down { margin-bottom: 1.75rem; }
.error-summary { margin-bottom: 0.25rem; }

/* Hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  isolation: isolate;
}

.hero-art { pointer-events: none; }

.orbs {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.hero-text {
  position: relative;
  z-index: 2;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
  font-size: clamp(2.75rem, 1.4rem + 5vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.lead {
  max-width: 31em;
  margin: 2rem 0 0;
  font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--text);
}

.hero-actions {
  display: flex;
  margin-top: 2.75rem;
}

.button,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.125rem;
  padding: 0 1.625rem;
  border: 0;
  border-radius: 2px;
  background: var(--blue);
  color: var(--on-blue);
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease;
}
.button:hover,
button[type="submit"]:hover { background: var(--blue-deep); }

/* SVG: the two circles */

.ai-disc { fill: url(#g-ai); }
.s-ai-1 { stop-color: var(--ai-1); }
.s-ai-2 { stop-color: var(--ai-2); }
.ai-grid { fill: url(#p-grid); }
.grid-dot { fill: var(--ai-dot); fill-opacity: var(--ai-dot-opacity); }

.world-disc { fill: url(#g-world); }
.s-world-1 { stop-color: var(--world-1); }
.s-world-2 { stop-color: var(--world-2); }
.contour {
  fill: none;
  stroke: var(--contour);
  stroke-width: 1;
}
.contour-index { stroke: var(--contour-index); stroke-width: 1.7; }

.ai-rim, .world-rim {
  fill: none;
  stroke-width: 1;
}
.ai-rim { stroke: var(--ai-rim); stroke-opacity: 0.22; }
.world-rim { stroke: var(--world-rim); stroke-opacity: 0.45; }

.lens-fill { fill: var(--lens); }
.lens-dots {
  fill: none;
  stroke: var(--lens-dot);
  stroke-opacity: 0.8;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 0 8.5;
}
.lens-dots-index { stroke-width: 4.6; stroke-opacity: 1; stroke-dasharray: 0 10; }

/* The one moment: the overlap fills in once the page has loaded. */

.lens { animation: settle 900ms cubic-bezier(0.3, 0.7, 0.2, 1) 250ms both; }
@keyframes settle {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lens { animation: none; }
  .button, button[type="submit"], input, textarea { transition: none; }
}

/* Contact --------------------------------------------------------------- */

.contact {
  position: relative;
  z-index: 2;
  background: var(--band);
  border-top: 1px solid var(--rule);
  padding: clamp(3.5rem, 7vw, 6.5rem) var(--gutter);
}

.contact-inner {
  display: grid;
  gap: 2.25rem;
}

.contact h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(2rem, 1.5rem + 1.8vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.contact-intro p {
  max-width: 24em;
  margin: 1.25rem 0 0;
  font-size: 1.125rem;
  color: var(--text);
}
.contact-intro .contact-languages {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1rem;
}

.contact-panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--blue);
  border-radius: 2px;
  padding: clamp(1.5rem, 3.2vw, 2.75rem);
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.field { display: grid; align-content: start; gap: 0.375rem; }
.field > p { margin: 0; }

.field label {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9375rem;
}
.optional { color: var(--muted); font-weight: 400; }
.hint {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.4;
}
.field-error {
  color: var(--error);
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.4;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  margin: 0;
  margin-top: 0.125rem;
  padding: 0.8125rem 0.9375rem;
  border: 1px solid var(--field-border);
  border-radius: 3px;
  background: var(--field-bg);
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  line-height: 1.4;
  appearance: none;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
input[type="text"],
input[type="email"] { min-height: 3.125rem; }
textarea {
  min-height: 10.5rem;
  resize: vertical;
  line-height: 1.55;
}
input[type="text"]:hover,
input[type="email"]:hover,
textarea:hover { border-color: var(--ink); }
input[type="text"]:focus-visible,
input[type="email"]:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}
[aria-invalid="true"],
[aria-invalid="true"]:hover {
  border-color: var(--error);
  box-shadow: inset 0 0 0 1px var(--error);
}

.form-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin-top: 0.25rem;
}
.form-privacy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Secondary pages: legal notice, privacy, thank-you, 404 ---------------- */

.doc-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
.doc-main {
  flex: 1;
  padding: clamp(3.5rem, 9vw, 7.5rem) var(--gutter) clamp(4rem, 9vw, 7.5rem);
  background:
    radial-gradient(60rem 30rem at 100% 0%, var(--ai-2), transparent 70%),
    var(--paper);
}
.doc {
  max-width: 44rem;
}
.doc h1 {
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);
}
.doc-body {
  margin-top: 2.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  max-width: 40rem;
}
.doc-body p {
  margin: 0 0 1.125rem;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
}
.doc-body p:last-child { margin-bottom: 0; }
.doc-short .lead { margin-top: 1.5rem; }
.doc-actions { margin: 2.5rem 0 0; }
.doc-links {
  margin: 2.5rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--rule);
  list-style: none;
  display: grid;
  gap: 0.625rem;
  font-size: 0.9375rem;
}
.doc-links a { color: var(--muted); }
.doc-links a:hover { color: var(--ink); }

/* The two circles in miniature */
.mark {
  display: block;
  width: 6.5rem;
  height: auto;
  margin-bottom: 2rem;
}
.mark-ai { fill: var(--ai-1); stroke: var(--ai-rim); stroke-opacity: 0.35; stroke-width: 1; }
.mark-world { fill: var(--world-2); stroke: var(--world-rim); stroke-opacity: 0.6; stroke-width: 1; }
.mark-lens { fill: var(--lens); }

/* Footer ---------------------------------------------------------------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.75rem var(--gutter) 2rem;
  background: var(--paper);
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer p { margin: 0; }
.site-footer ul {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* Phone and small tablet: the whole idea in one frame, points upper left,
   map lower right, the blue overlap between them. */

@media (max-width: 47.99rem) {
  .site-header { padding-block: 1.125rem 1rem; }
  .languages ul { gap: 0.25rem 1.125rem; }
  .hero-art {
    position: relative;
    height: 96vw;
    overflow: hidden;
    border-bottom: 1px solid var(--rule);
  }
  .orbs {
    position: absolute;
    width: 129vw;
    left: -17vw;
    top: -6vw;
  }
  .grid-dot { r: 2.3; fill-opacity: 0.62; }
  .hero-text { padding: 2.5rem var(--gutter) 3.5rem; }
  .lead { margin-top: 1.5rem; }
  .hero-actions { margin-top: 2.25rem; }
}

/* Desktop: text on the left, circles cropped by the header rule and the right edge. */

@media (min-width: 48rem) {
  .hero {
    min-height: clamp(40rem, 55vw, 54rem);
    display: flex;
    align-items: center;
    overflow: hidden;
  }
  .hero-art {
    --art-w: min(81.4vw, 80rem);
    position: absolute;
    width: var(--art-w);
    left: calc(100vw - 0.737 * var(--art-w));
    top: calc(-0.135 * var(--art-w));
    z-index: 1;
  }
  .hero-text {
    width: min(42rem, 48vw);
    padding: 5rem 0 5.5rem var(--gutter);
  }

  .contact-inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    column-gap: clamp(2rem, 6vw, 6rem);
  }
  .contact-intro { padding-top: 0.5rem; }
  .contact-form { grid-template-columns: 1fr 1fr; column-gap: 1.25rem; }
  .field-wide, .form-end, .error-summary { grid-column: 1 / -1; }
}

/* Tablet: larger circles so they still bleed off the edges. */

@media (min-width: 48rem) and (max-width: 71.99rem) {
  .hero-art { --art-w: 100vw; left: 38vw; top: -5vw; }
  .hero-text { width: 42vw; }
}
