/* intellesson.com - the umbrella site.

   Light, white, Quicksand: the same voice as the original hand-built site, kept on
   purpose so this reads as Intellesson and not as any one product. The white
   banner (#headerwhite) and the footer (#footerrec) are the ORIGINAL ones from the
   Oct 24 site, rebuilt once here with fluid rules instead of six copied breakpoints.

   Narrative Studio is a separate site on the same domain with its own look; it
   does not load this file. Every other Intellesson page does, and gets the banner,
   the footer and these variables for free. */

@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap');

:root {
  --bg: #ffffff;
  --paper: #f7f4ee;        /* warm off-white for alternate sections */
  --panel: #ffffff;
  --line: #e5e1d9;
  --text: #1a1a1a;
  --muted: #5e5e5e;
  --accent: #ed3533;       /* Intellesson red, from the wordmark and the treehouse */
  --accent-dim: #c72523;
  --ink: #444444;          /* wordmark grey */
  --radius: 14px;

  --display: 'Quicksand', 'Segoe UI', system-ui, sans-serif;
  --body: 'Quicksand', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 8rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; }
img { max-width: 100%; height: auto; }
b, strong { font-weight: 700; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip:focus {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 100;
  width: auto; height: auto; margin: 0; padding: 0.6rem 0.9rem; clip: auto;
  background: var(--accent); color: #fff; border-radius: 6px; text-decoration: none;
}

/* ====================================================================
   THE WHITE BANNER - original header, ids unchanged
   ==================================================================== */

#headerwhite {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center;
  width: 100%;
  background-color: rgb(255, 255, 255);
  border-bottom: 1px solid var(--line);
}

#headercontainer {
  display: flex; flex-direction: row;
  justify-content: space-between; align-items: center;
  width: 100%; max-width: 1200px;
  min-height: 70px;
  padding: 0 20px;
  gap: 2rem;
}

#bitelogolink { display: flex; align-items: center; flex: none; }
#bitelogo { display: block; height: 40px; width: auto; margin-bottom: 1%; }

#linklistheadercontainer {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 1.5rem; flex: 1 1 auto; margin-right: 3%;
}

#linklistheader {
  list-style: none; padding: 0; margin: 0;
  display: flex; justify-content: center; align-items: center;
}
#linklistheader li { margin-right: clamp(18px, 3.5vw, 50px); }
#linklistheader li:last-child { margin-right: 0; }
#linklistheader a {
  text-decoration: none; color: black;
  font-size: 13pt; font-family: var(--display); font-weight: 500;
  white-space: nowrap;
}
#linklistheader a:hover { color: red; }
#linklistheader a[aria-current="page"] { color: var(--accent); font-weight: 700; }

#socialcontainer { position: relative; display: flex; align-items: center; flex: none; }

/* Projects sub-bar, directly beneath the main banner. */
#projectsbar {
  width: 100%;
  display: flex; justify-content: center;
  background: var(--paper);
  border-top: 1px solid var(--line);
}
#projectscontainer {
  display: flex; align-items: center; gap: 1.5rem;
  width: 100%; max-width: 1200px; min-height: 42px;
  padding: 0 20px;
}
#linklistprojects {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: clamp(14px, 3vw, 40px);
}
#linklistprojects a {
  text-decoration: none; color: var(--ink);
  font-family: var(--display); font-weight: 600; font-size: 11.5pt;
  white-space: nowrap;
}
#linklistprojects a:hover { color: red; }
#linklistprojects a[aria-current="page"] { color: var(--accent); font-weight: 700; }
#socialcontainer a { display: flex; }
.social { height: 20px; width: auto; padding-left: 15px; }

/* Language switcher: hidden while empty (single language). */
.lang-switcher { display: inline-flex; gap: 0.25rem; }
.lang-switcher:empty { display: none; }
.lang-option {
  font: inherit; font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
}
.lang-option[aria-current="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }

/* Hamburger: hidden on desktop, replaces the inline nav on phones. */
#navtoggle {
  display: none; flex: none; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; width: 40px; height: 40px; padding: 0; margin-left: auto;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer;
}
#navtoggle span {
  display: block; width: 16px; height: 2px; border-radius: 2px; background: var(--text);
  transition: transform .18s ease, opacity .18s ease;
}
#headerwhite.nav-open #navtoggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
#headerwhite.nav-open #navtoggle span:nth-child(2) { opacity: 0; }
#headerwhite.nav-open #navtoggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  #headercontainer { flex-wrap: wrap; padding: 12px 16px; gap: 0.5rem; }
  #bitelogo { height: 28px; }
  #socialcontainer { order: 2; margin-left: auto; }
  #navtoggle { display: flex; order: 3; margin-left: 0.75rem; }
  #linklistheadercontainer {
    display: none; order: 4;
    width: 100%; flex-basis: 100%; margin: 0; padding: 0.5rem 0 0.75rem;
    justify-content: flex-start;
  }
  #headerwhite.nav-open #linklistheadercontainer { display: flex; flex-direction: column; align-items: stretch; }
  #projectsbar { display: none; }
  #headerwhite.nav-open #projectsbar { display: flex; }
  #projectscontainer { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 16px 0.75rem; }
  #linklistprojects { flex-direction: column; align-items: stretch; gap: 0; }
  #linklistprojects li { border-top: 1px solid var(--line); }
  #linklistprojects a { display: block; padding: 0.7rem 0.25rem; }
  #linklistheader { flex-direction: column; align-items: stretch; width: 100%; }
  #linklistheader li { margin: 0; border-top: 1px solid var(--line); }
  #linklistheader a { display: block; padding: 0.7rem 0.25rem; }
}

/* ====================================================================
   BUTTONS
   ==================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  padding: 0.75rem 1.4rem; border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--text); }
.btn.ghost:hover { background: var(--text); color: #fff; }
.btn.quiet { background: transparent; color: var(--accent); border-color: transparent; padding-left: 0; padding-right: 0; }
.btn.quiet:hover { color: var(--accent-dim); transform: none; text-decoration: underline; }

/* ====================================================================
   HOMEPAGE
   ==================================================================== */

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(3.5rem, 9vw, 7.5rem) 0 clamp(3rem, 7vw, 5.5rem);
  background: #1c1c1c;   /* dark while the screens load, so there is no grey wash */
}
.hero-content { position: relative; z-index: 2; }

/* ---------- hero marquee: three rows of screens drifting behind the copy ---------- */
.hero-marquee {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; justify-content: center;
  gap: 0;
  pointer-events: none;
}
/* White wash so the headline reads: solid on the left, thinning to the right,
   plus a soft fade at top and bottom. */
.hero-marquee::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.8) 60%, rgba(0,0,0,0) 100%);
}
.marquee-row {
  height: calc(100% / 3);
  display: flex; gap: 0;
  width: max-content;
  animation: marquee var(--dur, 90s) linear infinite;
  animation-delay: var(--delay, 0s);
  will-change: transform;
  opacity: 0; transition: opacity .8s ease;   /* home.js adds .ready once the row has loaded */
}
.marquee-row.ready { opacity: 1; }
.marquee-row.reverse { animation-direction: reverse; }
.marquee-row img {
  display: block; flex: none;
  height: 100%; width: auto;
  aspect-ratio: 1022 / 541;          /* reserves each tile's width before it loads */
}
/* Each row holds its tiles twice; sliding by half its width loops seamlessly. */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) { .marquee-row { animation-play-state: paused; } }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--display); font-weight: 700; font-size: 13px;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent);
}
.hero h1 {
  margin: 0 0 1.25rem; max-width: 12em;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.3rem, 5.6vw, 4.4rem); line-height: 1.04; letter-spacing: -0.02em;
  color: #fff;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lede {
  font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.55; max-width: 34em;
  margin: 0 0 1rem; color: #fff;
}
.hero-sub { color: rgba(255,255,255,0.8); max-width: 31em; margin: 0 0 2rem; }

/* The four projects, as a compact index card beside the headline. */
.hero-index {
  list-style: none; margin: 0; padding: 0;
  border-top: 2px solid var(--text);
}
.hero-index li { border-bottom: 1px solid var(--line); }
.hero-index a {
  display: grid; grid-template-columns: 2.5rem 1fr auto; align-items: baseline; gap: 0.75rem;
  padding: 0.85rem 0.25rem; text-decoration: none; color: var(--text);
  transition: padding-left .15s ease, color .15s ease;
}
.hero-index a:hover { padding-left: 0.6rem; color: var(--accent); }
.hero-index .n { font-weight: 700; font-size: 13px; color: var(--accent); letter-spacing: 0.08em; }
.hero-index .t { font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.hero-index .s { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- section scaffolding ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section.paper { background: var(--paper); }
.section-head { max-width: 62ch; margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.section-head h2, .project h2 {
  margin: 0 0 0.6rem;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.12; letter-spacing: -0.015em;
}
.section-head p { margin: 0; color: var(--muted); font-size: 1.05rem; }

.rule {
  display: flex; align-items: center; gap: 0.75rem;
  margin: 0 0 1rem;
  font-family: var(--display); font-weight: 700; font-size: 13px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent);
}
.rule::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ---------- the projects ---------- */
.project {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(1.5rem, 5vw, 4.5rem); align-items: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
}
.project:first-of-type { border-top: 0; padding-top: 0; }
.project.flip .project-copy { order: 2; }
.project.flip .project-art { order: 1; }

.project h2 em { font-style: normal; color: var(--accent); }
.project p { color: var(--muted); max-width: 58ch; margin: 0 0 1rem; }
.project p.lead { color: var(--text); font-size: 1.12rem; }
.project-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center;
  margin: 0 0 1.25rem; font-size: 13px; color: var(--muted);
}
.project-meta .sep { opacity: 0.4; }
.project-actions { display: flex; flex-wrap: wrap; gap: 0.6rem 1.25rem; align-items: center; margin-top: 1.5rem; }

/* Status pill: three states, matching how the projects actually stand. */
.status {
  display: inline-flex; align-items: center; gap: 0.4em;
  padding: 0.28rem 0.7rem; border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: 0.04em;
  border: 1.5px solid currentColor;
}
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.now  { color: #1f7a3f; }
.status.ask  { color: #1a1a1a; }
.status.soon { color: #b3671a; }

/* Artwork panels. Each project gets a soft tile in its own hue so the page has
   colour without borrowing any one product's branding wholesale. */
.project-art {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 280px; padding: clamp(1.25rem, 3vw, 2.5rem);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}
.project-art img { display: block; max-width: 100%; height: auto; }
.project-art.playtolearn { background: #e6f2ee; }
.project-art.fastphonics { background: #fdf0e6; }
.project-art.narrative  { background: #ebebef; }


.project-art.playtolearn img { width: min(240px, 60%); filter: drop-shadow(0 12px 24px rgba(0,0,0,0.15)); }
.project-art.playtolearn iframe { display: block; width: 100%; aspect-ratio: 43 / 27; border: 0; }
.project-art.fastphonics img { width: min(460px, 100%); }
.project-art.fastphonics { padding: 0; min-height: 0; }
.project-art.fastphonics iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
/* The playable Unit 1 gets the larger share of its row. */
@media (min-width: 901px) {
  #fastphonics { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
}
.project-art.narrative img {
  width: 100%; border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.22);
}

/* ---------- Play to Learn: the space band ---------- */
/* A full-bleed starfield behind the article, fixed to the viewport so the
   section scrolls over it (the same effect as repspace.png on alphatrax.html).
   space-bg.js paints the stars and hands them over as --space-img; until then,
   or without JS, the plain indigo gradient shows. No transform on ::before:
   a transformed box turns background-attachment: fixed back into scroll.
   #projects clips the 100vw overflow (see ns-workflow.css). */
.project.space {
  --text: #f4f2ff;
  --muted: #c4bfe0;
  position: relative; isolation: isolate;
  color: var(--text);
  border-top: 0;
}
.project.space::before {
  content: ''; position: absolute; z-index: -1;
  top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw;
  background-color: #030306;
  background-image: var(--space-img, radial-gradient(ellipse at 50% 50%, #07070f 0%, #020205 75%));
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
.project.space + .project { border-top: 0; }
.project.space .status.soon { color: #ffb45e; }
.project.space .btn.ghost:hover { color: #0c0922; }
.project.space .btn.quiet { color: #ff6b69; }
.project.space .project-art.playtolearn { background: transparent; padding: 0; }

/* ---------- Alphatrax word demo ---------- */
/* Proportions are taken from the real card (images/alphahomecat.png, 624x442):
   the track sits at 91.7% of the card width with an 8px line and 22px balls
   against a 129px word, so every track dimension here is a ratio of the font
   size rather than a fixed pixel value. The card keeps the artwork's 624:442
   shape, and the font is sized by the app's own rule (renderAT in
   vrm-atfc.html): the smaller of 22% of the card height and the width divided
   by the letter count. */

#atx-demo { width: 100%; display: flex; flex-direction: column; gap: 0.75rem; }

.atx-searchrow { position: relative; }
#atx-search {
  width: 100%; padding: 0.6rem 0;
  font-family: var(--display); font-size: 17px; font-weight: 600; color: var(--text);
  background: none; border: 0; border-bottom: 2px solid var(--text);
}
#atx-search::placeholder { color: var(--muted); font-weight: 500; }
#atx-search:focus { outline: none; border-bottom-color: var(--accent); }

#atx-results {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 5;
  max-height: 250px; overflow-y: auto;
  list-style: none; margin: 0; padding: 0;
  background: #fff; border: 2px solid var(--text);
}
#atx-results button {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  width: 100%; padding: 0.4rem 0.75rem;
  font-family: var(--display); font-size: 15px; font-weight: 600; text-align: left;
  background: none; border: 0; cursor: pointer; color: var(--text);
}
#atx-results button:hover, #atx-results button.picked { background: var(--paper); color: var(--accent); }
#atx-results .atx-cat { font-size: 12px; font-weight: 500; color: var(--muted); }

/* The card, in the artwork's shape and colour. cqw keeps the corner radius and
   the mute button in proportion at any card size: the corner radius is kept modest;
   38px across 624px, so 6.09cqw reproduces it and stays circular. */
.atx-stage { position: relative; container-type: inline-size; }

#atx-card {
  position: relative;
  aspect-ratio: 624 / 442;
  background: #343433;
  border-radius: 2.6cqw;
  /* The whole card is a drag surface, so nothing in it should highlight,
     select or flash blue under a finger. */
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  /* pan-y, not none: a horizontal drag still seeks the ball, but a vertical
     swipe scrolls the page instead of being trapped by the card. */
  touch-action: pan-y;
  cursor: grab;
}
#atx-card:active { cursor: grabbing; }
#atx-card img { -webkit-user-drag: none; }

#atx-mute {
  position: absolute; top: 3.2cqw; right: 3.2cqw; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  width: 7cqw; height: 7cqw; min-width: 26px; min-height: 26px;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: #fff; opacity: 0.45; transition: opacity 0.2s;
}
#atx-mute:hover, #atx-mute:focus-visible { opacity: 1; }
#atx-mute svg {
  width: 100%; height: 100%;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
#atx-mute .spk { fill: currentColor; stroke: none; }
#atx-mute.muted .waves { display: none; }
#atx-mute:not(.muted) .slash { display: none; }

.atx-columns {
  position: absolute; left: 0; right: 0; transform: translateY(-50%);
  display: flex; align-items: flex-end; justify-content: center;
}
.atx-grapheme { position: relative; display: flex; flex-direction: column; align-items: center; }

/* The wrapper does the centring so the per-icon scale below is free to use
   transform-origin: bottom center without fighting it. */
.atx-phicon {
  position: absolute; bottom: calc(100% + 0.08em);
  left: 50%; transform: translateX(-50%);
  display: block; opacity: 0; transition: opacity 0.3s;
  pointer-events: none;
  /* Without this the absolutely positioned wrapper shrink-wraps to the column,
     so the same icon came out narrower over a one-letter column than a two. */
  width: max-content;
}
.atx-phicon.visible { opacity: 1; }
.atx-phicon img {
  display: block;
  object-fit: contain; object-position: bottom center;
  transform: scale(var(--phscale, 1));
  transform-origin: bottom center;
}

.atx-letters span {
  font-family: var(--display); font-weight: 700;
  color: #fff; text-align: center;
  padding: 0 0.10em; line-height: 1.1;
  white-space: pre;            /* keeps the space column in two-word entries */
  transition: color 0.3s;
}

/* 91.7% of the card width, as in the artwork; the canvas fills this box. */
.atx-track { position: absolute; left: 4.15%; width: 91.7%; transform: translateY(-50%); }

.atx-meta {
  position: absolute; bottom: 4%; left: 0; right: 0;
  margin: 0; color: #b9b9b9; text-align: center;
  font-family: var(--display); font-weight: 500;
  font-size: 3.6cqw;              /* scales with the card, like everything else */
}
.atx-error { color: #fff; margin: 0; padding: 2rem; }
.atx-note { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ---------- people ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(1.5rem, 4vw, 3rem); }
.person { border-top: 2px solid var(--text); padding-top: 1.25rem; }
.person h3 { margin: 0 0 0.2rem; font-family: var(--display); font-weight: 700; font-size: 1.5rem; }
.person .role { margin: 0 0 0.9rem; color: var(--accent); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.person p { margin: 0 0 0.75rem; color: var(--muted); }
.person a { color: var(--text); }

/* ====================================================================
   THE ORIGINAL FOOTER - ids unchanged
   ==================================================================== */

#footerrec {
  background-color: white;
  position: relative; z-index: 1;
  display: flex; justify-content: center;
  padding: 40px 20px;
  border-top: 1px solid var(--line);
}
/* Treehouse | black rule | three columns (projects, company, contact) with the
   copyright line underneath, all centred on the page's 1200px column. */
#footercontainer {
  display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3rem);
  width: 100%; max-width: 1200px;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}
#treehouselogo { height: 190px; width: auto; flex: none; }
#blackline { height: 170px; width: auto; flex: none; }
#linklistfooter {
  flex: 1; min-width: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, max-content));
  justify-content: space-between; gap: 1.5rem clamp(2rem, 6vw, 5rem);
  font-family: var(--display); font-size: 15px; color: var(--text);
}
.foothead {
  margin: 0 0 0.8rem;
  font-weight: 700; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent);
}
#linklistfooter ul { list-style: none; padding: 0; margin: 0; }
#linklistfooter li { margin: 0 0 0.45rem; }
#linklistfooter a { text-decoration: none; color: var(--text); }
#linklistfooter a:hover { color: var(--accent); }
#footersocialcontainer { display: flex; gap: 0.9rem; margin-top: 1rem; }
#footersocialcontainer a { display: flex; }
.footersocial { height: 26px; width: auto; display: block; }
#footerlegal {
  grid-column: 1 / -1; margin: 0.5rem 0 0; padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}

/* ====================================================================
   PHONES & TABLETS
   ==================================================================== */

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .project, .project.flip { grid-template-columns: 1fr; }
  .project.flip .project-copy { order: 1; }
  .project.flip .project-art { order: 2; }
  .project-art { min-height: 220px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  #footercontainer { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  #treehouselogo { height: 130px; }
  #blackline { display: none; }
  #linklistfooter { width: 100%; grid-template-columns: 1fr 1fr; justify-content: start; }
  #footeraddress { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .hero-index a { transition: none; }
}
