/* Sicomac Capital L.L.C.
   Layout: one name standing behind a ridge at night; below the ridge line the page is
   stone, set as a margin gloss (small label left, statement right). One lamp, lit once. */

:root {
  --night: #040506;   /* sky, overhead */
  --dusk: #18202a;    /* sky, at the horizon */
  --field: #08090a;   /* the ground and every surface below the ridge */
  --bone: #dcd7cb;    /* type */
  --chalk: #c8c3b8;   /* long-form type */
  --ash: #9a968d;     /* labels, small print */
  --seam: rgba(220, 215, 203, 0.13);
  --lamp: #f2a93b;    /* used once */

  --display: "Castoro Titling", "Castoro", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --text: "Castoro", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 4.6vw, 76px);
  color-scheme: dark;
}

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

html {
  background: var(--field);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  position: relative;
  background: var(--field);
  color: var(--bone);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Grain: the whole page is one piece of stone. */
body::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 -.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

.wrap {
  width: 100%;
  max-width: 1720px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.label {
  margin: 0;
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ash);
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(220, 215, 203, 0.34);
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.25s ease, color 0.25s ease;
}
a:hover { color: #f3efe6; text-decoration-color: currentColor; }
a:focus-visible {
  outline: 1px solid var(--bone);
  outline-offset: 5px;
  border-radius: 1px;
}

::selection { background: var(--bone); color: var(--field); }

/* ---------- the bar ---------- */

.bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem 2rem;
  padding-block: clamp(20px, 2.6vw, 38px);
}
.bar .label { color: var(--ash); }
.bar a { text-decoration: none; color: var(--bone); }
.bar a:hover { color: #f3efe6; }
.bar .dot { padding-inline: 0.5em; opacity: 0.55; }

/* ---------- hero: sky, name, ridge ---------- */

.hero {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
.stage {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

.sky {
  position: relative;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(90% 58% at 66% 100%, rgba(52, 68, 88, 0.42), rgba(52, 68, 88, 0) 72%),
    linear-gradient(180deg, var(--night) 0%, #06080a 46%, #0d1217 80%, var(--dusk) 100%);
}

/* A handful of stars. Few enough to count. */
.sky::before {
  content: "";
  position: absolute;
  inset: 0 0 34% 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(220, 215, 203, 0.80) 0 0.7px, transparent 1.3px),
    radial-gradient(circle, rgba(220, 215, 203, 0.50) 0 0.6px, transparent 1.2px),
    radial-gradient(circle, rgba(220, 215, 203, 0.62) 0 0.7px, transparent 1.3px),
    radial-gradient(circle, rgba(220, 215, 203, 0.38) 0 0.6px, transparent 1.2px),
    radial-gradient(circle, rgba(220, 215, 203, 0.70) 0 0.8px, transparent 1.4px),
    radial-gradient(circle, rgba(220, 215, 203, 0.34) 0 0.6px, transparent 1.2px),
    radial-gradient(circle, rgba(220, 215, 203, 0.48) 0 0.6px, transparent 1.2px),
    radial-gradient(circle, rgba(220, 215, 203, 0.30) 0 0.5px, transparent 1.1px),
    radial-gradient(circle, rgba(220, 215, 203, 0.44) 0 0.6px, transparent 1.2px),
    radial-gradient(circle, rgba(220, 215, 203, 0.26) 0 0.5px, transparent 1.1px),
    radial-gradient(circle, rgba(220, 215, 203, 0.36) 0 0.5px, transparent 1.1px),
    radial-gradient(circle, rgba(220, 215, 203, 0.56) 0 0.7px, transparent 1.3px),
    radial-gradient(circle, rgba(220, 215, 203, 0.24) 0 0.5px, transparent 1.1px);
  background-repeat: no-repeat;
  background-size: 6px 6px;
  background-position: 13% 31%, 27% 62%, 41% 22%, 58% 71%, 71% 38%, 86% 57%, 93% 19%,
    6% 74%, 20% 14%, 35% 47%, 50% 9%, 64% 55%, 79% 12%, 97% 44%;
}

.mark {
  position: relative;
  margin-block: 0;
  padding-top: clamp(72px, 16vh, 200px);
  line-height: 0;
  font-weight: 400;
}

.scene {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.scene text {
  font-family: var(--display);
  font-size: 204px;
  font-weight: 400;
}
.scene .ridge { fill: var(--field); }
.scene .ridge-edge {
  fill: none;
  stroke: rgba(220, 215, 203, 0.30);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
}
.scene .lamp {
  fill: none;
  stroke: var(--lamp);
  stroke-width: 4px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.scene .letters { animation: rise 2.6s cubic-bezier(0.3, 0, 0.2, 1) both; }
.scene .light { animation: breathe 6s ease-in-out 2s infinite alternate; }

@keyframes rise {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes breathe {
  from { opacity: 1; }
  to { opacity: 0.62; }
}

.ground {
  position: relative;
  margin-top: -1px;
  background: var(--field);
  padding-block: clamp(26px, 3.4vw, 52px) clamp(56px, 7vw, 108px);
}

/* ---------- margin gloss: label left, statement right ---------- */

.row {
  display: grid;
  grid-template-columns: minmax(18.5rem, 3fr) minmax(0, 9fr);
  column-gap: clamp(20px, 3vw, 48px);
  row-gap: 0.9rem;
  align-items: baseline;
}
.row > * { min-width: 0; }

.lede {
  margin: 0;
  max-width: 27ch;
  font-style: italic;
  font-size: clamp(1.45rem, 2.5vw, 2.3rem);
  line-height: 1.28;
  color: var(--bone);
  text-wrap: balance;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list .row {
  padding-block: clamp(30px, 4.6vw, 70px);
  border-top: 1px solid var(--seam);
}
.tenet {
  margin: 0;
  max-width: 19ch;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.06;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.post {
  border-top: 1px solid var(--seam);
  padding-block: clamp(30px, 4.6vw, 70px) clamp(72px, 10vw, 150px);
}
.post .address {
  margin: 0;
  font-style: italic;
  font-size: clamp(1.3rem, 3.1vw, 2.75rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.post .address a { text-decoration-color: rgba(220, 215, 203, 0.26); }
.post .aside {
  margin: 1.1rem 0 0;
  color: var(--ash);
  font-size: 1rem;
}

/* ---------- footer ---------- */

.foot {
  border-top: 1px solid var(--seam);
  padding-block: clamp(28px, 3.4vw, 46px) clamp(36px, 4vw, 56px);
  color: var(--ash);
}
.foot .row { align-items: start; row-gap: 1.6rem; }
.foot .legal {
  margin: 0;
  font-family: var(--text);
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
  color: var(--bone);
}
.foot .rest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.4rem clamp(24px, 5vw, 96px);
  align-items: start;
}
.foot .notice {
  margin: 0;
  max-width: 54ch;
  font-size: 0.875rem;
  line-height: 1.6;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.7rem;
}
.foot nav a { text-decoration: none; color: var(--bone); }
.foot nav a:hover { color: #f3efe6; }
.foot .year { margin: 0.5rem 0 0; }

/* ---------- long-form pages ---------- */

.doc-head { padding-block: clamp(40px, 9vw, 150px) clamp(30px, 4vw, 60px); }
.doc-head h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.5rem, 6.4vw, 6rem);
  line-height: 0.96;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-wrap: balance;
}
.doc-head .label { margin-top: clamp(18px, 2.2vw, 30px); }

.prose {
  padding-bottom: clamp(64px, 9vw, 140px);
  color: var(--chalk);
  font-size: 1.125rem;
  line-height: 1.72;
}
.prose .row {
  padding-block: clamp(22px, 2.8vw, 38px);
  border-top: 1px solid var(--seam);
}
.prose h2 { padding-top: 0.5em; color: var(--ash); }
.prose p { margin: 0; max-width: 62ch; }
.prose p + p { margin-top: 1em; }
.prose .opening { font-size: 1.3125rem; line-height: 1.55; color: var(--bone); max-width: 52ch; }

/* ---------- narrow ---------- */

@media (max-width: 1040px) {
  .foot .row { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .hero { min-height: 0; }
  .sky { min-height: 60vh; min-height: 60svh; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .prose h2 { padding-top: 0; }
}

@media (max-width: 600px) {
  .foot .rest { grid-template-columns: minmax(0, 1fr); }
  .tenet { max-width: 15ch; }
  .label { letter-spacing: 0.22em; }
  .bar .label { font-size: 0.6875rem; letter-spacing: 0.18em; text-wrap: balance; }
  .doc-head h1 { font-size: clamp(2.5rem, 13.4vw, 4.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  .scene .letters, .scene .light { animation: none; }
  a { transition: none; }
}

/* review fixes */
.bar .nb { white-space: nowrap; }
.foot nav a, .bar a { display: inline-block; padding-block: 0.8rem; margin-block: -0.8rem; }
.foot nav a[aria-current] { color: var(--ash); }

/* ---------- motion ----------
   One idea: time passes. The name sets behind the ridge while the sky turns and the lamp stays lit;
   the lamp's light then passes over each rule as it is read; the page ends at first light.
   Only under html.motion (set before first paint when the visitor has not asked for reduced motion).
   Without it, or without JavaScript, the page is the composed still above. */

html.motion body { background: transparent; }

html.motion .hero {
  --screen: 100vh;
  --runway: 85vh;
  display: block;
  min-height: 0;
  height: calc(var(--screen) + var(--runway));
}
html.motion .stage {
  position: sticky;
  top: 0;
  height: var(--screen);
  overflow: hidden;
  overflow: clip;
}
@supports (height: 1svh) {
  html.motion .hero { --screen: 100svh; --runway: 85svh; }
}
/* a screen too short to hold the scene (a phone on its side, heavy zoom): no pin, the name still sets as it leaves */
html.motion.no-pin .hero { display: flex; height: auto; min-height: 100vh; min-height: 100svh; }
html.motion.no-pin .stage { position: static; height: auto; overflow: visible; }
html.motion.no-pin .sky { flex: 1 0 auto; overflow: hidden; overflow: clip; }
html.motion .sky { min-height: 0; flex: 1 1 auto; }
html.motion .bar, html.motion .mark { position: relative; z-index: 2; }
html.motion .mark { padding-top: 0; }                         /* pinned: the sky itself is the space above the name */
html.motion.no-pin .mark { padding-top: clamp(72px, 16vh, 200px); }

/* the sky turns about a pole below the horizon, as it does */
html.motion .sky::before {
  z-index: 1;
  inset: -30% -12% 20% -12%;
  transform-origin: 64% 150%;
  transform: rotate(calc(var(--p, 0) * -8deg));
  animation: rise 3.4s ease-out both;
  will-change: transform;
}
/* night deepens: the last of the dusk leaves the horizon */
html.motion .sky::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 5, 6, 0) 30%, var(--night) 100%);
  opacity: calc(var(--p, 0) * 0.66);
}
/* the name sets */
html.motion .scene .letters text {
  transform: translateY(calc(var(--set, 0) * 158px));
  will-change: transform;
}
/* and the lamp is what is left */
html.motion .scene .light circle {
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(calc(1 + var(--p, 0) * 0.7));
}
html.motion .lede { opacity: calc(0.62 + var(--p, 0) * 0.38); }

/* lamplight: a rule is brightest as it crosses the reading line, never unreadable away from it */
html.motion .list .tenet,
html.motion .post .address {
  opacity: calc(0.5 + var(--lit, 1) * 0.5);
}
@supports (color: color-mix(in oklab, white, black)) {
  html.motion .list .tenet { color: color-mix(in oklab, #f0e6cf calc(var(--lit, 1) * 100%), var(--bone)); }
}
/* first light */
html.motion body::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120vh;
  height: 120lvh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(130% 62% at 50% 100%, rgba(74, 96, 124, 0.50), rgba(52, 68, 88, 0.20) 46%, rgba(52, 68, 88, 0) 74%),
    linear-gradient(0deg, rgba(24, 32, 42, 0.9), rgba(24, 32, 42, 0) 58%);
  opacity: var(--dawn, 0);
}

@media (max-width: 900px) {
  html.motion.no-pin .hero { min-height: 0; }
  html.motion.no-pin .sky { min-height: 60vh; min-height: 60svh; }
  html.motion .hero { --runway: 62vh; }
  @supports (height: 1svh) {
    html.motion .hero { --runway: 62svh; }
  }
}
