/*
  The home screen of the site with every home (tools/build-site.mjs), in hexp.studio's own look, so it sits in Space
  as one of its pages: Archivo, Fraunces and JetBrains Mono (served from here, SIL Open Font License), ink and paper
  with the brand blue, square tiles; light or dark as the visitor chose on hexp.studio. Compact: a title, a tile for
  each home, and whose homes they are.
*/
@font-face { font-family: 'Archivo'; src: url('fonts/archivo.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces.woff2') format('woff2'); font-weight: 100 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 400 500; font-display: swap; }

:root {
  --blue: #1A50E6;
  --white: #F4F5F7;
  --black: #0A0A0C;
  --bg: #0A0A0C;
  --bg-2: #111114;
  --fg: #F4F5F7;
  --dim: rgba(244, 245, 247, 0.56);
  --line: rgba(244, 245, 247, 0.12);
  --accent-ink: #7B9BF4;
  --f-display: 'Archivo', system-ui, sans-serif;
  --f-serif: 'Fraunces', Georgia, serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: clamp(16px, 2.3vw, 32px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F4F5F7;
  --bg-2: #EBEDF2;
  --fg: #0A0A0C;
  --dim: rgba(10, 10, 12, 0.58);
  --line: rgba(10, 10, 12, 0.12);
  --accent-ink: #1A50E6;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 15px/1.5 var(--f-display); -webkit-font-smoothing: antialiased; overflow-x: clip; transition: background-color .5s, color .5s; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
::selection { background: var(--blue); color: var(--white); }

.nav, main, .foot { width: min(1240px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.nav { height: 64px; display: flex; align-items: center; gap: 22px; }
.logo { margin-right: auto; }
.back { font-size: 14px; color: var(--dim); transition: color .3s; }
.back:hover { color: var(--fg); }
.theme-btn { width: 18px; height: 18px; display: grid; place-items: center; }
.theme-btn span { width: 12px; height: 12px; background: linear-gradient(90deg, var(--fg) 50%, transparent 50%); box-shadow: inset 0 0 0 1px var(--fg); transition: transform .5s var(--ease); }
.theme-btn:hover span { transform: rotate(180deg); }

.label { font: 500 15px/1.3 var(--f-display); }
.kicker { color: var(--accent-ink); }
.display { font: 560 clamp(38px, 6vw, 92px)/0.88 var(--f-display); font-variation-settings: 'wdth' 118; text-transform: uppercase; margin-top: 10px; max-width: 14ch; }
.serif { font-family: var(--f-serif); font-weight: 330; font-variation-settings: 'opsz' 36; }
.lede { margin-top: 18px; max-width: 44em; color: var(--dim); font-size: clamp(18px, 1.45vw, 21px); line-height: 1.5; text-wrap: pretty; }
.ul { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); padding-bottom: 2px; }
.ul:hover { background-size: 100% 1px; }
.fine { margin-top: 16px; max-width: 92ch; color: var(--dim); font-size: 12.5px; line-height: 1.6; text-wrap: pretty; }
.fine a { color: var(--fg); }

.head { padding: clamp(24px, 6vh, 64px) 0 clamp(28px, 5vh, 48px); }

/* a tile for each home */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tile a { display: flex; flex-direction: column; gap: 8px; }
.shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line), 0 18px 40px -26px rgba(10, 10, 12, .45); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tile a:hover .shot img { transform: scale(1.04); }
.tag { position: absolute; left: 8px; top: 8px; padding: 3px 7px; font: 400 10px/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; background: var(--bg); color: var(--fg); }
.name { font: 500 18px/1.25 var(--f-display); margin-top: 4px; }
.line { font-size: 13px; line-height: 1.45; color: var(--dim); }
.go { display: inline-flex; align-items: center; gap: 6px; font: 400 12px/1.4 var(--f-mono); transition: color .3s; }
.go svg { width: .8em; height: .8em; }
.tile a:hover .go { color: var(--accent-ink); }

/* whose homes these are */
.whose { margin-top: clamp(48px, 8vh, 88px); padding-top: 22px; border-top: 1px solid var(--line); }
.why { margin-top: 10px; max-width: 46em; color: var(--dim); font-size: 17px; line-height: 1.55; text-wrap: pretty; }
.owners { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.owners article { padding-top: 12px; border-top: 1px solid var(--line); }
.owners h3 { font: 500 15px/1.3 var(--f-display); margin-bottom: 6px; }
.owners p { font-size: 13.5px; line-height: 1.6; color: var(--dim); }
.owners a { color: var(--fg); }

.foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-block: 20px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; }

@media (max-width: 640px) { .grid, .owners { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .shot img { transition: none; } .tile a:hover .shot img { transform: none; } }
