/* Intrinsic Astra — dusk at the top of the page, full night at the bottom. */

:root {
  --indigo: #252c97;      /* early-evening sky */
  --violet: #5a2a8c;      /* low sky at dusk */
  --night: #0c0a38;       /* sky once the page has scrolled to night */
  --rose: #ff5f81;        /* horizon glow */
  --amber: #ffc35c;       /* starlight, actions */
  --cream: #fff4dc;       /* text */
  --cream-soft: rgba(255, 244, 220, 0.78);
  --line: rgba(255, 244, 220, 0.22);

  --display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --text: "Newsreader", Georgia, serif;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --measure: 34rem;
  --t: 0; /* scroll progress, 0 = dusk, 1 = night; set by main.js */
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--indigo);
  color: var(--cream);
  font-family: var(--text);
  font-size: clamp(1.0625rem, 0.95rem + 0.45vw, 1.3125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--amber);
  color: var(--night);
  font-family: var(--display);
  font-weight: 600;
  border-radius: 999px;
}
.skip:focus { top: 1rem; }

/* ---------- Sky ---------- */

.sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, var(--indigo) 0%, #3a2a93 55%, var(--violet) 100%);
}
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--night) 0%, #141052 100%);
  opacity: var(--t);
}

.stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: calc(0.35 + var(--t) * 0.65);
}

/* ---------- Top bar ---------- */

.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem var(--gutter);
  font-family: var(--display);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.top nav { display: flex; gap: clamp(0.9rem, 2.5vw, 2.25rem); }

.top nav a,
.foot nav a {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  padding-block: 0.4rem;
  background: linear-gradient(var(--amber), var(--amber)) left bottom / 0 2px no-repeat;
  transition: background-size 0.25s ease;
}
.top nav a:hover,
.foot nav a:hover { background-size: 100% 2px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
  padding: clamp(6rem, 13vh, 9rem) var(--gutter) clamp(14rem, 38vh, 26rem);
  overflow: hidden;
}

.hero-dusk {
  position: absolute;
  inset: auto 0 0 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 90%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 90%, transparent 100%);
}

/* Keeps the copy readable where it crosses the bright horizon. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(20, 16, 88, 0.93) 0%, rgba(20, 16, 88, 0.86) 38%, rgba(20, 16, 88, 0) 72%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 86%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 86%, transparent 100%);
}

.hero-copy { position: relative; max-width: 70rem; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(3.4rem, min(12vw, 19vh), 11rem);
  line-height: 0.86;
  font-variation-settings: "wdth" 100;
  text-shadow: 0 0.04em 0.5em rgba(12, 10, 56, 0.35);
}

h1 .line { display: block; }
h1 .line:nth-child(2) { color: var(--amber); }
h1 .line:nth-child(3) { color: var(--rose); }

.lede {
  max-width: var(--measure);
  margin: 1.75rem 0 0;
  font-size: 1.18em;
  line-height: 1.5;
  color: var(--cream);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  margin: 2rem 0 0;
}

.button {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--amber);
  color: var(--night);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.0625rem;
  text-decoration: none;
  box-shadow: 0 0 0 0 rgba(255, 195, 92, 0.5);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}
.button:hover {
  background: #ffd486;
  box-shadow: 0 0 2.25rem 0.2rem rgba(255, 195, 92, 0.45);
}

.quiet {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: underline;
  text-decoration-color: var(--amber);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}
.quiet:hover { color: var(--amber); }

/* Page-load moment: the headline widens out and settles, one line after another. */
@media (prefers-reduced-motion: no-preference) {
  h1 .line {
    animation: settle 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  h1 .line:nth-child(2) { animation-delay: 0.12s; }
  h1 .line:nth-child(3) { animation-delay: 0.24s; }
  .hero .lede, .hero .actions { animation: rise 0.9s 0.55s ease both; }

  @keyframes settle {
    from { font-variation-settings: "wdth" 75; opacity: 0; letter-spacing: -0.06em; }
    to   { font-variation-settings: "wdth" 100; opacity: 1; letter-spacing: -0.035em; }
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(0.75rem); }
    to   { opacity: 1; transform: none; }
  }
}

/* ---------- Products ---------- */

.products {
  padding: clamp(1.5rem, 4vw, 4rem) var(--gutter) 0;
}

.section-head { max-width: var(--measure); }

h2 {
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 0.95;
}

.section-head p { margin: 1rem 0 0; color: var(--cream-soft); font-size: 1.18em; }

.product {
  display: grid;
  align-items: center;
  gap: clamp(2rem, 6vw, 6rem);
  margin-top: clamp(3.5rem, 9vw, 8rem);
}

.product-bloom { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.product-faith { grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); }

.product-copy { max-width: var(--measure); }
.product-faith .product-copy { justify-self: end; }

h3 {
  font-size: clamp(2.25rem, 5.2vw, 4.75rem);
  line-height: 0.98;
}

.product-copy p:not(.status) { margin: 1.1rem 0 1.75rem; color: var(--cream-soft); }
.product-copy p.pitch {
  margin-bottom: -0.35rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3em;
  line-height: 1.25;
  color: var(--cream);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
}
.status::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
}
.status-live { color: var(--amber); }
.status-live::before {
  background: var(--amber);
  box-shadow: 0 0 0.75rem 0.15rem rgba(255, 195, 92, 0.7);
}
.status-soon { color: #ff9db1; }
.status-soon::before { border: 2px solid currentColor; }

.art img { width: 100%; height: 100%; object-fit: cover; }

/* The bloom is a disc; it throws its own glow onto the sky. */
.art-round {
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 7rem 0 rgba(255, 95, 129, 0.35);
}

/* The faith app sits in an arch, echoing the opening in the painting. */
.art-arch {
  aspect-ratio: 2 / 3;
  border-radius: 999px 999px 0.75rem 0.75rem;
  overflow: hidden;
  box-shadow: 0 0 6rem 0 rgba(255, 195, 92, 0.22);
}

/* ---------- Consulting ---------- */

.consulting {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  padding: clamp(5rem, 12vw, 11rem) var(--gutter) 0;
}

.art-wide {
  grid-column: 1 / 9;
  grid-row: 1;
  aspect-ratio: 3 / 2;
  border-radius: 0.75rem;
  overflow: hidden;
}

.consulting-copy {
  grid-column: 7 / 13;
  grid-row: 1;
  position: relative;
  margin-top: clamp(4rem, 14vw, 13rem);
  padding: clamp(1.75rem, 3.5vw, 3.25rem);
  border-radius: 0.75rem;
  background: rgba(12, 10, 56, 0.86);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  border: 1px solid var(--line);
}

.consulting-copy h2 { font-size: clamp(2.25rem, 4.6vw, 4.25rem); }
.consulting-copy .lede { font-size: 1.05em; margin-top: 1.1rem; color: var(--cream-soft); }

.services { margin: 2rem 0 2.25rem; }
.services div {
  display: grid;
  grid-template-columns: minmax(0, 11rem) minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}
.services div:last-child { border-bottom: 1px solid var(--line); }
.services dt { font-family: var(--display); font-weight: 700; font-size: 1.0625rem; line-height: 1.35; }
.services dd { margin: 0; color: var(--cream-soft); font-size: 0.95em; line-height: 1.45; }

/* ---------- Contact ---------- */

.contact {
  padding: clamp(6rem, 15vw, 14rem) var(--gutter) clamp(4rem, 9vw, 8rem);
}

.contact h2 { max-width: 14ch; }

.mail {
  display: inline-block;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.35rem, 4.6vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--amber);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  overflow-wrap: anywhere;
}
.mail:hover { color: #ffd486; }

address {
  margin-top: 2.5rem;
  font-style: normal;
  color: var(--cream-soft);
}

/* ---------- Footer ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 1.5rem var(--gutter) 2rem;
  border-top: 1px solid var(--line);
  color: var(--cream-soft);
  font-size: 0.9em;
}
.foot p { margin: 0; align-self: center; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; }

/* ---------- Narrow screens ---------- */

@media (max-width: 800px) {
  .hero::after {
    background: rgba(20, 16, 88, 0.86);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 62%, transparent 82%);
            mask-image: linear-gradient(180deg, transparent 0%, #000 25%, #000 62%, transparent 82%);
  }

  .product-bloom,
  .product-faith { grid-template-columns: minmax(0, 1fr); }

  .product-faith .product-copy { justify-self: start; }
  .product-faith .art { order: -1; }

  .art-round { max-width: 26rem; }
  .art-arch { max-width: 20rem; }

  .consulting { display: block; }
  .consulting-copy {
    margin: -3rem 0 0;
    margin-inline: 0.75rem;
  }
  .services div { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  .mark span { font-size: 1rem; }
  .top nav { gap: 0.85rem; }
  .top nav a { font-size: 0.9375rem; }
  .top nav a[href="#contact"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media (max-width: 1100px) {
  .services div { grid-template-columns: minmax(0, 1fr); }
}
