/* Relationship Tech — shared styles */

@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-variable-italic.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --sand: #fbe19f;
  --cream: #fff5d9;
  --olive: #655a3f;

  --font-heading: "Instrument Sans", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;

  --gutter: clamp(16px, 5vw, 64px);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--sand);
  background: var(--olive);
}

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

a {
  color: inherit;
}

h1,
h2 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 20px;
}

h1 {
  font-size: clamp(2.25rem, 1rem + 3.4vw, 4.4rem);
}

cite {
  font-style: italic;
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--gutter);
}

.site-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
}

.site-nav a,
.site-title {
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 0;
}

.site-nav a:hover,
.site-title:hover {
  opacity: 0.65;
}

/* ---------- Home: full-screen hero ---------- */

.home {
  background: #0b0a0f;
  color: var(--cream);
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* keep the sun in view when the screen is narrow */
  object-position: 18% 50%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0) 25%,
    rgba(0, 0, 0, 0) 60%,
    rgba(0, 0, 0, 0.55) 100%
  );
}

.hero-text {
  position: relative;
  z-index: 1;
  padding: 0 var(--gutter) clamp(32px, 8vh, 72px);
  max-width: 40rem;
}

.hero-text p {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

/* ---------- About page ---------- */

/* Purple tones sampled from the About background image, so the page
   never flashes a different color while the image is loading. */
.about {
  --purple: #584e80;
  --purple-deep: #242033;
  --purple-night: #1e1a2b;
  --headline: #f3f0f7;
  --text: #bdb8ca;

  background: var(--purple-deep);
  color: var(--text);
}

.about .site-header,
.about h1,
.about h2 {
  color: var(--headline);
}

.about-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  /* Layers, top to bottom: readability shade, the real image (set in
     about/index.html), tiny blurred preview, matching solid color. */
  background-color: var(--purple);
  background-size: cover;
  background-position: 70% center;
  background-repeat: no-repeat;
}

.about-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(44, 40, 72, 0.55) 0%,
    rgba(44, 40, 72, 0.2) 55%,
    rgba(44, 40, 72, 0) 75%
  );
}

/* fade the bottom of the image into the solid purple below it */
.about-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -2px 0; /* overlap the edge so no hairline shows */
  height: 18vh;
  background: linear-gradient(to bottom, rgba(36, 32, 51, 0), var(--purple-deep));
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 120px var(--gutter) 96px;
}

.hero-copy h1 {
  margin-bottom: 0.6em;
}

.hero-copy p {
  margin: 0 0 1.5em;
  text-shadow: 0 1px 12px rgba(30, 26, 52, 0.5);
}

/* Keep the text on the left wall of the room.
   The image (ratio 1.791) covers the screen and is anchored at 70%,
   and the wall's inner corner sits at 48.3% of the image width.
   So on screen the corner is at: 70vw - 0.217 x image width. */
@media (min-width: 800px) {
  .about-hero {
    --img-w: max(100vw, 179.1vh);
    --wall: calc(70vw - 0.217 * var(--img-w));
  }
  .hero-copy p {
    max-width: max(17rem, min(33rem, calc(var(--wall) - var(--gutter) - 56px)));
  }
  .hero-copy h1 {
    max-width: max(17rem, calc(var(--wall) - var(--gutter) - 24px));
  }
}

@media (max-width: 799px) {
  /* On narrow screens the text covers the image, so shade it evenly */
  .about-hero::before {
    background: rgba(44, 40, 72, 0.5);
  }
  .about-hero {
    align-items: flex-end;
  }
}

.page {
  padding: 0 var(--gutter) clamp(48px, 8vw, 96px);
}

/* ---------- Co-Creation: portrait left, text right ---------- */

.co-creation {
  display: grid;
  gap: clamp(24px, 4vw, 56px);
  padding: clamp(32px, 6vw, 72px) 0;
}

@media (min-width: 800px) {
  .co-creation {
    grid-template-columns: minmax(0, 380px) minmax(0, 36rem);
    column-gap: clamp(40px, 5vw, 72px);
  }
  .co-creation h2 {
    margin-top: 0.4em;
  }
}

.co-creation h2 {
  font-size: clamp(1.5rem, 1.2rem + 1vw, 1.9rem);
  margin-bottom: 24px;
}

.co-creation p {
  margin: 0 0 1.5em;
}

/* Sharp, unrounded edges. The portrait sits in a soft wash of light,
   like a Turrell aperture. */
.portrait img {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
  object-fit: cover;
  box-shadow:
    0 0 0 1px rgba(213, 216, 249, 0.12),
    -40px 30px 120px -30px rgba(242, 167, 236, 0.35),
    40px -30px 120px -30px rgba(143, 227, 234, 0.3);
}

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

.site-footer {
  display: flex;
  justify-content: flex-end;
  padding: 32px var(--gutter);
  background: var(--purple-night);
}

.icon-link {
  display: inline-flex;
  padding: 4px;
  margin: -4px;
  opacity: 0.75;
  transition: opacity 0.3s ease;
}

.icon-link:hover {
  opacity: 1;
}

.icon-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
