/* ==========================================================================
   NEST CAPITAL
   One screen. Small type anchored to the four corners, one fine-line drawing
   built from the logo's arcs, content in a side sheet.
   Without JavaScript the page degrades to a plain readable document.
   ========================================================================== */

:root {
  --bg: #0a0a09;
  --sheet: #0f0f0d;
  --fg: #e9e6df;
  --dim: #8b887f;
  --straw: #d6c6a0;
  --rule: rgba(233, 230, 223, 0.14);

  --ui: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;

  --edge: clamp(18px, 2vw, 28px);
  --bar: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--straw); color: var(--bg); }
a { color: inherit; text-decoration: none; }

/* ---- the small UI voice ---- */
.corner, .sheet__bar, .rows dt, .entry > span, .pf__field label, .send, .fine, .legal, .next, .pf__status {
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.corner a, .sheet__bar a, .next a { transition: color 0.2s ease; }
.corner a:hover, .sheet__bar a:hover, .next a:hover { color: var(--straw); }

/* ==========================================================================
   Plain-document fallback (no JS)
   ========================================================================== */
#field { display: none; }
.corner { display: flex; gap: 1.2rem; padding: 1rem var(--edge); flex-wrap: wrap; }
.brand { align-items: center; gap: 0.7rem; }
.mark { width: 22px; height: 22px; color: var(--straw); flex: none; }
.facts div { display: flex; gap: 0.6rem; }
.facts dt { color: var(--dim); }
.home, .sheet { padding: 3rem var(--edge); max-width: 46rem; }
.legal { padding: 2rem var(--edge); color: var(--dim); }

/* ==========================================================================
   Home
   ========================================================================== */
.home h1 {
  font-weight: 400;
  font-size: clamp(2.1rem, 3.9vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
}
.home p { margin-top: 1.4rem; max-width: 24em; color: var(--dim); font-size: clamp(1rem, 1.2vw, 1.15rem); line-height: 1.45; }

/* ==========================================================================
   Sheet content
   ========================================================================== */
.sheet__bar { display: flex; align-items: center; gap: 1.6rem; }
.sheet__bar h2 { font: inherit; color: var(--straw); }
.sheet__bar a { color: var(--dim); }

.sheet__body { padding-top: 1.5rem; }
.sheet__body > p { max-width: 31em; color: #c9c6be; }
.sheet__body > p + p { margin-top: 1em; }
.sheet__body > p a, .qa a { border-bottom: 1px solid var(--straw); }
.sheet__body > p a:hover, .qa a:hover { color: var(--straw); }
.sheet__body .lead {
  font-size: clamp(1.6rem, 2.3vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
  color: var(--fg);
  max-width: 19em;
  margin-bottom: 1.6rem;
}
.next { display: flex; gap: 1.8rem; margin-top: 2.8rem !important; padding-top: 1.2rem; border-top: 1px solid var(--rule); max-width: none !important; }
.next a { border: 0 !important; color: var(--fg); }

/* focus entries */
.entry { display: grid; grid-template-columns: 3.4rem 1fr; padding: 1.5rem 0 1.6rem; border-top: 1px solid var(--rule); }
.entry:last-child { border-bottom: 1px solid var(--rule); }
.entry > span { color: var(--straw); padding-top: 0.75em; }
.entry h3, .qa h3 { font-weight: 400; font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.012em; margin-bottom: 0.5rem; }
.entry p, .qa p { color: #b5b2aa; max-width: 30em; }

/* term rows */
.rows > div { display: grid; grid-template-columns: 10.5rem 1fr; gap: 1rem; padding: 0.95rem 0 1rem; border-top: 1px solid var(--rule); align-items: baseline; }
.rows > div:last-child { border-bottom: 1px solid var(--rule); }
.rows dt { color: var(--dim); }
.rows dd { font-size: 1.2rem; line-height: 1.3; }

/* faq */
.qa { padding: 1.4rem 0 1.5rem; border-top: 1px solid var(--rule); }
.qa:first-child { border-top: 0; padding-top: 0; }

/* ==========================================================================
   Form
   ========================================================================== */
.pitch-form { margin-top: 2.4rem; display: flex; flex-direction: column; gap: 1.7rem; }
.pf__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.pf__field { display: flex; flex-direction: column; min-width: 0; }
.pf__field label { color: var(--dim); }
.pf__field input,
.pf__field select,
.pf__field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  color: var(--fg);
  font: 400 1.2rem/1.35 var(--serif);
  padding: 0.4rem 0 0.55rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.pf__field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 7px) 55%, calc(100% - 2px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.pf__field select:invalid { color: var(--dim); }
.pf__field select option { background: var(--sheet); color: var(--fg); }
.pf__field textarea { resize: vertical; }
.pf__field input:focus, .pf__field select:focus, .pf__field textarea:focus { border-bottom-color: var(--straw); }
.pf__dropzone {
  margin-top: 0.6rem;
  border: 1px dashed rgba(233, 230, 223, 0.3);
  padding: 1.15rem 1.1rem;
  color: #b5b2aa;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.pf__dropzone u { text-decoration: none; border-bottom: 1px solid var(--straw); color: var(--fg); }
.pf__dropzone:hover, .pf__dropzone:focus-visible, .pf__dropzone.is-drag { border-color: var(--straw); color: var(--fg); outline: none; }
.pf__dropzone.has-file { border-style: solid; border-color: var(--straw); color: var(--straw); }
.send {
  align-self: flex-start;
  background: var(--fg);
  color: var(--bg);
  border: 0;
  border-radius: 0;
  padding: 1.25em 2.2em;
  cursor: pointer;
  transition: background 0.2s ease;
}
.send:hover { background: var(--straw); }
.send:disabled { opacity: 0.5; cursor: default; }
.pf__status { color: var(--straw); text-transform: none; letter-spacing: 0.02em; font-size: 13px; }
.pf__status:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pf__status.is-error { color: #e08a6d; }
.fine { color: var(--dim); text-transform: none; letter-spacing: 0.02em; max-width: 44em; }
.sheet__body > .legal-inline { margin-top: 2.2rem; color: var(--dim); }
@media (min-width: 861px) { .js .legal-inline { display: none; } }

/* ==========================================================================
   Single-screen layout (JS on)
   ========================================================================== */
.js, .js body { height: 100%; overflow: hidden; }

.js #field { display: block; position: fixed; inset: 0; width: 100%; height: 100%; }

.js .corner { position: fixed; z-index: 30; padding: 0; gap: 0; flex-wrap: nowrap; }
.js .tl { top: var(--edge); left: var(--edge); gap: 0.75rem; }
.js .tr { top: calc(var(--edge) + 3px); right: var(--edge); gap: 1.9rem; }
.js .tr a[aria-current="true"] { color: var(--straw); }
.js .nav-deck { border-bottom: 1px solid var(--straw); padding-bottom: 2px; }
.js .bl { bottom: var(--edge); left: var(--edge); flex-direction: column; }
.js .facts div { display: grid; grid-template-columns: 5.6rem auto; gap: 0; }
.js .br { bottom: var(--edge); right: var(--edge); flex-direction: column; align-items: flex-end; }
.js .br time { color: var(--dim); font-variant-numeric: tabular-nums; }

.js .home {
  position: fixed;
  left: var(--edge);
  top: 50%;
  transform: translateY(-54%);
  width: min(34rem, 44vw);
  max-width: none;
  padding: 0;
  animation: rise 1.4s cubic-bezier(0.2, 0.7, 0.1, 1) both;
  transition: opacity 0.5s ease;
}
@keyframes rise { from { opacity: 0; transform: translateY(-50%); } }

.js .sheet {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(720px, 54vw);
  max-width: none;
  padding: 0 clamp(22px, 3.2vw, 52px) 3.5rem;
  background: var(--sheet);
  border-left: 1px solid var(--rule);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.7s cubic-bezier(0.2, 0.75, 0.1, 1), visibility 0s linear 0.7s;
}
.js .sheet.open { transform: none; visibility: visible; transition-delay: 0s; }
.js .sheet__bar { position: sticky; top: 0; z-index: 2; height: var(--bar); background: var(--sheet); border-bottom: 1px solid var(--rule); margin: 0 calc(-1 * clamp(22px, 3.2vw, 52px)); padding: 3px clamp(22px, 3.2vw, 52px) 0; }
.js .sheet__body { padding-top: clamp(2.2rem, 6vh, 4rem); }

.js .legal { position: fixed; z-index: 1; left: 50%; bottom: var(--edge); transform: translateX(-50%); padding: 0; width: min(30rem, 34vw); text-align: center; font-size: 9px; color: rgba(139, 136, 127, 0.7); }
.js body.sheet-open .legal { opacity: 0; }
.js .br { transition: opacity 0.3s ease; }
.js body.sheet-open .br, .js body.sheet-open .home { opacity: 0; pointer-events: none; }

@media (min-width: 861px) {
  /* the nav already marks the open section, so the bar only needs Close */
  .js .sheet__bar h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

@media (prefers-reduced-motion: reduce) {
  .js .home { animation: none; }
  .js .sheet { transition: none; }
}

/* ---- narrow screens ---- */
@media (max-width: 860px) {
  .js .sheet { width: 100%; border-left: 0; z-index: 40; }
  .js .tr { top: auto; bottom: calc(var(--edge) + 7.4rem - 14px); right: auto; left: var(--edge); gap: 1.5rem; }
  /* finger-sized tap areas without changing how the labels look */
  .js .tr a { padding: 14px 0; }
  .js .nav-deck { border-bottom: 0; text-decoration: underline; text-decoration-color: var(--straw); text-underline-offset: 6px; }
  .js .sheet__bar a { padding: 16px 0 16px 20px; }
  .next a { padding: 12px 0; }
  .js .home { width: auto; right: var(--edge); top: 46%; }
  .js .br time { display: none; }
  .js .br { top: calc(var(--edge) + 3px); bottom: auto; }
  .js .legal { display: none; }
  .js .sheet__bar { justify-content: space-between; flex-direction: row-reverse; }
  .rows > div { grid-template-columns: 1fr; gap: 0.3rem; }
  .send { align-self: stretch; }
}

/* phones: one form column */
@media (max-width: 600px) {
  .pf__row { grid-template-columns: 1fr; gap: 1.7rem; }
}

/* phones held sideways: little height, so the nav moves opposite the facts */
@media (max-width: 860px) and (max-height: 520px) {
  .js .tr { left: auto; right: var(--edge); bottom: calc(var(--edge) - 14px); }
  .js .home { top: 44%; }
  .js .home p { margin-top: 0.8rem; }
}
