/* rougeworks.dev
   The site is themed from the Rouge Works logo: navy ink, river red and map
   paper, with the River Rouge topo map from the app's Field Guide theme
   (EchoCam/Theme.swift, surface .topo). Thenscape's pages add
   `class="thenscape"` to <body>, which swaps in the app's Kodachrome colours
   (EchoCam/Themes.swift) inside the same layout. */

@font-face {
  font-family: "Shrikhand";
  src: url("/fonts/Shrikhand-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Rethink Sans";
  src: url("/fonts/RethinkSans-Variable.ttf") format("truetype");
  font-weight: 400 800;
  font-display: swap;
}

/* Rouge Works */
:root {
  --navy: #1F2D3A;
  --rouge: #8E1F23;
  --background: #F4F2EB;
  --card: #FFFFFF;
  --ink: #1F2D3A;
  --ink-secondary: #59656F;
  --accent: #8E1F23;
  --accent-text: #8E1F23;
  --on-accent: #FFFFFF;
  --rule: #DAD9D0;
  --contour: #D3D6D2;
  --water: rgb(142 31 35 / 0.18);
  --card-radius: 14px;
  --card-edge: 1px solid var(--rule);
  --card-shadow: 0 1px 2px rgb(31 45 58 / 0.06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #121A22;
    --card: #1A2530;
    --ink: #E9ECEA;
    --ink-secondary: #A2ADB6;
    --accent: #C8474B;
    --accent-text: #E26E70;
    --rule: #283541;
    --contour: #243240;
    --water: rgb(200 71 75 / 0.22);
    --card-shadow: none;
  }
}

/* Thenscape: the app's Kodachrome look */
body.thenscape {
  --background: #F6E7C8;
  --card: #FFFDF6;
  --ink: #4A2716;
  --ink-secondary: #7A5238;
  --accent: #E35B25;
  --accent-text: #AE461C;
  --on-accent: #FFFDF6;
  --wordmark: #DC5823;
  --rule: #E2CDA4;
  --card-radius: 10px;
  --card-edge: 0;
  --card-shadow: 0 2px 0 var(--rule);
}
@media (prefers-color-scheme: dark) {
  body.thenscape {
    --background: #22130A;
    --card: #3A2214;
    --ink: #F6E7C8;
    --ink-secondary: #C9B394;
    --accent-text: #E66D3C;
    --wordmark: #E35B25;
    --rule: #140B05;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font: 1.0625rem/1.6 "Rethink Sans", system-ui, -apple-system, sans-serif;
}

/* Every page opens with the Rouge Works bar: navy with a red line, like the
   logo's frame and river. */
.topbar {
  height: 8px;
  background: var(--navy);
  border-bottom: 3px solid var(--rouge);
}
/* Thenscape's pages add the app's colour bands under it. */
.stripes {
  height: 8px;
  background: linear-gradient(to right,
    #8E9B3A 0 20%, #E8A93A 20% 40%, #D9822B 40% 60%, #C4511F 60% 80%, #4E8F8B 80% 100%);
}

header, main, footer, .wrap {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
header .brand {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
header .brand span { color: var(--ink-secondary); font-weight: 500; letter-spacing: 0.04em; text-transform: none; }
nav { display: flex; gap: 1.25rem; }
nav a { color: var(--ink-secondary); text-decoration: none; font-weight: 500; }
nav a:hover, nav a[aria-current="page"] { color: var(--accent-text); }

/* Headings: the logo's spaced capitals on Rouge Works pages. */
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: 2rem; margin: 1.5rem 0 0.25rem; }
h2 {
  font-size: 0.9375rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 2.5rem 0 0.75rem;
}
body.thenscape h2 { font-size: 1.25rem; letter-spacing: normal; text-transform: none; margin: 2rem 0 0.5rem; }
p, li { max-width: 38rem; }
a { color: var(--accent-text); }

h1.wordmark {
  font-family: "Shrikhand", Georgia, serif;
  font-weight: normal;
  color: var(--wordmark);
  font-size: clamp(2.75rem, 11vw, 4.5rem);
  margin: 0;
}

.lede { font-size: 1.25rem; color: var(--ink-secondary); margin-top: 0.5rem; }
.meta { color: var(--ink-secondary); font-size: 0.9375rem; }
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0;
}

/* Home: the logo on the River Rouge map. */
.map {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.map::before, .map::after {
  content: "";
  position: absolute;
  inset: 0;
  -webkit-mask: var(--layer) center / cover no-repeat;
  mask: var(--layer) center / cover no-repeat;
}
.map::before { --layer: url("/topo-contours.png"); background: var(--contour); }
.map::after { --layer: url("/topo-water.png"); background: var(--water); }
.map .wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
.map .logo {
  flex: none;
  width: 13rem;
  margin: 0;
  background: #FFFFFF;
  border-radius: 18px;
  padding: 0.5rem;
  box-shadow: 0 8px 24px rgb(31 45 58 / 0.16);
}
.map .logo img { display: block; width: 100%; height: auto; }
.map h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); margin: 0.5rem 0; }
.map .lede { margin: 0; }
@media (max-width: 34rem) {
  .map .wrap { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .map .logo { width: 11rem; }
}

/* Thenscape: icon beside the wordmark. */
.hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 2rem 0 1rem;
}
.hero img {
  width: 112px;
  height: 112px;
  border-radius: 25px;
  flex: none;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.18);
}
@media (max-width: 30rem) {
  .hero { flex-direction: column; align-items: flex-start; }
}

.card {
  background: var(--card);
  border: var(--card-edge);
  border-radius: var(--card-radius);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--card-shadow);
}
.card > :first-child, body.thenscape .card > h2:first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

/* An app on the home page: its own colour bands along the top. */
a.app {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  position: relative;
  padding-top: 1.6rem;
}
a.app::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: var(--bands);
}
a.app.thenscape-bands { --bands: linear-gradient(to right,
    #8E9B3A 0 20%, #E8A93A 20% 40%, #D9822B 40% 60%, #C4511F 60% 80%, #4E8F8B 80% 100%); }
a.app:hover { border-color: var(--accent); }
a.app:hover h3 { color: var(--accent-text); }
a.app img {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  flex: none;
}
a.app h3 { font-size: 1.25rem; margin: 0 0 0.25rem; }
a.app p { margin: 0 0 0.5rem; }
a.app .meta { margin: 0; }
@media (max-width: 30rem) {
  a.app { flex-direction: column; }
}

.steps { padding-left: 1.25rem; }
.steps li { margin-bottom: 0.5rem; }

.badge {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 999px;
  padding: 0.6rem 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-secondary);
  font-size: 0.9375rem;
}
footer a { color: var(--ink-secondary); }
