@font-face {
  font-family: Lato; font-style: normal; font-weight: 300; font-display: swap;
  src: url("font/lato-300.woff2") format("woff2");
}
@font-face {
  font-family: Lato; font-style: normal; font-weight: 400; font-display: swap;
  src: url("font/lato-400.woff2") format("woff2");
}
@font-face {
  font-family: Lato; font-style: normal; font-weight: 700; font-display: swap;
  src: url("font/lato-700.woff2") format("woff2");
}
@font-face {
  font-family: Lato; font-style: normal; font-weight: 900; font-display: swap;
  src: url("font/lato-900.woff2") format("woff2");
}

/* dark is the default; light is served on request */
:root {
  --bg-l: #01233c; --bg-r: #014574;
  --line: #0071bc; --dot: #0071bc;
  --ink: #f2f4fd; --ink-dim: #9fb6c9; --accent: #58a8dc;
  --mark: url("img/mark-dark.png");

  --split: 58%;
  --gut: 61.8%;
  --node: 9px;
  --pad-r: 3.5rem;
  --mark-w: 3.5;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg-l: #f6f7fd; --bg-r: #f6f7fd;
    --line: #006a9a;
    --ink: #014574; --ink-dim: #6b8296; --accent: #006a9a;
    --mark: url("img/mark-light.png");
  }
}

:root[data-theme="light"] {
  --bg-l: #f6f7fd; --bg-r: #f6f7fd;
  --line: #006a9a;
  --ink: #014574; --ink-dim: #6b8296; --accent: #006a9a;
  --mark: url("img/mark-light.png");
}

:root[data-theme="dark"] {
  --bg-l: #01233c; --bg-r: #014574;
  --line: #0071bc;
  --ink: #f2f4fd; --ink-dim: #9fb6c9; --accent: #58a8dc;
  --mark: url("img/mark-dark.png");
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 16px/1.5 Lato, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg-l);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.page {
  position: relative;
  height: 100vh;
  display: grid;
  grid-template-columns: var(--gut) 1fr;
}

/* too short to hold the split: fall back to content rows. Safe because the
   rule is a cell border, so it tracks the boundary wherever it lands. */
@media (max-height: 620px) {
  .page { height: auto; min-height: 100vh; }
  .left { grid-template-rows: auto auto; }
}

.left  { display: grid; grid-template-rows: var(--split) 1fr; background: var(--bg-l); }
.right { background: var(--bg-r); padding: 4rem 3rem; display: flex;
         flex-direction: column; justify-content: center; gap: 2.5rem; }

.vline { position: absolute; left: var(--gut); top: 0; bottom: 0;
         width: 1px; background: var(--line); }

/* the rule is the boundary between the two cells, not a percentage of its own —
   a % row track in an indefinite-height grid resolves to auto and the two drift */
.tag-cell { position: relative; border-top: 1px solid var(--line); }
.tag-cell::before {
  content: ""; position: absolute; top: 0; right: 0;
  width: var(--node); height: var(--node);
  transform: translate(50%, -50%);
  border-radius: 50%; background: var(--dot);
}

/* both cells hang off one right edge, set in from the rule by --pad-r */
.logo-cell { display: flex; align-items: center; justify-content: flex-end;
             padding: 3rem var(--pad-r) 3rem 3rem; }
.tag-cell  { display: flex; align-items: center; justify-content: flex-end;
             padding: 0 var(--pad-r) 0 3rem; }

.lockup { display: flex; flex-direction: column; align-items: flex-end;
          gap: .1em; --u: clamp(2.2rem, min(5.2vw, 7vh), 4.75rem); }
.lockup .mark {
  width: calc(var(--u) * var(--mark-w));
  aspect-ratio: 350 / 306;
  background: var(--mark) center / contain no-repeat;
  align-self: center; margin-bottom: .3em;
}
/* text-indent cancels the trailing letterspace, so the right edge aligns true */
.lockup .l1, .lockup .l2 {
  font-size: var(--u); font-weight: 900; line-height: .96;
  letter-spacing: .08em; color: var(--ink); text-indent: .08em;
}
.lockup .l3 {
  font-size: calc(var(--u) * .34); font-weight: 400;
  letter-spacing: .22em; color: var(--accent); text-indent: .22em;
  margin-top: .25em;
}

.tag { margin: 0; text-align: right; font-size: clamp(1.25rem, 2.4vw, 2rem);
       font-weight: 300; letter-spacing: .01em; color: var(--ink); }

.services { list-style: none; margin: 0; padding: 0; }
.services li { padding: .45rem 0; font-size: 1.0625rem; }

.contact { display: flex; flex-direction: column; gap: .5rem; }
.contact a { color: var(--accent); text-decoration: none; }
.contact a:hover, .contact a:focus-visible { text-decoration: underline; }
.phone { font-size: 1.75rem; font-weight: 700; letter-spacing: .01em; }
.email { font-size: 1.0625rem; }
.legal { font-size: .8125rem; color: var(--ink-dim); margin-top: .5rem; }

#theme-toggle {
  position: fixed; right: 1rem; bottom: 1rem;
  width: 2.5rem; height: 2.5rem; display: grid; place-items: center;
  cursor: pointer; border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, transparent);
  background: transparent; color: var(--ink); opacity: .55;
}
#theme-toggle:hover, #theme-toggle:focus-visible { opacity: 1; }
#theme-toggle .moon { display: none; }
:root[data-theme="light"] #theme-toggle .sun { display: none; }
:root[data-theme="light"] #theme-toggle .moon { display: inline; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) #theme-toggle .sun { display: none; }
  :root:not([data-theme="dark"]) #theme-toggle .moon { display: inline; }
}

@media (max-width: 760px) {
  .page { grid-template-columns: 1fr; height: auto; min-height: 100dvh; }
  .left { grid-template-rows: auto auto; }
  .vline { display: none; }
  .tag-cell { border-top: 0; }
  .tag-cell::before { display: none; }
  .logo-cell { padding: 3rem 2rem; justify-content: center; }
  .tag-cell { padding: 2rem; justify-content: center; }
  .tag { text-align: center; }
  .right { padding: 3rem 2rem; }
}
