/* CodaceApps website: home, privacy, support and 404 pages share this file.
   Palette is taken from the logo: slate blue #406A93, cyan #33B7E5, on a deep navy ground. */

:root {
  --navy: #0B1F33;
  --navy-deep: #081827;
  --navy-card: #12304D;
  --navy-chip: #17395A;
  --slate: #406A93;
  --cyan: #33B7E5;
  --paper: #F4F8FB;
  --white: #FFFFFF;
  --ink: #10233A;
  --muted: #4A5F75;
  --on-dark: #C5D3E2;
  --on-dark-muted: #9FB3C8;
  --line: #D6E2EC;
  --line-strong: #C9D8E5;
  --font-head: "Montserrat", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 48px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  /* Keep the footer at the bottom of the window on short pages. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body > main { flex: 1 0 auto; }

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

h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  background: var(--cyan);
  color: var(--navy);
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: 16px; }

/* ---------- Buttons and links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 12px;
  background: var(--cyan);
  color: var(--navy);
  font-size: 1rem;
  font-weight: 600;
  border: 1.5px solid var(--cyan);
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.button:hover { background: #5BCBFD; border-color: #5BCBFD; }

.button--slate { background: var(--slate); border-color: var(--slate); color: var(--white); }
.button--slate:hover { background: #2F5478; border-color: #2F5478; }

.button--small { min-height: 44px; padding: 0 22px; border-radius: 10px; font-size: 0.9375rem; }

.button--outline {
  background: transparent;
  color: var(--white);
  border-color: #5B7894;
}
.button--outline:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--white); }

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

.hero {
  background: var(--navy);
  color: var(--white);
  min-height: 760px;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: var(--white);
  white-space: nowrap;
}
.brand img { height: 30px; width: auto; }

.nav { display: flex; align-items: center; gap: 36px; margin-left: auto; }
.nav__link {
  color: var(--on-dark);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 10px 0;
}
.nav__link:hover { color: var(--white); }
.topbar__cta { margin-left: 20px; }

.hero__body {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 96px;
}

.hero__copy { display: flex; flex-direction: column; gap: 28px; }

.hero h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.5rem, 1.2rem + 3.6vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.hero__lead {
  max-width: 34rem;
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--on-dark);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 8px; }

.hero__art { display: flex; justify-content: center; }
.hero__art img { width: 100%; max-width: 560px; }

/* ---------- Sections ---------- */

.section { padding-block: 96px; }

.section h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.875rem, 1.2rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  color: var(--ink);
  scroll-margin-top: 24px;
}

section[id] { scroll-margin-top: 0; }

/* About */

.section--about { background: var(--white); }

.about__intro {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 80px;
}
.about__intro h2 { flex: 1 1 380px; min-width: 0; }
.about__text {
  flex: 1.4 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 44rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.fact { display: flex; flex-direction: column; gap: 6px; }
.fact dt { font-size: 0.875rem; font-weight: 600; color: var(--slate); }
.fact dd { font-size: 1.125rem; font-weight: 500; color: var(--ink); }

/* Services */

.section--services { background: var(--paper); }

.services { display: flex; flex-wrap: wrap; gap: 48px 80px; }
.services__intro { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.services__intro p { max-width: 22.5rem; font-size: 1.125rem; line-height: 1.65; color: var(--muted); }

.services__list {
  flex: 2 1 560px;
  min-width: 0;
  border-top: 1px solid var(--line-strong);
}
.service {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  padding-block: 32px;
  border-bottom: 1px solid var(--line-strong);
}
.service h3 {
  flex: 1 1 220px;
  min-width: 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--ink);
}
.service p { flex: 1.4 1 280px; min-width: 0; color: var(--muted); line-height: 1.65; }

/* Projects */

.section--projects { background: var(--white); }

.projects { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 48px; }

.project { border-radius: 24px; padding: 40px; min-width: 0; }

.project--featured {
  flex: 1 1 100%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  align-items: center;
  justify-content: space-between;
}
.project__copy { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.project__copy h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.875rem;
  line-height: 1.2;
}
.project__copy p { max-width: 32.5rem; color: var(--on-dark); line-height: 1.65; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.chips li {
  border-radius: 8px;
  background: var(--navy-chip);
  color: var(--on-dark);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 6px 12px;
}

.chips--light li { background: #E3EEF7; color: #2F5478; }

.project__title { display: flex; align-items: center; gap: 16px; }
.project__title img { width: 56px; height: 56px; border-radius: 14px; flex: none; }

.project__copy .button { align-self: flex-start; margin-top: 8px; }


/* Phone frame around the app screenshots */

.device {
  position: relative;
  flex: 0 1 270px;
  width: 100%;
  min-width: 0;
  margin-inline: auto;
  padding: 10px;
  border-radius: 46px;
  background: #0A0F16;
  border: 2px solid var(--slate);
}
.project--live .device { flex-basis: 280px; }
.device__screen { border-radius: 36px; overflow: hidden; background: var(--white); line-height: 0; }
.device__screen img { display: block; width: 100%; height: auto; }
.device__btn { position: absolute; width: 5px; background: var(--slate); }
.device__btn--power { right: -7px; top: 22%; height: 11%; border-radius: 0 3px 3px 0; }
.device__btn--vol1 { left: -7px; top: 17%; height: 7%; border-radius: 3px 0 0 3px; }
.device__btn--vol2 { left: -7px; top: 26%; height: 12%; border-radius: 3px 0 0 3px; }

.project--live {
  flex: 1 1 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px 64px;
}
.project__body { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.project--live h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.625rem;
  line-height: 1.2;
  color: var(--ink);
}
.project--live p:not(.project__credit) { max-width: 32.5rem; color: var(--muted); line-height: 1.65; }
.project__credit { font-size: 0.875rem; line-height: 1.5; color: var(--muted); }
.project--live .button { align-self: flex-start; }

/* Contact */

.section--contact { background: var(--navy); color: var(--white); }
.section--contact h2 { color: var(--white); font-weight: 800; font-size: clamp(2rem, 1.2rem + 2.2vw, 3rem); line-height: 1.1; }

.contact { display: flex; flex-wrap: wrap; gap: 48px 80px; align-items: flex-start; }
.contact__intro { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact__intro p { max-width: 30rem; font-size: 1.125rem; line-height: 1.65; color: var(--on-dark); }

.contact__card {
  flex: 1 1 420px;
  min-width: 0;
  background: var(--navy-card);
  border-radius: 20px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.contact__location { font-size: 1rem; font-weight: 500; color: var(--on-dark-muted); }
.contact__alt { font-size: 0.9375rem; color: var(--on-dark); overflow-wrap: anywhere; }
.contact__alt a {
  color: var(--white);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--cyan);
  text-underline-offset: 4px;
}
.contact__alt a:hover { color: var(--cyan); }

/* Contact form */

.form { display: flex; flex-direction: column; gap: 20px; width: 100%; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field label { font-size: 0.875rem; font-weight: 600; color: var(--on-dark); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid #2C4F72;
  border-radius: 10px;
  background: var(--navy);
  color: var(--white);
  font: inherit;
  font-size: 1rem; /* 16px or more stops iPhones zooming in on focus */
  line-height: 1.5;
  transition: border-color 0.15s ease;
}
.field textarea { min-height: 132px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #7F96AD; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #3D6690; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { border-color: var(--cyan); outline-offset: 1px; }

.field select {
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239FB3C8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.field select:invalid { color: #7F96AD; }
.field select option { color: var(--ink); background: var(--white); }

/* Only flag a field once the visitor has interacted with it */
.field input:user-invalid,
.field select:user-invalid,
.field textarea:user-invalid { border-color: #FF8A8A; }

.form__submit { align-self: flex-start; margin-top: 4px; cursor: pointer; font-family: inherit; }

/* Footer */

.footer { background: var(--navy-deep); color: var(--on-dark-muted); }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  justify-content: space-between;
  padding-block: 56px;
}
.footer__about { display: flex; flex-direction: column; gap: 16px; max-width: 26rem; font-size: 0.875rem; line-height: 1.6; }
.footer__about img { height: 64px; width: auto; align-self: flex-start; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: flex-start; }
.footer__nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-dark-muted); font-size: 0.9375rem; }
.footer__nav a:hover { color: var(--white); }
.footer__legal {
  flex-basis: 100%;
  padding-top: 24px;
  border-top: 1px solid var(--navy-chip);
  font-size: 0.8125rem;
}

/* ---------- Tablet and phone ---------- */

@media (max-width: 900px) {
  :root { --gutter: 24px; }

  .hero { min-height: 0; }
  .hero__body { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 24px; padding-bottom: 64px; }
  .hero__art img { max-width: 360px; }
  .hero__lead { font-size: 1.0625rem; }

  .section { padding-block: 64px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 48px; }

  .service { flex-direction: column; gap: 10px; padding-block: 24px; }
  .service h3 { flex: none; font-size: 1.3125rem; }
  .service p { flex: none; }

  .project { padding: 28px; border-radius: 20px; }
  .project--featured { gap: 28px; }
  .device, .project--live .device { flex-basis: 100%; max-width: 260px; }
  .project--live { gap: 28px; }

  .contact__card { padding: 28px; }
}

@media (max-width: 720px) {
  .brand { font-size: 1rem; gap: 10px; }
  .brand img { height: 22px; }
  /* Menu links move to their own row under the logo and Contact button */
  .topbar { flex-wrap: wrap; row-gap: 4px; padding-block: 20px 12px; }
  .topbar__cta { margin-left: auto; padding: 0 16px; }
  .nav { order: 3; flex-basis: 100%; margin-left: 0; gap: 28px; }
  .nav__link { padding: 12px 0; }
  /* The top bar already has a Contact button */
  .hero__actions .button--outline { display: none; }
  .hero__actions .button { width: 100%; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .form__submit { align-self: stretch; }
  .project__copy .button, .project--live .button { align-self: stretch; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Legal and support pages ---------- */

.container--narrow { max-width: 880px; }

.page-header { background: var(--navy); color: var(--white); }
.page-title { padding-top: 24px; padding-bottom: 64px; }
.page-title h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.25rem, 1.4rem + 2.6vw, 3.25rem);
  line-height: 1.1;
}
.page-title p { margin-top: 12px; font-size: 1.125rem; color: var(--on-dark); }

.prose { padding-block: 64px 96px; }
.prose p, .prose li { font-size: 1.0625rem; line-height: 1.75; color: var(--muted); }
.prose p + p { margin-top: 16px; }
.prose h2 {
  margin-top: 48px;
  margin-bottom: 12px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--ink);
}
.prose ul { display: grid; gap: 8px; margin-block: 12px; padding-left: 1.25rem; list-style: disc; }
.prose a:not(.button) { color: var(--slate); text-decoration: underline; text-underline-offset: 3px; }
.prose a:not(.button):hover { color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose .button { margin-top: 8px; }

@media (max-width: 900px) {
  .page-title { padding-bottom: 48px; }
  .prose { padding-block: 48px 72px; }
}
