/* Wax IT — site stylesheet
   Black page, orange-bordered square panel, menu to the right (stacked row on small screens). */

@font-face {
  font-family: "AmarilloUSAF";
  src: url("AmarilloUSAF.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Lustria";
  src: url("Lustria-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

:root {
  --accent: #d96c26;
  --hover: #d96c26;
  /* Amarillo has no punctuation such as ( ) + @ # , - so those glyphs fall back to Lustria */
  --font: "AmarilloUSAF", "Lustria", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  background: #000;
  color-scheme: dark;
  overflow-y: scroll;          /* always reserve the scrollbar so pages don't shift sideways between short and long pages */
  scrollbar-gutter: stable;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #000;
  color: #fff;
  font-family: var(--font);
  font-size: 12px;
  line-height: 20px;
  font-weight: 400;
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: color .2s ease; }
a:hover { color: var(--hover); }
a:focus-visible { color: var(--hover); outline: 1px solid var(--hover); outline-offset: 4px; }

img { display: block; max-width: 100%; border: 0; }
p, h1, h2, ul, address { margin: 0; padding: 0; }
ul { list-style: none; }
address { font-style: normal; }

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

/* ---------- Layout: panel + menu ---------- */

.page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  padding: 129px 16px 64px;
}
@supports (padding-left: round(down, 1px, 1px)) {
  /* centre on a whole pixel, so the logo image and the text always round the same way */
  .page { justify-content: flex-start; padding-left: round(down, calc((100% - 614px) / 2), 1px); }
}

.menu { order: 2; flex: 0 0 92px; margin-top: 143px; }
.menu li + li { margin-top: 14px; }
.menu a { display: block; font-size: 14px; line-height: 16px; padding: 4px 0 8px; }

.panel {
  order: 1;
  flex: 0 0 502px;
  width: 502px;
  min-height: 502px;
  padding: 35px 50px 40px;
  border: 1px solid var(--accent);
  background: #000;
}

.logo { display: block; width: 180px; height: 41px; margin-left: auto; }
.logo img { width: 180px; height: auto; }

.content { margin-top: 66px; line-height: 20px; }   /* first line's cap-top lines up with the COMPANY menu item on every page */
.content--flow { margin-right: -2px; }   /* company page: the original text block is 2px wider */
.content p { text-align: justify; text-justify: inter-word; hyphens: none; -webkit-hyphens: none; }
.content p + p { margin-top: 18px; }
.content--flow p + p { margin-top: 0; }   /* company page: paragraphs run on without a gap, as in the original */

/* ---------- Splash (index) ---------- */

.panel--splash { padding: 138px 28px 0 0; }
.splash-logo { display: block; width: 247px; max-width: 100%; margin: 0 0 0 auto; }
.splash-logo img { width: 247px; max-width: 100%; height: auto; }

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

.contact { display: grid; grid-template-columns: 1fr 171.3px; column-gap: 0; margin-top: 67px; }   /* right column starts exactly at the logo's left edge: logo is 180px wide with 10.2px of margin before the first box (+1px for the font's side bearing) */
.contact p, .contact li { line-height: 18px; }
.contact li { height: 18px; white-space: nowrap; }   /* fixed line pitch, so what follows the links sits at the same place on every screen */
.contact .hash { font-family: "Lustria", var(--font); font-size: 12px; line-height: inherit; margin-right: 3px; }
.contact .legal { margin-top: 54px; line-height: 18px; }
.contact .legal p + p { margin-top: 0; }
@media (min-width: 660px) {
  .contact .legal { margin-top: 37px; }   /* first line lines up with the top of the CONTACT menu item */
}
.contact a { display: inline-block; }

/* ---------- Small screens: menu on top, panel fills the width, readable type ---------- */

@media (max-width: 659px) {
  body { font-size: 12px; line-height: 17px; }
  .menu a { font-size: 13px; line-height: 16px; }
  .contact p, .contact li, .contact .legal { line-height: 14px; }
  .page { flex-direction: column; align-items: stretch; gap: 18px; padding: 12px 16px 40px !important; max-width: 560px; margin: 0 auto; }
  @supports (margin-left: round(down, 1px, 1px)) { .page { margin: 0 0 0 max(0px, round(down, calc((100% - 560px) / 2), 1px)); } }
  .menu { order: 0; flex: none; margin-top: 0; }
  .menu ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 4px; }
  .menu li + li { margin-top: 0; }
  .menu a { padding: 13px 9px; }
  .panel { order: 1; flex: none; width: 100%; min-height: 0; padding: 24px 20px 32px; }
  /* same border size on all four pages: tall enough for the longest page (Company) at any phone width */
  .panel:not(.panel--splash) { min-height: max(326px, calc(530px - 0.6 * (100vw - 320px))); }
  .content,   .content p + p { margin-top: 14px; }
  .content--flow p + p { margin-top: 0; }
  .content--flow { margin-right: 0; }
  .content p { text-align: left; }
  .panel--splash { padding: 90px 16px; }
  .splash-logo { margin: 0 auto; }
  .contact { grid-template-columns: 1fr 171.3px; margin-top: 36px; }   
  .contact a { padding: 6px 0; margin: -6px 0; }   /* keeps a bigger tap area without adding line spacing */
  .contact li { height: 14px; white-space: nowrap; }   /* fixed pitch: the fallback font for ( + # would otherwise stretch some lines by 1px */
}

@media (max-width: 359px) {
  .menu a { font-size: 12px; padding: 13px 6px; }
}

@media (max-width: 479px) {
  .contact { grid-template-columns: 1fr; row-gap: 28px; }
  .contact .legal { margin-top: 28px; }
}

/* ---------- Privacy policy (plain reading page) ---------- */

body.doc { text-transform: none; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.6; }
.doc-wrap { max-width: 46rem; margin: 0 auto; padding: 48px 20px 64px; }
.doc-wrap h1 { font-family: var(--font); text-transform: uppercase; font-weight: 400; font-size: 24px; line-height: 1.3; margin-bottom: 24px; }
.doc-wrap h2 { font-size: 18px; line-height: 1.4; margin: 32px 0 8px; color: #fff; }
.doc-wrap p { margin: 0 0 16px; }
.doc-wrap ul { list-style: disc; padding-left: 1.4em; margin: 0 0 16px; }
.doc-wrap li + li { margin-top: 6px; }
.doc-wrap a { color: #d96c26; text-decoration: underline; }
.doc-wrap a:hover { color: #fff; }
.doc-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--accent); font-size: 14px; }
.doc-back { display: inline-block; margin-bottom: 24px; font-family: var(--font); text-transform: uppercase; text-decoration: none !important; color: #fff !important; }

@media (prefers-reduced-motion: reduce) { a { transition: none; } }

@media print {
  html, body { background: #fff; color: #000; }
  .menu { display: none; }
  .page { padding: 0; display: block; }
  .panel { border-color: #000; width: auto; min-height: 0; }

}
