/* ==========================================================================
   Upper Room Growth — Design System
   Shared across all pages. Extends the hero's existing palette/type system.
   ========================================================================== */

:root {
  /* brand (from hero) */
  --navy: #1b2568;
  --navy-deep: #11153c;
  --navy-black: #0b0d20;
  --accent: #3654e0;
  --accent-bright: #6a7ceb;
  --white: #ffffff;

  /* light-section system (editorial paper, not stark white) */
  --paper: #f6f4ee;
  --paper-alt: #efebe0;
  --ink: #171a2e;
  --ink-soft: #4d5170;
  --ink-faint: #7d81a0;
  --line: rgba(23, 26, 46, 0.12);
  --line-dark: rgba(255, 255, 255, 0.14);

  --container: 1280px;
  --gutter: clamp(24px, 6vw, 96px);
  --section-pad: clamp(88px, 11vw, 152px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

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

a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

/* -------------------------------------------------------------------------
   Skip link
   ------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  z-index: 200;
  font-weight: 600;
  font-size: 0.9rem;
}
.skip-link:focus { left: 12px; top: 12px; }

/* -------------------------------------------------------------------------
   Header / Nav  (shared shell; .is-hero variant used only on index.html
   where a photographic hero sits behind it)
   ------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 13px clamp(24px, 6vw, 96px);
  background: rgba(10, 13, 30, 0.86);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: padding 0.28s ease, background-color 0.28s ease, box-shadow 0.28s ease, backdrop-filter 0.28s ease;
}

.site-header.is-hero {
  padding: 26px clamp(24px, 6vw, 96px) 0;
  background: rgba(27, 37, 104, 0);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0);
}

.site-header.is-hero.is-condensed {
  padding: 13px clamp(24px, 6vw, 96px);
  background: rgba(10, 13, 30, 0.86);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-links {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-size: 1.02rem;
  font-weight: 700;
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0.82;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a[aria-current="page"] {
  opacity: 1;
}

.nav-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav-cta:hover, .nav-cta:focus-visible {
  border-color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
  display: none;
  justify-self: end;
  background: none;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  color: #fff;
  width: 40px;
  height: 36px;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

@media (max-width: 760px) {
  .site-header { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo .mark {
  font-family: "Archivo Black", "Bricolage Grotesque", sans-serif;
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.07em;
  color: #fff;
}

.logo .mark .r-holder { position: relative; display: inline-block; }
.logo .mark .r-spark {
  position: absolute;
  right: -4px;
  bottom: 2px;
  width: 7px;
  height: 7px;
  fill: rgba(255, 255, 255, 0.55);
  transform: rotate(8deg);
}

.logo .divider { width: 1px; height: 20px; background: rgba(255, 255, 255, 0.22); }

.logo .word {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  color: #fff;
}

/* Mobile drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--navy-black);
  display: none;
  flex-direction: column;
  padding: 100px var(--gutter) 40px;
  gap: 28px;
}
.mobile-nav.is-open { display: flex; }
.mobile-nav a {
  color: #fff;
  text-decoration: none;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.6rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line-dark);
  padding-bottom: 16px;
}
.mobile-nav .nav-cta { align-self: flex-start; margin-top: 12px; }

/* -------------------------------------------------------------------------
   Page header (non-hero interior pages)
   ------------------------------------------------------------------------- */
.page-intro {
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  color: #fff;
  padding: calc(var(--section-pad) + 40px) 0 var(--section-pad);
  position: relative;
  overflow: hidden;
}
.page-intro .eyebrow { color: rgba(255,255,255,0.65); }
.page-intro h1 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 5.6vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 18px 0 20px;
  max-width: 18ch;
}
.page-intro p.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: rgba(255,255,255,0.78);
  max-width: 56ch;
  line-height: 1.6;
  margin: 0;
}

/* -------------------------------------------------------------------------
   Type
   ------------------------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 16px 0 0;
  color: var(--ink);
}
.section-head.on-dark h2 { color: #fff; }
.section-head p {
  font-size: 1.08rem;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 18px 0 0;
  max-width: 60ch;
}
.section-head.on-dark p { color: rgba(255,255,255,0.72); }

.eyebrow.on-dark { color: var(--accent-bright); }

section { position: relative; }

.section-pad { padding-block: var(--section-pad); }
.section-dark {
  background-color: var(--navy);
  background-image:
    linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  color: #fff;
}
.section-deep { background: var(--navy-black); color: #fff; }
.section-alt { background: var(--paper-alt); }

hr.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}
.section-dark hr.rule, .section-deep hr.rule { border-top-color: var(--line-dark); }

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: box-shadow 0.25s ease, transform 0.25s ease, background 0.2s ease, border-color 0.2s ease;
  font-family: inherit;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(106,124,235,0.5);
}
.btn-primary:hover, .btn-primary:focus-visible { box-shadow: 0 0 0 8px rgba(106,124,235,0.35); }

.btn-ghost-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}
.btn-ghost-dark:hover { border-color: rgba(255,255,255,0.65); background: rgba(255,255,255,0.06); }

.btn-ghost-light {
  background: transparent;
  color: var(--ink);
  border-color: rgba(23,26,46,0.22);
}
.btn-ghost-light:hover { border-color: rgba(23,26,46,0.5); background: rgba(23,26,46,0.05); }

.btn-outline-accent {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-outline-accent:hover { background: var(--accent); color: #fff; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.text-link.on-dark { color: #fff; }
.text-link svg { width: 12px; height: 12px; transition: transform 0.2s ease; }
.text-link:hover svg { transform: translateX(3px); }

/* -------------------------------------------------------------------------
   Grid helpers
   ------------------------------------------------------------------------- */
.grid { display: grid; gap: clamp(24px, 4vw, 48px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-5 { grid-template-columns: 1fr; } }

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.split.reverse { grid-template-columns: 0.9fr 1.1fr; }
.split.reverse > *:first-child { order: 2; }
@media (max-width: 860px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse > *:first-child { order: 0; }
}

/* -------------------------------------------------------------------------
   Cards
   ------------------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 32px 28px;
}
.section-dark .card, .section-deep .card {
  background: rgba(255,255,255,0.04);
  border-color: var(--line-dark);
  color: #fff;
}
.card .num {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.card h3 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 14px 0 10px;
  letter-spacing: -0.01em;
}
.card p { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.6; margin: 0; }
.section-dark .card p, .section-deep .card p { color: rgba(255,255,255,0.7); }

/* -------------------------------------------------------------------------
   Frame chrome for website mockups
   ------------------------------------------------------------------------- */
.browser-frame {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 40px 90px -30px rgba(10,13,30,0.5), 0 0 0 1px rgba(23,26,46,0.08);
  background: #0d0f18;
}
.browser-frame .chrome {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  background: #14162220;
  background: rgba(255,255,255,0.06);
}
.browser-frame .chrome span {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
}
.browser-frame img { width: 100%; display: block; }
.browser-frame.crop-tall img { aspect-ratio: 16/11; object-fit: cover; object-position: top; }
.browser-frame.crop-wide img { aspect-ratio: 16/9.2; object-fit: cover; object-position: top; }

.detail-crop {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 70px -26px rgba(10,13,30,0.45), 0 0 0 1px rgba(23,26,46,0.08);
}
.detail-crop img { aspect-ratio: 4/3; object-fit: cover; }

.phone-frame {
  width: 200px;
  background: #0a0a0c;
  border-radius: 30px;
  padding: 9px;
  box-shadow: 0 30px 60px -18px rgba(10,13,30,0.5), 0 0 0 1.2px rgba(255,255,255,0.08) inset;
  flex-shrink: 0;
}
.phone-frame .island {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 58px; height: 17px; background: #000; border-radius: 10px; z-index: 2;
}
.phone-frame .screen {
  position: relative;
  width: 100%;
  aspect-ratio: 9/17.5;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
}
.phone-frame .screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}

/* -------------------------------------------------------------------------
   Badge / tag
   ------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.section-dark .badge, .section-deep .badge { border-color: var(--line-dark); color: rgba(255,255,255,0.75); }
.badge.badge-accent { border-color: var(--accent); color: var(--accent); }

.tag-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* -------------------------------------------------------------------------
   Portfolio filter bar
   ------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.filter-btn {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: rgba(23,26,46,0.4); color: var(--ink); }
.filter-btn.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 980px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .work-grid { grid-template-columns: 1fr; } }

.work-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  transition: opacity 0.25s ease, transform 0.3s ease;
}
.work-card[hidden] { display: none; }
.work-card .thumb {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  margin-bottom: 18px;
  box-shadow: 0 24px 50px -22px rgba(10,13,30,0.35);
}
.work-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.5s ease; }
.work-card:hover .thumb img { transform: scale(1.035); }
.work-card .cat { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.work-card h3 { font-family: "Bricolage Grotesque", sans-serif; font-size: 1.4rem; margin: 8px 0 6px; }
.work-card p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* -------------------------------------------------------------------------
   Process stepper
   ------------------------------------------------------------------------- */
.process-list { border-top: 1px solid var(--line-dark); }
.process-item {
  display: grid;
  grid-template-columns: 120px 1fr 1fr;
  gap: 24px;
  padding: clamp(28px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--line-dark);
  align-items: baseline;
}
.process-item .pnum {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-bright);
}
.process-item h3 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.process-item p { margin: 0; color: rgba(255,255,255,0.68); font-size: 0.98rem; line-height: 1.65; }
@media (max-width: 760px) {
  .process-item { grid-template-columns: 1fr; gap: 10px; }
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer { background: var(--navy-black); color: rgba(255,255,255,0.7); padding: 72px 0 32px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line-dark);
}
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }
.footer-top h4 {
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 16px;
  font-weight: 700;
}
.footer-top ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-top a { color: rgba(255,255,255,0.68); text-decoration: none; font-size: 0.95rem; }
.footer-top a:hover { color: #fff; }
.footer-brand p { max-width: 34ch; color: rgba(255,255,255,0.6); font-size: 0.95rem; line-height: 1.6; margin: 16px 0 0; }
.footer-phone {
  display: inline-block;
  margin-top: 18px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.footer-phone:hover { color: #fff; }
.footer-top h4.footer-expertise-title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-transform: none;
  color: #fff;
  margin: 0 0 16px;
}
.expertise-list li { color: rgba(255,255,255,0.68); font-size: 0.95rem; }
.social-row { display: flex; gap: 10px; margin-top: 20px; }
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-dark);
  color: rgba(255,255,255,0.75);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon:hover { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.08); color: #fff; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.42);
}

/* -------------------------------------------------------------------------
   Reveal-on-scroll (subtle, intentional)
   ------------------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
