/* ==========================================================
   hobochocolate.com
   Shared by index.html and 404.html. No frameworks. Edit anything.

   The page runs from dark to light: a cocoa "zone" at the top
   that fades out to nothing, over a pale paper background.
   Text colour is set per zone, not per element — see
   .zone--dark and .zone--paper below.
   ========================================================== */

:root{
  /* the dark end */
  --cocoa-top:   #2B1810;  /* deepest, behind the name */
  --cocoa-mid:   #41281A;  /* body of the dark zone */
  --cocoa-deep:  #1F0F08;  /* channels between chocolate segments */
  --cocoa-light: #6B4630;  /* top of a segment, where light hits */
  --cocoa-shade: #3B2310;  /* bottom of a segment, where it falls away */

  /* the light end */
  --paper:       #FAF6F0;  /* near-white, faintly warm */
  --paper-warm:  #F1E8DC;  /* raised panels on paper */
  --paper-edge:  #E2D5C4;  /* hairlines on paper */

  /* text */
  --milk:        #F4EAE0;  /* main text on cocoa */
  --chalk:       #BCA794;  /* secondary text on cocoa */
  --ink:         #2A1A12;  /* main text on paper */
  --ink-soft:    #6B5848;  /* secondary text on paper */

  /* the one accent */
  --foil:        #C9A227;  /* gold, on dark */
  --foil-deep:   #8A6E12;  /* gold that stays legible on paper */

  --measure: 62ch;
  --edge: clamp(1.25rem, 5vw, 5rem);
  --radius: 14px;
}

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

html{
  scroll-behavior:smooth;
  color-scheme:light;
}

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:"Archivo", system-ui, sans-serif;
  font-size:clamp(1rem, .95rem + .25vw, 1.125rem);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* a whisper of grain, so the paper end isn't a dead flat white */
body::after{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;
  opacity:.035;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

a{ color:inherit; }

:focus-visible{
  outline:2px solid currentColor;
  outline-offset:3px;
  border-radius:2px;
}

.wrap{
  max-width:72rem;
  margin:0 auto;
  padding-inline:var(--edge);
  position:relative;
  z-index:1;
}

/* anchors shouldn't land flush against the top of the window */
[id]{ scroll-margin-top:2.5rem; }

/* ==========================================================
   the two zones
   ========================================================== */

/* Everything dark lives in here. The gradient's last stop is
   fully transparent, so the bottom of this block dissolves into
   the paper background rather than ending on an edge. */
.zone--dark{
  position:relative;
  padding-bottom:clamp(7rem, 16vh, 12rem);
  color:var(--milk);
  background:
    radial-gradient(90% 60% at 12% 0%, rgba(255,232,200,.10), transparent 60%),
    linear-gradient(
      180deg,
      var(--cocoa-top)       0%,
      var(--cocoa-mid)      42%,
      rgba(90,58,38,.78)    72%,
      rgba(140,100,70,.34)  88%,
      rgba(180,140,105,0)  100%
    );
}

.zone--paper{
  position:relative;
  color:var(--ink);
  padding-top:clamp(1rem, 4vh, 3rem);
}

/* ---------- top bar ---------- */

.topbar{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:1rem;
  padding-block:1.5rem;
  border-bottom:1px solid rgba(244,234,224,.14);
}

.topbar__mark{
  font-family:"Fraunces", Georgia, serif;
  font-variation-settings:"SOFT" 40, "WONK" 1;
  font-weight:700;
  font-size:1.0625rem;
  letter-spacing:.01em;
  text-decoration:none;
}

.topbar__links{
  display:flex;
  flex-wrap:wrap;
  gap:1.25rem;
  font-size:.9375rem;
  color:var(--chalk);
}

.topbar__links a{
  text-decoration:none;
  padding-bottom:2px;
  border-bottom:1px solid transparent;
  transition:color .15s ease, border-color .15s ease;
}
.topbar__links a:hover{ color:var(--milk); border-bottom-color:var(--foil); }

/* ---------- hero ---------- */

.hero{
  padding-block:clamp(4rem, 12vh, 9rem) clamp(3.5rem, 9vh, 7rem);
}

.hero__name{
  font-family:"Fraunces", Georgia, serif;
  font-variation-settings:"SOFT" 60, "WONK" 1;
  font-weight:900;
  font-size:clamp(3.25rem, 13vw, 9.5rem);
  line-height:.88;
  letter-spacing:-.03em;
  margin:0;
}
.hero__name span{ display:block; }

.hero__rule{
  width:5.5rem;
  height:3px;
  background:var(--foil);
  margin:clamp(1.75rem,4vw,2.75rem) 0 clamp(1.5rem,3vw,2rem);
}

.hero__blurb{
  max-width:var(--measure);
  font-size:clamp(1.125rem, 1rem + .6vw, 1.5rem);
  line-height:1.5;
  margin:0 0 2.5rem;
  text-wrap:pretty;
}
.hero__blurb em{
  font-style:normal;
  color:var(--chalk);
}

.button{
  display:inline-block;
  font-family:"Archivo", sans-serif;
  font-weight:600;
  font-size:1rem;
  color:var(--cocoa-deep);
  background:var(--milk);
  text-decoration:none;
  padding:.8rem 1.4rem;
  border-radius:999px;
  transition:background .15s ease, transform .15s ease;
}
.button:hover{ background:var(--foil); transform:translateY(-1px); }

/* ---------- section headings ---------- */

.section-head{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  justify-content:space-between;
  gap:.75rem 2rem;
  margin-bottom:1.75rem;
}

.section-head h2{
  font-family:"Fraunces", Georgia, serif;
  font-variation-settings:"SOFT" 40, "WONK" 1;
  font-weight:700;
  font-size:clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem);
  line-height:1.1;
  letter-spacing:-.015em;
  margin:0;
  text-wrap:balance;
}

.section-head p{
  margin:0;
  font-size:.9375rem;
  max-width:34ch;
}

.zone--dark .section-head p{ color:var(--chalk); }
.zone--paper .section-head p{ color:var(--ink-soft); }

/* ---------- the bar: projects as chocolate segments ---------- */

.bar-section{ padding-block:clamp(2rem,6vh,4rem) 0; }

.bar{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:5px;
  background:var(--cocoa-deep);
  padding:5px;
  border-radius:var(--radius);
  box-shadow:0 2rem 4rem rgba(20,8,2,.5);
}

.segment{
  display:block;
  position:relative;
  padding:clamp(1.5rem, 3.5vw, 2.5rem);
  min-height:13rem;
  text-decoration:none;
  color:inherit;
  background:linear-gradient(158deg, var(--cocoa-light), var(--cocoa-shade));
  box-shadow:
    inset 2px 2px 0 rgba(244,234,224,.09),
    inset -2px -2px 0 rgba(0,0,0,.42);
  transition:transform .18s ease, box-shadow .18s ease;
}

/* soften only the outer four corners of the slab */
.bar > :first-child{ border-radius:calc(var(--radius) - 5px) 0 0 0; }
.bar > :nth-child(2){ border-radius:0 calc(var(--radius) - 5px) 0 0; }
.bar > :nth-last-child(2){ border-radius:0 0 0 calc(var(--radius) - 5px); }
.bar > :last-child{ border-radius:0 0 calc(var(--radius) - 5px) 0; }

.segment h3{
  font-family:"Fraunces", Georgia, serif;
  font-variation-settings:"SOFT" 40, "WONK" 1;
  font-weight:700;
  font-size:1.5rem;
  line-height:1.15;
  margin:0 0 .6rem;
}

.segment p{
  margin:0;
  color:var(--chalk);
  font-size:.9375rem;
  line-height:1.55;
  max-width:38ch;
}

.segment__shot{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:684 / 500;
  object-fit:cover;
  object-position:top;
  margin-bottom:1.25rem;
  border-radius:4px;
  box-shadow:0 0 0 1px rgba(0,0,0,.5), 0 .5rem 1rem rgba(0,0,0,.35);
}

.segment__meta{
  margin-top:1.25rem;
  font-size:.8125rem;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--foil);
}

a.segment:hover,
a.segment:focus-visible{
  transform:translateY(-4px);
  box-shadow:
    inset 2px 2px 0 rgba(244,234,224,.16),
    inset -2px -2px 0 rgba(0,0,0,.42),
    0 .75rem 1.5rem rgba(0,0,0,.45);
}

.segment--open{
  background:none;
  box-shadow:inset 0 0 0 1px rgba(244,234,224,.12);
  display:flex;
  align-items:center;
}
.segment--open p{ color:var(--chalk); }

/* ==========================================================
   animations
   ========================================================== */

.films{ padding-block:clamp(2rem,7vh,4.5rem) clamp(2rem,6vh,4rem); }

.film{
  background:var(--paper-warm);
  border:1px solid var(--paper-edge);
  border-radius:var(--radius);
  padding:clamp(.65rem, 1.6vw, 1rem);
  box-shadow:0 1rem 2.5rem rgba(90,58,38,.10);
}

.film__video{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:16 / 9;
  background:#000;
  border-radius:calc(var(--radius) - 6px);
}

.film__caption{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  justify-content:space-between;
  gap:.35rem 1.5rem;
  padding:1rem .5rem .35rem;
}

.film__caption h3{
  font-family:"Fraunces", Georgia, serif;
  font-variation-settings:"SOFT" 40, "WONK" 1;
  font-weight:700;
  font-size:1.375rem;
  margin:0;
}

.film__meta{
  font-size:.8125rem;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--foil-deep);
}

.film__note{
  margin:.35rem .5rem 0;
  padding:0 0 .5rem;
  color:var(--ink-soft);
  font-size:.9375rem;
  max-width:52ch;
}

.films__more{
  margin-top:1.25rem;
  padding:1.25rem 1.5rem;
  border:1px dashed var(--paper-edge);
  border-radius:var(--radius);
  color:var(--ink-soft);
  font-size:.9375rem;
}
.films__more p{ margin:0; max-width:52ch; }

/* ---------- about + contact ---------- */

.closing{
  padding-block:clamp(3rem,8vh,5rem);
  border-top:1px solid var(--paper-edge);
  display:grid;
  gap:clamp(2.5rem,6vw,5rem);
  grid-template-columns:1fr;
}

.closing h2{
  font-family:"Fraunces", Georgia, serif;
  font-variation-settings:"SOFT" 40, "WONK" 1;
  font-weight:700;
  font-size:1.5rem;
  margin:0 0 .85rem;
}

.closing p{ margin:0 0 1rem; max-width:var(--measure); text-wrap:pretty; }
.closing p:last-child{ margin-bottom:0; }

.contact-link{
  font-size:1.125rem;
  text-decoration:none;
  border-bottom:2px solid var(--foil-deep);
  padding-bottom:1px;
  transition:color .15s ease;
}
.contact-link:hover{ color:var(--foil-deep); }

footer{
  padding-block:2rem 3rem;
  border-top:1px solid var(--paper-edge);
  color:var(--ink-soft);
  font-size:.875rem;
  display:flex;
  flex-wrap:wrap;
  gap:.5rem 1.5rem;
  justify-content:space-between;
}

/* ---------- wider screens ---------- */

@media (min-width:56rem){
  .bar{ grid-template-columns:repeat(2, 1fr); }
  .closing{ grid-template-columns:1.4fr 1fr; }
}

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

@media (max-width:40rem){
  .bar{ grid-template-columns:1fr; }
  .segment{ min-height:0; }
  /* one column: round the first and last segment only */
  .bar > :first-child{ border-radius:calc(var(--radius) - 5px) calc(var(--radius) - 5px) 0 0; }
  .bar > :nth-child(2){ border-radius:0; }
  .bar > :nth-last-child(2){ border-radius:0; }
  .bar > :last-child{ border-radius:0 0 calc(var(--radius) - 5px) calc(var(--radius) - 5px); }
  .topbar{ flex-direction:column; align-items:flex-start; gap:.75rem; }
}

/* ---------- people who'd rather things held still ---------- */

@media (prefers-reduced-motion:reduce){
  html{ scroll-behavior:auto; }
  *{ transition:none !important; }
  a.segment:hover, a.segment:focus-visible{ transform:none; }
  .button:hover{ transform:none; }
}

/* ---------- the not-found page ---------- */

/* 404 is short, so it keeps the dark zone all the way down —
   no fade to paper, or the footer would disappear into it */
.zone--dark.zone--full{
  min-height:100vh;
  padding-bottom:0;
  display:flex;
  flex-direction:column;
  background:
    radial-gradient(90% 60% at 12% 0%, rgba(255,232,200,.10), transparent 60%),
    linear-gradient(180deg, var(--cocoa-top) 0%, var(--cocoa-mid) 70%, #4C301F 100%);
}
.zone--dark.zone--full > .wrap{
  flex:1;
  display:flex;
  flex-direction:column;
}
.zone--dark.zone--full footer{
  margin-top:auto;
  border-top-color:rgba(244,234,224,.14);
  color:var(--chalk);
}

.lost{
  flex:1;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding-block:4rem;
}

.lost h1{
  font-family:"Fraunces", Georgia, serif;
  font-variation-settings:"SOFT" 60, "WONK" 1;
  font-weight:900;
  font-size:clamp(3rem, 10vw, 6rem);
  line-height:.9;
  letter-spacing:-.02em;
  margin:0 0 1.25rem;
}

.lost p{
  color:var(--chalk);
  font-size:1.125rem;
  max-width:46ch;
  margin:0 0 2rem;
}

/* ==========================================================
   project pages
   Same two-zone layout as the home page: a dark header that
   fades into paper, with the write-up on the light half.
   ========================================================== */

.project-hero{
  padding-block:clamp(3rem, 9vh, 6rem) clamp(2rem, 6vh, 4rem);
}

.project-hero__back{
  display:inline-block;
  font-size:.875rem;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--chalk);
  text-decoration:none;
  margin-bottom:1.5rem;
}
.project-hero__back:hover{ color:var(--milk); }

.project-hero h1{
  font-family:"Fraunces", Georgia, serif;
  font-variation-settings:"SOFT" 60, "WONK" 1;
  font-weight:900;
  font-size:clamp(2.5rem, 7vw, 5rem);
  line-height:.95;
  letter-spacing:-.025em;
  margin:0 0 1rem;
  text-wrap:balance;
}

.project-hero__blurb{
  max-width:var(--measure);
  font-size:clamp(1.0625rem, 1rem + .4vw, 1.3125rem);
  line-height:1.5;
  color:var(--chalk);
  margin:0 0 2rem;
  text-wrap:pretty;
}

/* the row of links and tags under a project title */
.project-hero__links{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.75rem 1.25rem;
}

.source-link{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  font-weight:500;
  font-size:.9375rem;
  text-decoration:none;
  color:var(--cocoa-deep);
  background:var(--milk);
  padding:.55rem 1rem;
  border-radius:999px;
  transition:background .15s ease, transform .15s ease;
}
.source-link:hover{ background:var(--foil); transform:translateY(-1px); }
.source-link svg{ width:1.05em; height:1.05em; fill:currentColor; }

.project-hero__tags{
  font-size:.8125rem;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--foil);
}

/* ---------- the write-up, on paper ---------- */

.prose{ padding-block:clamp(1.5rem,5vh,3rem) clamp(2rem,6vh,4rem); }

.prose h2{
  font-family:"Fraunces", Georgia, serif;
  font-variation-settings:"SOFT" 40, "WONK" 1;
  font-weight:700;
  font-size:clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height:1.15;
  margin:2.75rem 0 .85rem;
  text-wrap:balance;
}
.prose > :first-child{ margin-top:0; }

.prose h3{
  font-family:"Fraunces", Georgia, serif;
  font-variation-settings:"SOFT" 40, "WONK" 1;
  font-weight:700;
  font-size:1.1875rem;
  margin:1.75rem 0 .5rem;
}

.prose p, .prose li{ max-width:var(--measure); text-wrap:pretty; }
.prose p{ margin:0 0 1rem; }
.prose ul{ margin:0 0 1rem; padding-left:1.2rem; }
.prose li{ margin-bottom:.4rem; }
.prose strong{ font-weight:600; }

.prose code{
  font-family:ui-monospace, "DejaVu Sans Mono", monospace;
  font-size:.875em;
  background:var(--paper-warm);
  border:1px solid var(--paper-edge);
  border-radius:4px;
  padding:.1em .35em;
}

.prose pre{
  background:#2B1810;
  color:var(--milk);
  border-radius:8px;
  padding:1rem 1.15rem;
  overflow-x:auto;
  font-size:.875rem;
  line-height:1.5;
  margin:0 0 1rem;
  max-width:var(--measure);
}
.prose pre code{
  background:none;
  border:none;
  padding:0;
  font-size:1em;
  color:inherit;
}

.prose a{ color:var(--foil-deep); text-underline-offset:3px; }

/* ---------- screenshots ---------- */

.shots{
  display:grid;
  gap:1rem;
  grid-template-columns:repeat(auto-fit, minmax(16rem, 1fr));
  margin:1.5rem 0 2rem;
}

.shot{
  margin:0;
  background:var(--paper-warm);
  border:1px solid var(--paper-edge);
  border-radius:var(--radius);
  padding:.6rem;
  box-shadow:0 1rem 2.5rem rgba(90,58,38,.10);
}

.shot img{
  display:block;
  width:100%;
  height:auto;
  border-radius:calc(var(--radius) - 7px);
}

.shot figcaption{
  padding:.65rem .35rem .15rem;
  font-size:.8125rem;
  color:var(--ink-soft);
}

/* ---------- a disclaimer that has to be seen ---------- */

.disclaimer{
  margin:2rem 0 0;
  padding:1.1rem 1.35rem;
  border:1px solid var(--paper-edge);
  border-left:4px solid var(--foil-deep);
  border-radius:8px;
  background:var(--paper-warm);
  color:var(--ink-soft);
  font-size:.9375rem;
}
.disclaimer p{ margin:0 0 .6rem; max-width:none; }
.disclaimer p:last-child{ margin-bottom:0; }
.disclaimer strong{ color:var(--ink); }

/* ---------- next / previous project ---------- */

.project-foot{
  display:flex;
  flex-wrap:wrap;
  gap:1rem 1.5rem;
  justify-content:space-between;
  padding-block:clamp(2rem,5vh,3rem);
  border-top:1px solid var(--paper-edge);
  font-size:.9375rem;
}
.project-foot a{ color:var(--foil-deep); text-underline-offset:3px; }
