/* ==========================================================================
   Entire Internet Integrations — site styles
   Palette comes from the logo: navy #333365, grey #999999, black on white.
   Headings: Jost (a geometric sans close to the logo lettering).
   Body: Source Sans 3.
   ========================================================================== */

:root {
  --navy: #333365;
  --navy-deep: #22224a;
  --navy-tint: #ecedf4;
  --grey: #999999;
  --grey-line: #d9d9de;
  --grey-soft: #f3f3f5;
  --ink: #000000;
  --ink-soft: #3a3a3f;
  --paper: #ffffff;
  --ok: #1f6f43;
  --err: #a8322a;

  --font-head: "Jost", "Century Gothic", "Futura", "Avenir Next", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 3px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy-deep); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1em; max-width: 68ch; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap--narrow { width: min(720px, 100% - 2 * var(--gutter)); }

.skip {
  position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff;
  padding: 8px 12px; z-index: 100;
}
.skip:focus { left: 8px; }

/* Buttons ------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.01em;
  padding: 0.8em 1.5em;
  border: 2px solid var(--navy);
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
  transition: background-color .15s, color .15s;
}
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy-tint); }

/* Header ----------------------------------------------------------------- */
.site-head { border-bottom: 1px solid var(--grey-line); background: var(--paper); }
.site-head__row {
  display: flex; align-items: center; gap: 24px;
  min-height: 84px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand img { width: 60px; height: auto; }
.brand__text {
  font-family: var(--font-head); font-weight: 500; font-size: 1.05rem; line-height: 1.15;
  letter-spacing: 0.04em;
}
.nav { display: flex; gap: 28px; margin-left: auto; align-items: center; }
.nav a { font-family: var(--font-head); font-weight: 500; text-decoration: none; color: var(--ink); font-size: 1rem; }
.nav a:hover { color: var(--navy); }
.nav__cta { border-bottom: 2px solid var(--navy); padding-bottom: 2px; }
.site-head__phone {
  font-family: var(--font-head); font-weight: 500; text-decoration: none;
  color: var(--navy); white-space: nowrap;
}

@media (max-width: 760px) {
  .brand__text { display: none; }
  .nav { gap: 18px; font-size: .95rem; }
  .site-head__phone { display: none; }
}
@media (max-width: 480px) {
  .nav a:not(.nav__cta) { display: none; }
}

/* Flash messages --------------------------------------------------------- */
.flash {
  margin-top: 20px; padding: 14px 18px; border-left: 4px solid var(--navy);
  background: var(--navy-tint); font-weight: 600;
}
.flash--ok { border-color: var(--ok); background: #e8f3ec; }
.flash--err { border-color: var(--err); background: #f9e9e7; }

/* Hero: the headline sits between the logo's parentheses ---------------- */
.hero { padding: clamp(48px, 8vw, 110px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.hero__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(8px, 2vw, 32px);
}
.hero__paren {
  position: relative;
  font-family: var(--font-head);
  font-weight: 300;
  font-size: clamp(9rem, 22vw, 20rem);
  line-height: 0.85;
  display: block;
  width: 0.34em;
  user-select: none;
}
.hero__paren span { position: absolute; top: 0; }
.hero__paren--l .p-grey { left: 0.06em; color: var(--grey); }
.hero__paren--l .p-navy { left: 0; color: var(--navy); }
.hero__paren--r .p-navy { right: 0; color: var(--navy); }
.hero__paren--r .p-grey { right: 0.06em; color: var(--grey); }
.hero__paren--r { text-align: right; }
.hero__copy { padding: 0 clamp(8px, 2vw, 24px); }
.hero__copy h1 { max-width: 16ch; }
.hero__copy p { font-size: 1.15rem; color: var(--ink-soft); max-width: 56ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

@media (max-width: 760px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__paren { display: none; }
  .hero__copy { padding: 0; }
}

/* Recent work carousel ---------------------------------------------------- */
.work { padding: clamp(40px, 6vw, 72px) 0; background: var(--grey-soft); }
.work__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.work__head h2 { margin: 0; }
.work__more { margin-top: 20px; font-family: var(--font-head); font-weight: 500; }
.work__empty { color: var(--grey); }

.carousel { overflow: hidden; }
.carousel__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--grey) transparent;
}
.carousel__track > .post-card {
  flex: 0 0 min(360px, 82vw);
  scroll-snap-align: start;
}
.carousel__controls { display: flex; gap: 8px; }
.carousel__btn {
  width: 44px; height: 44px; border: 2px solid var(--navy); background: var(--paper);
  color: var(--navy); font-size: 1.6rem; line-height: 1; border-radius: var(--radius); cursor: pointer;
  font-family: var(--font-head);
}
.carousel__btn:hover { background: var(--navy); color: #fff; }
.carousel__btn:disabled { opacity: .35; cursor: default; }
.carousel__btn:disabled:hover { background: var(--paper); color: var(--navy); }

/* Post cards ------------------------------------------------------------- */
.post-card { background: var(--paper); border: 1px solid var(--grey-line); display: flex; flex-direction: column; }
.post-card__media { display: block; aspect-ratio: 900 / 560; overflow: hidden; background: var(--navy-tint); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__blank {
  display: grid; place-items: center; height: 100%;
  font-family: var(--font-head); font-weight: 300; font-size: 3rem; color: var(--grey);
}
.post-card__body { padding: 18px 20px 22px; }
.post-card__body time { font-size: .9rem; color: var(--grey); font-family: var(--font-head); font-weight: 500; }
.post-card__body h3 { margin: 6px 0 8px; }
.post-card__body h3 a { text-decoration: none; color: var(--ink); }
.post-card__body h3 a:hover { color: var(--navy); }
.post-card__body p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }

/* Capabilities -------------------------------------------------------------- */
.capabilities { padding: clamp(48px, 7vw, 96px) 0; }
.capabilities__head { max-width: 62ch; margin-bottom: clamp(28px, 4vw, 48px); }
.capabilities__head p { font-size: 1.15rem; color: var(--ink-soft); }
.cap-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  column-gap: clamp(28px, 5vw, 64px);
  row-gap: 0;
}
.cap { border-top: 2px solid var(--navy); padding: 20px 0 32px; }
.cap dt { font-family: var(--font-head); font-weight: 500; font-size: 1.3rem; margin-bottom: 8px; }
.cap dd { margin: 0; color: var(--ink-soft); max-width: 46ch; }

/* Process --------------------------------------------------------------- */
.process { padding: clamp(40px, 6vw, 80px) 0; background: var(--navy); color: #fff; }
.process h2 { color: #fff; margin-bottom: 32px; }
.steps {
  margin: 0; padding: 0; list-style: none; counter-reset: step;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 32px;
}
.steps li { counter-increment: step; position: relative; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.35); color: rgba(255,255,255,.88); }
.steps li::before {
  content: counter(step);
  font-family: var(--font-head); font-weight: 300; font-size: 2.4rem; line-height: 1; display: block; margin-bottom: 8px; color: #fff;
}
.steps strong { color: #fff; font-family: var(--font-head); font-weight: 500; }

/* Contact --------------------------------------------------------------- */
.contact { padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--grey-line); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 80px); }
.contact__intro p { color: var(--ink-soft); }
.contact__direct { font-family: var(--font-head); font-weight: 500; font-size: 1.15rem; line-height: 1.7; }
.contact__direct a { text-decoration: none; }
@media (max-width: 820px) { .contact__grid { grid-template-columns: 1fr; } }

.form { display: flex; flex-direction: column; gap: 18px; }
.form__hp { position: absolute; left: -9999px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-family: var(--font-head); font-weight: 500; }
.field input, .field textarea {
  font: inherit; padding: 11px 12px; border: 1px solid var(--grey);
  border-radius: var(--radius); background: #fff; color: var(--ink); width: 100%;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { border-color: var(--navy); outline: 3px solid var(--navy-tint); }
.field--error input, .field--error textarea { border-color: var(--err); }
.field__msg { color: var(--err); font-size: .92rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.field__hint { margin: -8px 0 0; font-size: .92rem; color: var(--grey); }
.field__hint--error { color: var(--err); }
.form__error { color: var(--err); font-weight: 600; margin: 0; }
.form .btn { align-self: flex-start; }
.form--sent { border-left: 4px solid var(--ok); background: #f1f8f3; padding: 24px 28px; gap: 8px; }
.form--sent h3 { margin: 0; color: var(--ok); }
.form--sent p { max-width: none; margin: 0; }
.sent-summary { margin: 12px 0; display: grid; grid-template-columns: max-content 1fr; column-gap: 20px; row-gap: 8px; }
.sent-summary dt { font-family: var(--font-head); font-weight: 500; color: var(--grey); }
.sent-summary dd { margin: 0; color: var(--ink-soft); overflow-wrap: anywhere; }

/* Generic page + single post ------------------------------------------- */
.page { padding: clamp(40px, 6vw, 72px) 0; }
.pager { display: flex; gap: 20px; align-items: center; margin-top: 32px; font-family: var(--font-head); }
.pager span { color: var(--grey); }

.post__head { padding: clamp(36px, 5vw, 64px) 0 24px; }
.post__back { font-family: var(--font-head); font-weight: 500; text-decoration: none; display: inline-block; margin-bottom: 20px; }
.post__back::before { content: "\2039\00a0"; }
.post__head time { color: var(--grey); font-family: var(--font-head); font-weight: 500; }
.post__cover { margin: 8px auto 32px; text-align: center; }
.post__cover img { display: inline-block; max-width: 100%; width: auto; height: auto; }
.post__cover figcaption { text-align: left; }
.post__body { padding-bottom: 24px; font-size: 1.15rem; }
.post__body p { max-width: none; }
.post__gallery {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px;
  margin-top: 16px; margin-bottom: 40px;
}
.post__gallery figure, .post__cover { margin-inline: auto; }
.post__gallery figure { margin: 0; }
figcaption { font-size: .92rem; color: var(--grey); margin-top: 8px; }

/* Footer ---------------------------------------------------------------- */
.site-foot { border-top: 1px solid var(--grey-line); padding: 48px 0 28px; background: var(--paper); font-size: .98rem; }
.site-foot__grid { display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 32px; align-items: start; }
.site-foot__logo { width: 90px; }
.site-foot__col p { margin: 0 0 6px; }
.site-foot__name { font-family: var(--font-head); font-weight: 500; }
.site-foot__links { display: flex; flex-direction: column; gap: 6px; }
.site-foot__links a { text-decoration: none; }
.site-foot__legal { margin-top: 32px; color: var(--grey); font-size: .9rem; }
@media (max-width: 760px) { .site-foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .site-foot__grid { grid-template-columns: 1fr; } }
