/* MerseyPixel — shared stylesheet
   ---------------------------------- */

:root {
  --bg: #0b1620;
  --bg-alt: #111f2c;
  --surface: #ffffff;
  --surface-alt: #f4f6f9;
  --ink: #0b1620;
  --ink-soft: #3a4a5a;
  --ink-mute: #6b7a8a;
  --line: #e2e7ee;
  --accent: #e07a3c;
  --accent-deep: #b85a22;
  --brand: #1a6f8f;
  --brand-deep: #0e4d66;
  --radius: 10px;
  --shadow: 0 2px 6px rgba(11, 22, 32, 0.06);
  --shadow-lg: 0 10px 30px rgba(11, 22, 32, 0.10);
  --max: 1100px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--brand);
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 111, 143, 0.25);
  transition: color .15s ease, border-color .15s ease;
}
a:hover { color: var(--brand-deep); border-bottom-color: var(--brand-deep); }

h1, h2, h3, h4 {
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 0; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; color: var(--ink-soft); }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header & nav --- */
.site-header {
  background: var(--bg);
  color: #e8eef4;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  border: none;
  letter-spacing: -0.01em;
}
.brand:hover { color: #fff; border: none; }
.brand-mark {
  width: 28px; height: 28px;
  display: inline-block;
  border-radius: 4px;
  background:
    linear-gradient(135deg, var(--brand) 0 50%, var(--accent) 50% 100%);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.08);
  position: relative;
}
.brand-mark::after {
  content:"";
  position:absolute; inset:6px;
  background: #0b1620;
  border-radius: 2px;
}
nav.primary {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
nav.primary a {
  color: #c8d1dc;
  border: none;
  font-size: 0.96rem;
  padding: 6px 2px;
}
nav.primary a:hover { color: #fff; }
nav.primary a.current { color: #fff; border-bottom: 2px solid var(--accent); }

/* --- Hero --- */
.hero {
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(26,111,143,0.35), transparent 60%),
    radial-gradient(900px 400px at 90% 10%, rgba(224,122,60,0.18), transparent 60%),
    var(--bg);
  color: #e8eef4;
  padding: 80px 0 90px;
}
.hero h1 { color: #fff; max-width: 820px; }
.hero p.lead {
  font-size: 1.2rem;
  color: #c8d1dc;
  max-width: 680px;
  margin-bottom: 28px;
}
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- Page header (non-home) --- */
.page-header {
  background: var(--bg);
  color: #e8eef4;
  padding: 64px 0 56px;
  border-bottom: 4px solid var(--accent);
}
.page-header h1 { color: #fff; margin-bottom: 8px; }
.page-header p {
  color: #c8d1dc;
  max-width: 640px;
  margin: 0;
  font-size: 1.05rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .1s ease, background .15s ease, border-color .15s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn-ghost {
  background: transparent;
  color: #e8eef4;
  border-color: rgba(255,255,255,0.25);
}
.btn-ghost:hover { border-color: #fff; color: #fff; }
a.btn { border-bottom: none; }

/* --- Sections --- */
section { padding: 72px 0; }
section.alt { background: var(--surface-alt); }
section .kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 8px;
}

/* --- Grid cards --- */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 28px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card h3 { margin-bottom: 8px; color: var(--ink); }
.card p { margin-bottom: 0; font-size: 0.98rem; }
.card .icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 40px; height: 40px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: rgba(26, 111, 143, 0.10);
  color: var(--brand);
  font-size: 1.3rem;
  font-weight: 700;
}

/* --- Two-col split --- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: 28px; } }

/* --- Process list --- */
.steps { counter-reset: step; list-style: none; padding: 0; margin-top: 24px; }
.steps li {
  counter-increment: step;
  padding: 20px 0 20px 60px;
  position: relative;
  border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 20px;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}
.steps h3 { margin: 0 0 4px; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* --- Definition list (services detail) --- */
.detail {
  padding: 24px 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
}
.detail:last-child { border-bottom: 1px solid var(--line); }
.detail h3 { margin: 0; font-size: 1.05rem; }
.detail p { margin: 0 0 10px; }
.detail ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-soft); }
.detail li { margin-bottom: 4px; }
@media (max-width: 760px) { .detail { grid-template-columns: 1fr; gap: 8px; } }

/* --- Contact block --- */
.contact-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.contact-panel dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  font-weight: 700;
  margin-top: 18px;
}
.contact-panel dt:first-of-type { margin-top: 0; }
.contact-panel dd {
  margin: 4px 0 0;
  font-size: 1.05rem;
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-alt);
  color: #a9b4c0;
  padding: 40px 0;
  margin-top: 80px;
  font-size: 0.92rem;
  border-top: 4px solid var(--accent);
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer a { color: #d2dae3; border-bottom-color: rgba(210,218,227,0.25); }
.site-footer a:hover { color: #fff; }
.site-footer .fine { color: #7d8896; }

/* --- Utility --- */
.tight { margin-top: 0; }
.muted { color: var(--ink-mute); }
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(26,111,143,0.10);
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 600;
  margin: 2px 6px 2px 0;
}
.legal {
  max-width: 780px;
}
.legal h2 { margin-top: 36px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul { padding-left: 20px; }

/* ============================================================
   App-store buttons (used on app landing pages)
   ============================================================ */
.app-stores {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 20px;
}
/* Wrapper for an app-store badge image (e.g. Google Play official badge).
   Strip the default link underline and provide a subtle hover lift. */
.play-badge-link {
  display: inline-block;
  border: none;
  line-height: 0;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.play-badge-link:hover { transform: translateY(-1px); border: none; }
.play-badge-link img { height: 56px; width: auto; display: block; }
.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 22px;
  height: 56px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  background: #0b1620;
  color: #fff;
  border: 1px solid #0b1620;
  border-bottom: 1px solid #0b1620;
  line-height: 1.1;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.2s ease,
    border-color 0.2s ease;
}
.app-store-btn:hover {
  transform: translateY(-1px);
  background: #1a2733;
  border-color: #1a2733;
  color: #fff;
}
.app-store-btn .label { display: flex; flex-direction: column; }
.app-store-btn .label-small {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.85;
}
.app-store-btn .label-big {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 2px;
}
.app-store-btn svg { flex-shrink: 0; }
.app-store-btn--disabled,
.app-store-btn--disabled:hover {
  background: transparent;
  color: var(--ink-mute);
  border-color: var(--line);
  cursor: not-allowed;
  transform: none;
}
.app-store-btn--disabled .label-small { opacity: 0.65; }
@media (prefers-reduced-motion: reduce) {
  .app-store-btn,
  .play-badge-link { transition: none; }
  .app-store-btn:hover,
  .play-badge-link:hover { transform: none; }
}

/* ============================================================
   Animations & motion polish
   ============================================================ */

/* --- Brand mark — pixel grid -------------------------------- */
.brand-mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 2px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 3px;
}
.brand-mark::after { display: none; }
.brand-mark .px {
  background: var(--brand);
  border-radius: 1.5px;
  opacity: 0;
  transform: scale(0.4);
  animation: px-in 600ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 55ms);
}
.brand-mark .px:nth-child(2n) { background: var(--accent); }
@keyframes px-in {
  to { opacity: 1; transform: scale(1); }
}
.brand:hover .brand-mark .px {
  animation: px-jitter 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-delay: calc(var(--i, 0) * 35ms);
}
@keyframes px-jitter {
  0%   { transform: scale(1) rotate(0); opacity: 1; }
  40%  { transform: scale(0.55) rotate(15deg); opacity: 0.55; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* --- Hero — overflow, cursor accent, wave ------------------- */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero > .container { position: relative; z-index: 2; }
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(224, 122, 60, 0.13),
    transparent 60%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}
.hero:hover::after { opacity: 1; }

.hero-wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 200%;
  height: 64px;
  pointer-events: none;
  z-index: 1;
  display: block;
}
.hero-wave path { fill: var(--surface); }
.hero-wave .wave-back {
  fill: rgba(255, 255, 255, 0.10);
  animation: wave-drift 24s linear infinite;
}
.hero-wave .wave-front {
  animation: wave-drift 16s linear infinite;
}
@keyframes wave-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --- Word-by-word headline reveal --------------------------- */
.hero h1 .word,
.page-header h1 .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
  animation: word-rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 65ms);
  will-change: opacity, transform;
}
@keyframes word-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Stagger-fade reveal on scroll -------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Card lift + accent bloom ------------------------------- */
.card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
}
.card:hover::before { transform: scaleX(1); }

/* --- Underline-draw on inline links ------------------------- */
section .container p a:not(.btn),
section .container li a:not(.btn),
section .container dd a:not(.btn) {
  border-bottom: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 1px;
  transition:
    background-size 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    color 0.2s ease;
}
section .container p a:not(.btn):hover,
section .container li a:not(.btn):hover,
section .container dd a:not(.btn):hover,
section .container p a:not(.btn):focus-visible,
section .container li a:not(.btn):focus-visible,
section .container dd a:not(.btn):focus-visible {
  background-size: 100% 1px;
}

/* --- Reduced-motion overrides ------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .brand-mark .px {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .brand:hover .brand-mark .px { animation: none; }
  .hero-wave .wave-back,
  .hero-wave .wave-front { animation: none; }
  .hero h1 .word,
  .page-header h1 .word {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card,
  .card::before { transition: none; }
  .card::before { transform: scaleX(1); opacity: 0.35; }
  section .container p a:not(.btn),
  section .container li a:not(.btn),
  section .container dd a:not(.btn) {
    background-size: 100% 1px;
    transition: none;
  }
  .hero::after { transition: none; opacity: 0; }
}
