/* ==========================================================================
   Late Hour Labs — site styles
   No external resources. Colors live in the custom properties below.
   ========================================================================== */

/* Manrope, self-hosted: one variable file covering weights 400–800 (Latin). */
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-wght.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallback so text doesn't jump when Manrope loads. */
@font-face {
  font-family: "Manrope Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica");
  size-adjust: 104.5%;
  ascent-override: 102%;
  descent-override: 28.7%;
  line-gap-override: 0%;
}

:root {
  --bg: #0A0D0C;
  --surface: #111614;
  --border: #252927;
  --text: #F2EEE5;
  --text-2: #9D9C96;
  --accent: #C8892B;
  --accent-hover: #DA9D42;
  --on-accent: #111111;

  --font: "Manrope", "Manrope Fallback", ui-sans-serif, system-ui, sans-serif;
  --container: 72rem;
  --gutter: clamp(1rem, 5vw, 3rem);
  --radius: 1.5rem;
  --header-h: 4.5rem;

  color-scheme: dark;
}

/* ---------- Base ---------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 48em) {
  body {
    font-size: 1.125rem; /* 18px */
  }
}

main {
  flex: 1;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.1;
  text-wrap: balance;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

ul[role="list"] {
  list-style: none;
  margin: 0;
  padding: 0;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

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

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* ---------- Header -------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(10 13 12 / 0.86);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark__mark {
  width: 1.375rem;
  height: 1.375rem;
  flex: none;
  color: var(--accent);
}

.site-nav__list {
  display: flex;
  gap: clamp(0.25rem, 2vw, 1.25rem);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.5rem;
  color: var(--text-2);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--text);
}

@media (min-width: 48em) {
  .wordmark {
    font-size: 1.1875rem;
  }
}

/* ---------- Buttons ------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 3.125rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.button__arrow {
  transition: transform 0.2s ease;
}

.button--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.button--primary:hover {
  background: var(--accent-hover);
}

.button--primary:hover .button__arrow {
  transform: translateY(2px);
}

.button--secondary {
  border-color: var(--accent);
  color: var(--text);
}

.button--secondary:hover {
  background: var(--accent);
  color: var(--on-accent);
}

.button--secondary:hover .button__arrow {
  transform: translateX(3px);
}

/* ---------- Hero ---------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  /* a warm lamp glow and a few faint stars */
  background:
    radial-gradient(1.5px 1.5px at 58% 18%, rgb(242 238 229 / 0.5), transparent),
    radial-gradient(1.5px 1.5px at 92% 12%, rgb(242 238 229 / 0.45), transparent),
    radial-gradient(1px 1px at 70% 64%, rgb(242 238 229 / 0.4), transparent),
    radial-gradient(1.5px 1.5px at 96% 58%, rgb(242 238 229 / 0.35), transparent),
    radial-gradient(1px 1px at 46% 8%, rgb(242 238 229 / 0.35), transparent),
    radial-gradient(1px 1px at 84% 84%, rgb(242 238 229 / 0.3), transparent),
    radial-gradient(ellipse 55% 65% at 85% 30%, rgb(200 137 43 / 0.11), transparent 70%);
}

.hero__inner {
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(3.5rem, 11vw, 9rem) clamp(4rem, 11vw, 8.5rem);
}

.hero__title {
  font-size: clamp(3rem, 12vw, 7.25rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.hero__lede {
  max-width: 30ch;
  margin-top: clamp(1.25rem, 3vw, 2rem);
  color: var(--text-2);
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.hero__actions {
  margin-top: clamp(2rem, 4vw, 2.75rem);
}

/* Crescent moon: a soft disc with an inset shadow as the lit edge. */
.hero__moon {
  --size: clamp(4.5rem, 20vw, 16rem);
  order: -1;
  justify-self: end;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: rgb(242 238 229 / 0.025);
  box-shadow:
    inset calc(var(--size) * 0.16) calc(var(--size) * -0.13) 0 0 var(--accent),
    0 0 calc(var(--size) * 0.7) rgb(200 137 43 / 0.16);
}

@media (min-width: 48em) {
  .hero__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .hero__moon {
    order: 0;
    margin-right: clamp(0rem, 3vw, 3rem);
  }
}

/* ---------- Sections ------------------------------------------------------ */

.section {
  padding-block: clamp(4rem, 10vw, 7.5rem);
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section__grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 60em) {
  .section__grid {
    grid-template-columns: minmax(12rem, 1fr) 3fr;
    gap: 3rem;
  }
}

.section__title {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section__title::before {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  margin-bottom: 1rem;
  border-radius: 2px;
  background: var(--accent);
}

/* ---------- About --------------------------------------------------------- */

.about__text {
  max-width: 36ch;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: -0.015em;
}

/* ---------- App cards (reusable: add one <li class="app-card"> per app) -- */

.app-list {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
}

.app-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.app-card__icon {
  width: 4.5rem;
  height: 4.5rem;
  flex: none;
  border-radius: 1.05rem;
}

.app-card__body {
  display: grid;
  gap: 0.6rem;
  justify-items: start;
}

.app-card__title {
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.app-card__text {
  max-width: 42ch;
  color: var(--text-2);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}

.status::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}

.app-card__link {
  align-self: flex-start;
  margin-top: auto;
}

/* With a single app, show it as one wide row instead of a lonely grid cell. */
@media (min-width: 48em) {
  .app-card:only-child {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
  }

  .app-card:only-child .app-card__link {
    align-self: center;
    margin: 0 0 0 auto;
    flex: none;
  }
}

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

.contact {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 40em) {
  .contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

.contact__label {
  margin-bottom: 0.75rem;
  color: var(--text-2);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact__email {
  font-size: clamp(1.25rem, 2.6vw, 1.625rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  transition: color 0.2s ease;
}

.contact__email:hover {
  color: var(--accent);
}

.contact__address {
  font-style: normal;
  font-size: 1.125rem;
  line-height: 1.7;
}

/* ---------- Legal pages (privacy, terms) ---------------------------------- */

.legal {
  padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(4rem, 10vw, 7.5rem);
}

.legal__header {
  margin-bottom: clamp(2.5rem, 6vw, 3.5rem);
}

.legal__title {
  font-size: clamp(2.5rem, 7vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.legal__title::before {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  margin-bottom: 1.25rem;
  border-radius: 2px;
  background: var(--accent);
}

.legal__updated {
  margin-top: 1rem;
  color: var(--text-2);
  font-size: 1rem;
}

.prose {
  max-width: 42rem;
}

.prose h2 {
  margin: 2.75rem 0 0.875rem;
  font-size: clamp(1.375rem, 2.5vw, 1.625rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.prose p + p,
.prose p + ul,
.prose ul + p,
.prose p + address {
  margin-top: 1rem;
}

.prose ul {
  margin: 0;
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose li::marker {
  color: var(--accent);
}

.prose strong {
  font-weight: 700;
}

.prose a {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: var(--accent);
}

.prose address {
  font-style: normal;
}

.legal-summary {
  margin-top: 2rem;
  padding: clamp(1.25rem, 4vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.prose .legal-summary h2 {
  margin-top: 0;
  font-size: 1.125rem;
}

/* ---------- 404 ----------------------------------------------------------- */

.not-found {
  padding-block: clamp(5rem, 16vw, 11rem);
}

.not-found__title {
  font-size: clamp(2.5rem, 9vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 2rem;
}

/* ---------- Footer -------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 2.5rem 3rem;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.site-footer__inner {
  display: grid;
  gap: 1rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--text);
  text-decoration-color: var(--border);
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.site-footer__links a:hover,
.site-footer__links a[aria-current="page"] {
  color: var(--accent);
  text-decoration-color: currentColor;
}

@media (min-width: 48em) {
  .site-footer__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 2rem;
  }

  .site-footer__links {
    grid-row: span 2;
  }
}

/* ---------- Reduced motion ------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
