/* IntermissionBox — matches the Redwood Toolkit Figma design
   (fileKey x1L5uTm2P70WjG08xuWYNl, node 346076:1837): Home + Projects, bottom tab nav. */

:root {
  --accent: #efbc43; /* the site's accent color — used wherever "accent color" is asked for */
  --text-primary: #161513;
  --text-secondary: rgba(22, 21, 19, 0.65);
  --header-bg: #f1efed;
  --nav-bg: #201e1c;
  --nav-icon: rgba(255, 255, 255, 0.65);
  --nav-icon-active: var(--accent);
  --border-divider: rgba(22, 21, 19, 0.12);
  --surface: #ffffff;   /* card backgrounds — stay white */
  --page-bg: #fbf9f8;   /* everything else — the page itself */
  --card-radius: 8px;
  --max-width: 402px; /* only used for the home page's centered column and the nav's
                          own max-width, which stay phone-width by design */
  --page-margin: 16px; /* shared left/right margin for the Projects page (header, cards,
                           title) — 16px by default, 24px at 601px and up */
}

@media (min-width: 601px) {
  :root {
    --page-margin: 24px;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 48px; /* clears the fixed bottom nav */
}

.app {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Projects page content is full-width and left-aligned at every screen
   size (unlike the home page, which stays centered at --max-width). */
.projects-app {
  max-width: none;
  margin: 0;
}

/* ---------- Home ---------- */
.home-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 36px;
  padding: 118px 16px 0;
}
.home-hero .text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 600px;
}
.home-hero .title {
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  margin: 0;
}
.home-hero .subtitle {
  font-size: 13.75px;
  font-weight: 400;
  line-height: 16px;
  margin: 0;
  color: var(--text-primary);
}
.home-hero .logo {
  width: 180px;
  height: 180px;
  align-self: center;
}
.home-hero .logo img { width: 100%; height: 100%; display: block; object-fit: contain; }

/* ---------- Projects ---------- */
/* full-bleed band across the whole viewport, not capped to the app's phone-width column —
   the inner wrapper keeps the text aligned with everything else below it. */
.page-header {
  width: 100%;
  background: var(--header-bg);
  overflow: hidden;
}
.page-header-content {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.page-header-inner {
  padding: 20px 0 20px var(--page-margin);
}
.page-header-bg {
  width: 153px;
  height: 64px;
  object-fit: cover;
  pointer-events: none;
  flex-shrink: 0;
  margin: 0; /* always flush to the header's right edge, at every viewport width */
}
.page-header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 36px;
  font-weight: 700;
}

/* Cards are stacked and centered by default. They only go side by side
   once two of them genuinely fit — see the 804px breakpoint below
   (2 x 370px card + 16px gap + 2 x 24px page margin = 804px). Keying
   that switch to the nav's 601px breakpoint instead left a dead zone
   between 601-804px where cards were in row mode but only one fit per
   row, so they hugged the left edge with empty space beside them. */
.card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--page-margin) var(--page-margin) 0;
  gap: 16px;
}

@media (min-width: 804px) {
  .card-container {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
  }
}

.card {
  display: block;
  /* the card is always 370px wide — the same width at every breakpoint
     (402px Figma frame minus its 16px margins). max-width keeps it from
     overflowing on phones narrower than the Figma frame. */
  width: 370px;
  max-width: 100%;
  flex: none; /* never grow or shrink to fill the row */
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border-divider);
  border-radius: var(--card-radius);
  overflow: hidden;
  background: var(--surface);
}
.card .card-image {
  height: 178px;
  width: 100%;
  overflow: hidden;
  background: var(--surface);
  /* centers the artwork horizontally; flex (rather than auto margins)
     so an image wider than the card overflows evenly on both sides
     instead of only to the right. */
  display: flex;
  align-items: center;
  justify-content: center;
}
.card .card-image img {
  display: block;
  /* zoom to fit vertically: the image scales until its height fills the
     178px box, keeping its aspect ratio, and is centered horizontally —
     so a wide card shows the artwork centered with space either side
     rather than cropping it. */
  height: 100%;
  width: auto;
  max-width: none;
  flex: none;
}
.card .card-content {
  padding: 16px;
}
.card .card-content p {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
}

/* ---------- Bottom tab nav (shared) ---------- */
.tab-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--nav-bg);
  display: flex;
  justify-content: center;
}
.tab-nav .tabs {
  width: 100%;
  max-width: var(--max-width);
  display: flex;
}
.tab-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 48px;
  text-decoration: none;
  color: var(--nav-icon);
  position: relative;
}
.tab-nav a .indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
}
.tab-nav a.active .indicator {
  background: var(--nav-icon-active);
}
.tab-nav svg {
  /* was shrinking to 24x12 — box-sizing:border-box means padding eats into a fixed
     width/height, so the "bottom padding" was actually squashing the icon itself.
     Margin instead keeps the icon a true 24x24 and just adds space below it. */
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  margin-bottom: 12px;
}

/* Accessible name for the icon-only nav links: visually hidden below 601px
   (acts like alt-text — screen readers still announce it), shown as a
   visible label alongside the icon at 601px and up. */
.tab-nav .label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Bottom nav: 601px and up only ----------
   The Projects page layout (header, cards, title) uses --page-margin at
   every screen size and needs no breakpoint of its own — only the nav
   changes shape at 601px, switching from icon-only to icon+label. Below
   601px the nav stays exactly as-is (untouched, by design). */
@media (min-width: 601px) {
  .tab-nav .tabs {
    max-width: none;
    justify-content: flex-start;
    align-items: center;
    padding: 0 24px;
    gap: 32px;
  }

  .tab-nav a {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: 64px;
    padding: 0;
    gap: 8px;
  }

  .tab-nav svg {
    margin-bottom: 0;
  }

  .tab-nav .label {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
  }
}
