/* ==========================================================================
   Very Small Family Office — recreated from the original Carrd site.

   Type scale and geometry measured off the live original at a 1440px
   viewport (root font-size 13pt = 17.333px):
     content column ..... 65rem (1127px), 6rem padding -> 919px of content
     logo ............... full content width (919 x 206)
     tagline ............ Inter 1.625em / 1.625, #FFFFFF
     jump buttons ....... 345 x 65, radius 0.5rem, Inter 1em bold
     section titles ..... Poppins 600, 5.125em / 1.625, #FFC14A + grey glow
     project buttons .... 29.5rem x 3rem, radius 0.625rem, 1.125em bold
     project panel ...... radius 1.5rem, 2 columns; left text column padded
                          5.25rem 2.625rem, right column is the media,
                          full-bleed and full-height
     project lede ....... 2.375em / 1.125, weight 500
     "Rationale" ........ 1.875em, weight 400
     project body ....... 1.25em / 1.625
     yellow rules ....... #FFE500, 4px
     work/investing ..... WHITE card + tiled noise, radius 1.25rem, 6rem pad
       heading .......... 2.25em, weight 400, #2B2B2B, centred
       lede ............. 1.5em, #000
       criteria label ... 1.625em, #170000
       list ............. 1.25em, #000
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,700;0,900;1,400&family=Poppins:wght@600;900&display=swap");

:root {
  --page: #9e9e9e;
  --wash: #3d3d3d;
  --gold: #ffc14a;
  --yellow: #ffe500;
  --white: #fff;
  --btn-ink: #404040;
  --veil: #8f8f8f;
  --card-ink: #2b2b2b;
  --criteria-ink: #170000;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Poppins", var(--sans);
  --glow: 0.188rem 0 1.1875rem #5c5c5c;
  --glow-light: 0.188rem 0 1.1875rem #fff;
}

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

/* 13pt, matching the original at desktop widths */
html { font-size: 17.3333px; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--page);
  color: var(--white);
  font-family: var(--sans);
  line-height: 1.625;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Fixed backdrop: dark wash + drifting square field */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  background-image: url("../assets/images/bg-squares.svg"),
                    linear-gradient(45deg, var(--wash) 0%, var(--wash) 100%);
  background-size: cover, auto;
  background-position: center, 0 0;
  background-repeat: no-repeat, repeat;
}

.site-wrapper { position: relative; z-index: 2; }

.inner {
  width: 65rem;
  max-width: 100%;
  margin: 0 auto;
  padding: 6rem;
  text-align: center;
}

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

a { color: inherit; }

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */
.logo {
  width: 100%;
  margin: 0 auto 0.875rem;
}

.tagline {
  font-size: 1.625em;
  font-weight: 400;
  line-height: 1.625;
  margin-bottom: 1.75rem;
}

/* --------------------------------------------------------------------------
   Buttons (white pills)
   -------------------------------------------------------------------------- */
.jump-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.375rem;
}

.jump-links a,
.project-link a,
.project > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  background: var(--white);
  color: var(--btn-ink);
  font-family: var(--sans);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.jump-links a:hover,
.project-link a:hover,
.project > summary:hover { transform: translateY(-2px); background: #f2f2f2; }

/* Icon markup comes first in the DOM; reverse so the label reads left
   and the arrow sits at the right edge, as on the original. */
.jump-links a,
.project-link a { flex-direction: row-reverse; }

.jump-links a {
  width: 19.9rem;
  max-width: 100%;
  height: 3.75rem;
  padding: 0 1.5rem;
  font-size: 1em;
  border-radius: 0.5rem;
}

.jump-links svg,
.project-link svg {
  width: 1.5em;
  height: 1em;
  fill: var(--btn-ink);
  flex: none;
}

/* --------------------------------------------------------------------------
   Dividers & section headings
   -------------------------------------------------------------------------- */
.divider {
  border: none;
  height: 5px;
  background: var(--white);
  margin: 2.5rem 0;
}

.section-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 5.125em;
  line-height: 1.625;
  color: var(--gold);
  text-align: left;
  text-shadow: var(--glow);
  margin-bottom: 1rem;
}

/* --------------------------------------------------------------------------
   Project accordions
   -------------------------------------------------------------------------- */
.project { margin-bottom: 1.375rem; text-align: left; }

.project > summary {
  width: 29.5rem;
  max-width: 100%;
  height: 3rem;
  padding: 0 1.5rem;
  font-size: 1.125em;
  border-radius: 0.625rem;
  list-style: none;
}

.project > summary::-webkit-details-marker { display: none; }

.project > summary::after {
  content: "";
  width: 1.2em;
  height: 1.2em;
  flex: none;
  background: currentColor;
  clip-path: polygon(50% 70%, 6% 26%, 18% 14%, 50% 46%, 82% 14%, 94% 26%);
  transition: transform 0.25s ease;
}

.project[open] > summary::after { transform: rotate(180deg); }

/* Panel: the photo is the background, no veil — as on the original */
.project-panel {
  margin-top: 1.25rem;
  border-radius: 1.5rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
}

.panel-col {
  padding: 5.25rem 2.625rem;
  min-width: 0;
}

.panel-col > * + * { margin-top: 1.4rem; }

/* The media column bleeds to the panel edge and fills its height */
.panel-media {
  padding: 0;
  position: relative;
  min-height: 100%;
}

.project-logo { max-width: 100%; margin-bottom: 1.4rem; }

.project-lede {
  font-size: 2.375em;
  font-weight: 500;
  line-height: 1.125;
  letter-spacing: -0.075rem;
  text-shadow: var(--glow);
}

.rule-gold {
  border: none;
  height: 4px;
  background: var(--yellow);
  margin: 1.75rem 0;
}

.rationale-label {
  font-size: 1.875em;
  font-weight: 700;
  line-height: 1.625;
  text-shadow: var(--glow);
}

.project-body,
.status {
  font-size: 1.25em;
  line-height: 1.625;
  text-shadow: var(--glow);
}

.status .live { color: var(--yellow); }
.status .hold { color: var(--white); }

.project-link a {
  width: 100%;
  height: 3.75rem;
  padding: 0 1.875rem;
  font-size: 1em;
  border-radius: 0.5rem;
}

/* Media (video thumbnails / embeds) */
.media {
  position: absolute;
  inset: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

.media img,
.media video,
.media iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
}

.media .play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  transition: background 0.25s ease;
}

.media:hover .play { background: rgba(0, 0, 0, 0.1); }

.media .play::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 26px solid rgba(255, 255, 255, 0.95);
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

/* --------------------------------------------------------------------------
   Work & Investing cards — white, noise-textured, dark text
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  border-radius: 1.25rem;
  margin-top: 6rem;
  overflow: hidden;
  background-image: url("../assets/images/noise.svg"),
                    linear-gradient(0deg, var(--white) 0%, var(--white) 100%);
  background-size: 512px, cover;
  background-repeat: repeat, repeat;
  color: #000;
  text-align: left;
}

/* Grey veil that fades once the card scrolls into view */
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--veil);
  border-radius: inherit;
  pointer-events: none;
  transition: background-color 1s ease;
  z-index: 1;
}

.card.revealed::after { background: rgba(0, 0, 0, 0); }

.card > .card-inner {
  position: relative;
  z-index: 2;
  padding: 6rem;
}

.card-inner > * + * { margin-top: 1.4rem; }

.card-logo {
  margin-left: auto;
  margin-right: auto;
}

.card h2 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 2.25em;
  line-height: 1.125;
  letter-spacing: -0.065625rem;
  color: var(--card-ink);
  text-align: center;
}

.card .card-lede {
  font-size: 1.5em;
  line-height: 1.625;
  color: #000;
  text-shadow: var(--glow-light);
}

.card .criteria-label {
  font-size: 1.625em;
  line-height: 1.625;
  color: var(--criteria-ink);
}

.card ol {
  margin-left: 1.4rem;
  font-size: 1.25em;
  line-height: 1.625;
  color: #000;
}

.card li { margin-bottom: 0.6rem; }

.card blockquote {
  font-size: 1.25em;
  line-height: 1.625;
  color: #000;
  font-style: italic;
  border-left: 4px solid var(--yellow);
  padding-left: 1.2rem;
}

.card blockquote cite { display: block; font-style: normal; margin-top: 0.6rem; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .inner { padding: 3.5rem 2rem; }
  .section-title { font-size: 4em; }
}

@media (max-width: 900px) {
  .project-panel { grid-template-columns: 1fr; }
  .panel-media { min-height: 20rem; }
  .media { position: relative; inset: auto; height: 20rem; }
  .section-title { font-size: 3.25em; }
  .project-lede { font-size: 2em; }
  .card > .card-inner { padding: 3rem 2rem; }
  .panel-col { padding: 3rem 2rem; }
}

@media (max-width: 736px) {
  html { font-size: 14.6667px; }
  .inner { padding: 2.625rem 1.5rem; }
  .card { margin-top: 3rem; }
  .section-title { font-size: 2.75em; }
  .jump-links li { width: 100%; }
  .jump-links a { width: 100%; }
}

/* Fallback shown when a YouTube embed cannot load (offline, blocked, or the
   page was opened straight off disk, where YouTube refuses null-origin
   embeds). Keeps the box the right shape and offers a way out to YouTube. */
.media-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
}

.media .watch-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.75em 1.4em;
  background: var(--white);
  color: var(--btn-ink);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1em;
  text-decoration: none;
  border-radius: 0.5rem;
}

.media .watch-link::before { content: "\25B6"; font-size: 0.8em; }
.media .watch-link:hover { background: #f2f2f2; }
