/* ArchByte Enterprise website
   Layout: one left-aligned reading column; products appear as arch-topped doorways.
   Colours and type come from the ArchByte brand guide v1.0 (Brand/04 Colour). */

@font-face {
  font-family: "Familjen Grotesk";
  src: url("/assets/fonts/familjen-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F6F1EA;      /* Bone */
  --surface: #FFFFFF;
  --ink: #3A1E3F;        /* Aubergine */
  --text: #3A1E3F;
  --muted: #6B5A6D;      /* Dusk, 5.65:1 on Bone */
  --link: #7E4A93;       /* Plum, 5.68:1 on Bone */
  --byte: #A86BC2;       /* Orchid, graphics only */
  --line: rgb(58 30 63 / 0.14);
  --tint: #EDE5EC;       /* Mist */
  --on-ink: #F6F1EA;

  --pp-emerald: #087A4E; /* Pesewa Peeper brand colour (its app icon ground), only inside its doorway */
  --densu-orange: #EA580C; /* Densu brand colour, used only inside its doorway */

  --font: "Familjen Grotesk", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 1.875rem);
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --step-4: clamp(2.5rem, 1.6rem + 4.2vw, 4.25rem);

  --gutter: max(1rem, env(safe-area-inset-left, 0px));
  --gutter-r: max(1rem, env(safe-area-inset-right, 0px));
  --measure: 38rem;
  --wide: 72rem;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #21122A;    /* Night */
    --surface: #2B1934;
    --ink: #FFFFFF;
    --text: #F3E9F5;
    --muted: #B9A6BC;    /* Haze, 7.80:1 on Night */
    --link: #D9AEEA;     /* Lilac, 9.45:1 on Night */
    --byte: #D9AEEA;
    --line: rgb(243 233 245 / 0.16);
    --tint: #2E1B37;
    --on-ink: #21122A;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 var(--step-0)/1.6 var(--font);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--byte); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { color: var(--ink); font-weight: 700; letter-spacing: -0.022em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); line-height: 1.02; }
h2 { font-size: var(--step-3); line-height: 1.08; }
h3 { font-size: var(--step-2); line-height: 1.15; letter-spacing: -0.015em; }
p { margin: 0; max-width: var(--measure); }
.lede { font-size: var(--step-1); color: var(--muted); line-height: 1.5; }
.muted { color: var(--muted); }

.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 10;
  background: var(--ink); color: var(--on-ink); padding: 0.6rem 1rem; border-radius: var(--radius);
}
.skip:focus { top: 0.75rem; }

.wrap {
  width: 100%; max-width: calc(var(--wide) + 2rem); margin-inline: auto;
  padding-left: var(--gutter); padding-right: var(--gutter-r);
}
main { display: block; }
.section { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.section + .section { border-top: 1px solid var(--line); }
.stack { display: grid; gap: 1.25rem; align-content: start; }

/* Header */
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; padding-block: 1.1rem; }
.brand { display: inline-flex; border-radius: 6px; }
.brand img { height: 2.25rem; width: auto; }
.nav { display: flex; gap: 0.25rem 1.4rem; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; padding-block: 0.4rem; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--byte); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.button {
  display: inline-flex; align-items: center; min-height: 2.9rem; padding: 0.6rem 1.15rem;
  border-radius: var(--radius); font-weight: 600; text-decoration: none;
  background: var(--ink); color: var(--on-ink); border: 1.5px solid var(--ink);
}
.button:hover { text-decoration: none; filter: brightness(1.12); }
.button.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.button.quiet:hover { border-color: var(--ink); filter: none; }

/* Hero */
.hero { padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem) clamp(2rem, 1rem + 3vw, 3.5rem); }
.hero .wrap { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 4rem); }
.hero h1 { max-width: 13ch; }
@media (min-width: 60rem) {
  .hero-home .wrap { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: end; }
}

/* Doorways: arch-topped panels. A 3:4 box with a semicircular top
   needs a vertical radius of (width / 2) / height = 37.5%. */
.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.6rem, 0.3rem + 1.5vw, 1.25rem); margin: 0; padding: 0; list-style: none; }
.door-link { display: grid; gap: 0.7rem; color: inherit; text-decoration: none; border-radius: 12px; }
.door {
  aspect-ratio: 3 / 4; width: 100%;
  border-radius: 50% 50% 8px 8px / 37.5% 37.5% 8px 8px;
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.door img { width: 52%; }
.door.pp img { width: 68%; }
.door.pp { background: var(--pp-emerald); }
.door.densu { background: var(--densu-orange); }
.door.soon { border: 2px dashed color-mix(in srgb, var(--ink) 38%, transparent); background: transparent; }
.door.soon .byte { width: 18%; aspect-ratio: 1; background: var(--byte); border-radius: 2px; position: absolute; bottom: 0; }
.door-name { font-weight: 700; color: var(--ink); line-height: 1.2; font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.1rem); }
.door-status { display: block; font-weight: 400; color: var(--muted); font-size: var(--step--1); margin-top: 0.15rem; }
.door-link:hover .door-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }

@media (prefers-reduced-motion: no-preference) {
  .doors li { animation: rise 600ms cubic-bezier(.2,.7,.2,1) both; }
  .doors li:nth-child(2) { animation-delay: 90ms; }
  .doors li:nth-child(3) { animation-delay: 180ms; }
  @keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
}

/* Facts list */
.facts { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; gap: 0.25rem 2rem; padding-block: 1.1rem; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; color: var(--ink); }
.facts dd { margin: 0; color: var(--muted); max-width: var(--measure); }
@media (min-width: 48rem) {
  .facts > div { grid-template-columns: minmax(12rem, 1fr) 2fr; }
}

.split { display: grid; gap: 2rem; }
@media (min-width: 60rem) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 4rem; } }

/* Product detail */
.product { display: grid; gap: 2rem; }
.product .door { max-width: 10rem; }
@media (min-width: 52rem) { .product .door { max-width: 13rem; } }
.product-head { display: grid; gap: 0.6rem; }
.status { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; font-size: var(--step--1); color: var(--ink); background: var(--tint); border-radius: 999px; padding: 0.25rem 0.75rem; width: fit-content; }
.status::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 2px; background: var(--byte); }
.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.55rem; max-width: var(--measure); }
.ticks li { padding-left: 1.4rem; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.5rem; height: 0.5rem; background: var(--byte); border-radius: 1px; }
@media (min-width: 52rem) {
  .product { grid-template-columns: 13rem minmax(0, 1fr); gap: 3.5rem; align-items: start; }
}

/* Placeholder text that still needs real content (see TODO.md) */
.ph { background: var(--tint); border-radius: 4px; padding: 0 0.3em; font-weight: 600; color: var(--ink); }

/* Contact */
.contact-line { font-size: var(--step-2); font-weight: 700; color: var(--ink); letter-spacing: -0.015em; user-select: all; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; font-size: var(--step--1); color: var(--muted); }
.site-footer .wrap { display: grid; gap: 1.5rem; }
.site-footer .brand img { height: 1.9rem; }
.site-footer .nav a { color: var(--muted); font-weight: 400; }
.legal { display: grid; gap: 0.3rem; }
@media (min-width: 48rem) {
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: start; }
  .legal { grid-column: 1 / -1; }
}

.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none; }
  .logo-dark { display: block; }
}

.mark-img { width: 5rem; }
