/* 37 Echo. Tokens follow the Industry design system, re-grounded on dark navy. */
:root {
  --color-bg: #040912;
  --color-text: #ffffff;
  --color-accent: #b5d9fd;      /* accent-300 */
  --color-accent-700: #416180;
  --color-neutral-300: #d4d4d7;
  --color-neutral-500: #98989b;
  --color-neutral-900: #2b2b2d;

  --font-heading: "Barlow Condensed", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;

  --rail-w: 64px;
  --gutter: clamp(24px, 5vw, 80px);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
}

a { color: var(--color-text); text-underline-offset: 3px; }
a:hover { color: var(--color-accent); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: var(--color-accent-700); color: #fff; }

p { margin: 0 0 10.2px; }

/* Side rail */
.rail {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--rail-w);
  background: var(--color-bg);
  border-right: 1px solid var(--color-neutral-900);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  z-index: 30;
}
.rail-brand {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  text-decoration: none;
}

/* Page grid: text left, image right, footer row across both */
.page {
  margin-left: var(--rail-w);
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
}

.main { grid-column: 1; grid-row: 1; min-width: 0; }

.figure {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
}
.figure-frame {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  height: 66.667%;
  aspect-ratio: 1149 / 1369;
  max-width: 100%;
}
.figure-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* Fade all four edges into the ground */
.figure-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--color-bg) 0%, rgba(4, 9, 18, 0) 14%),
    linear-gradient(270deg, var(--color-bg) 0%, rgba(4, 9, 18, 0) 14%),
    linear-gradient(0deg, var(--color-bg) 0%, rgba(4, 9, 18, 0) 14%),
    linear-gradient(180deg, var(--color-bg) 0%, rgba(4, 9, 18, 0) 12%);
}

.intro {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 104px var(--gutter);
}
.intro-inner { max-width: 500px; }
.intro h1 {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(38px, 4.6vw, 64px);
  line-height: 1.08;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 32px;
}
.intro-body {
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-neutral-300);
  text-wrap: pretty;
}

/* Footer: contact under the text, coordinates under the image, bottoms aligned */
.foot {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  row-gap: 12px;
  align-items: end;
  padding-bottom: 56px;
}
.foot-row {
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-heading);
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--color-neutral-500);
}
.foot-row a { color: var(--color-accent); text-decoration: none; }
.coords { color: var(--color-accent); white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* Narrow screens: image strip on top, text, then footer lines stacked */
@media (max-width: 719.98px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }
  .figure { grid-column: 1; grid-row: 1; height: 46vh; }
  .figure-frame { height: 100%; }
  .main { grid-column: 1; grid-row: 2; }
  .foot { grid-row: 3; grid-template-columns: minmax(0, 1fr); }
}
