/* Glen Rose Labs. Everything is served from this site: no external fonts, scripts, or trackers. */

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Brand palette */
:root {
  --alabaster: #f4f1ea;
  --charcoal: #1e282c;
  --teal: #154e56;
  --terracotta: #c96a4b;
  --limestone: #e6dec8;
  --sky: #ede2cc; /* the hero illustration's sky, so the page blends into it */

  --display: "Montserrat", system-ui, sans-serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

/* Light theme. `.light` keeps the hero band light even when the visitor uses dark mode. */
:root,
.light {
  color-scheme: light;
  --bg: var(--alabaster);
  --surface: #fbf9f5;
  --band: var(--limestone);
  --text: var(--charcoal);
  --muted: #4b575b;
  --rule: var(--limestone);
  --link: var(--teal);
  --link-hover: #9a4529;
  --accent-text: #9a4529;
  --button: var(--teal);
  --button-text: var(--alabaster);
  --button-hover: #a9502f;
  --tag-bg: rgba(201, 106, 75, 0.14);
  --shadow: 0 1px 2px rgba(30, 40, 44, 0.05), 0 10px 30px rgba(30, 40, 44, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: var(--charcoal);
    --surface: #26343a;
    --band: #233036;
    --text: var(--limestone);
    --muted: #b3ad9f;
    --rule: rgba(230, 222, 200, 0.14);
    --link: #86c0c4;
    --link-hover: #e3896b;
    --accent-text: #e3896b;
    --button: #2c6e76;
    --button-text: var(--alabaster);
    --button-hover: #a9502f;
    --tag-bg: rgba(201, 106, 75, 0.2);
    --shadow: none;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--link-hover);
}

a:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  z-index: 10;
  left: 16px;
  top: -48px;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: 8px;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  display: block;
  width: 40px;
  height: 40px;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 24px;
}

.site-nav a,
.eyebrow {
  font-family: var(--display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

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

/* Type */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  letter-spacing: -0.02em;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

p {
  margin: 0 0 16px;
}

.muted,
.lede {
  color: var(--muted);
}

.lede {
  font-size: 1.15rem;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-text);
}

/* Hero */

.sky {
  background: var(--sky);
  color: var(--text);
}

.hero-text {
  position: relative;
  z-index: 1;
  max-width: 820px;
  padding-top: 48px;
  text-align: center;
}

.hero-text .lede {
  max-width: 36em;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 24px;
}

.hero-art,
.hero-art img {
  display: block;
  width: 100%;
}

/* Wide screens tuck the illustration's empty sky up under the text. */
@media (min-width: 641px) {
  .hero-text {
    padding-top: 64px;
  }

  .hero-art {
    margin-top: min(0px, calc(150px - 18vw));
  }
}

/* Sections */

.section {
  padding: 72px 0;
}

.section.band {
  background: var(--band);
}

.section-intro {
  max-width: 36em;
  margin-bottom: 32px;
}

/* App card */

.app-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px 28px;
  align-items: start;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.app-card img,
.app-hero img {
  width: 104px;
  height: 104px;
  border-radius: 23px;
}

.app-card h3 {
  font-size: 1.4rem;
}

.app-card h3 a {
  color: inherit;
  text-decoration: none;
}

.app-card h3 a:hover {
  color: var(--link-hover);
}

.app-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.tag {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--accent-text);
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
}

/* Principles */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A short terracotta ledge above each principle, echoing the badge's terraces. */
.principles li::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-bottom: 18px;
  border-radius: 2px;
  background: var(--terracotta);
}

.principles p {
  margin: 0;
  color: var(--muted);
}

/* Buttons */

.button {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 12px;
  background: var(--button);
  color: var(--button-text);
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.button:hover {
  background: var(--button-hover);
  color: var(--button-text);
}

.button:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

.text-link {
  font-weight: 600;
}

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

/* Footer: always on the dark brand background, where the dark lockup belongs. */

.site-footer {
  background: var(--charcoal);
  border-top: 1px solid rgba(230, 222, 200, 0.14);
  color: #b3ad9f;
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 48px;
}

.site-footer img {
  display: block;
  width: 170px;
  height: auto;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--limestone);
}

.site-footer a:hover {
  color: #e3896b;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: right;
}

/* App pages */

.app-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 40px 0 32px;
}

.app-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
}

.app-hero p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
  color: var(--muted);
}

.screens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 220px));
  gap: 16px;
  margin: 8px 0 48px;
  padding: 0;
  list-style: none;
}

.screens img {
  display: block;
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.prose {
  max-width: 720px;
  padding-bottom: 48px;
}

.prose h2 {
  margin: 40px 0 10px;
  font-size: 1.35rem;
}

.prose h3 {
  margin: 24px 0 4px;
  font-family: var(--sans);
  font-size: 1.05rem;
  letter-spacing: 0;
}

.prose p,
.prose li {
  color: var(--muted);
}

.prose strong {
  color: var(--text);
}

.prose ul {
  padding-left: 1.2em;
}

.card {
  margin: 16px 0;
  padding: 22px 22px 6px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 16px;
}

/* 404 */

.not-found .hero-text {
  padding-bottom: 8px;
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .site-header .wrap {
    column-gap: 16px;
  }

  .brand {
    gap: 10px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .wordmark {
    font-size: 0.88rem;
  }

  .site-nav {
    gap: 12px;
  }

  .site-nav a {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }

  .site-nav .optional {
    display: none;
  }

  .section {
    padding: 56px 0;
  }

  .app-card {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .app-card img,
  .app-hero img {
    width: 76px;
    height: 76px;
    border-radius: 17px;
  }

  .app-hero {
    gap: 16px;
  }

  .screens {
    gap: 10px;
  }

  .screens img {
    border-radius: 12px;
  }

  .footer-links {
    text-align: left;
  }
}
