/* Clamshell Capital holding page v4. Brand: teal #007073, cream #E4DBCD, bronze #827031 for decoration only. */

@font-face { font-family: "Instrument Serif"; src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/geist-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  color-scheme: only light;
  --paper: #F7F4EE;
  --cream: #E4DBCD;
  --teal: #007073;
  --teal-deep: #005A5D;
  --ink: #0B2E2F;
  --body: #33514F;
  --bronze: #827031;
  --line: rgba(0, 112, 115, .22);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  position: relative;
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  background-image:
    url("/img/grain-v1.svg"),
    radial-gradient(60% 55% at 88% 18%, rgba(0, 112, 115, .07), transparent 70%),
    radial-gradient(55% 45% at 6% 96%, rgba(228, 219, 205, .75), transparent 70%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }
img, svg, canvas { display: block; max-width: 100%; }
.nw { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right)); }

.skip { position: absolute; left: 16px; top: -60px; z-index: 10; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

/* Sticky header: logo and Contact */
.nav { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); transition: background .3s, box-shadow .3s; }
.nav.is-stuck { background: rgba(247, 244, 238, .88); -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px); box-shadow: 0 1px 0 rgba(0, 112, 115, .12); }
.nav-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: clamp(18px, 2.4vw, 28px); transition: padding .3s var(--ease); }
.nav.is-stuck .nav-in { padding-block: 10px; }
.nav-logo img { width: clamp(108px, 10vw, 136px); height: auto; transition: width .3s var(--ease); }
.nav.is-stuck .nav-logo img { width: clamp(92px, 8vw, 112px); }
.nav-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .55); color: var(--teal-deep); font-size: 14.5px; font-weight: 500; text-decoration: none; transition: border-color .2s, background .2s; }
.nav-cta:hover { border-color: var(--teal); background: rgba(0, 112, 115, .06); }
.nav-cta::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

/* Hero: headline and portrait side by side; on phones the portrait sits between headline and copy */
.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  grid-template-areas: "head art" "body art";
  grid-template-rows: auto 1fr;
  column-gap: clamp(28px, 5vw, 88px);
  align-items: start;
  padding-block: clamp(4px, 1.5vw, 20px) clamp(32px, 5vw, 72px);
}
.hero-head { grid-area: head; }
.hero-body { grid-area: body; }

.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 clamp(14px, 2vw, 22px); font-size: 12.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-deep); }
.kicker-sep { opacity: .75; }
.kicker-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bronze); }

.h1 { margin: 0; font-weight: 400; text-wrap: balance; }
.h1-a, .h1-b { display: block; animation: rise .9s var(--ease) both; }
.h1-a { font-family: var(--serif); font-size: clamp(60px, 8.4vw, 124px); line-height: .88; letter-spacing: -.02em; color: var(--ink); animation-delay: .05s; }
.h1-b { margin-top: .16em; font-family: var(--sans); font-weight: 560; font-size: clamp(30px, 3.9vw, 56px); line-height: 1.04; letter-spacing: -.035em; color: var(--teal-deep); animation-delay: .18s; }

/* The pearl full stop, ringed like the pearl in the logo */
.stop {
  display: inline-block;
  width: .24em;
  height: .24em;
  margin-left: .07em;
  border-radius: 50%;
  vertical-align: baseline;
  background: radial-gradient(circle at 34% 30%, #F7F4EE 0 14%, rgba(228, 219, 205, .5) 26%, transparent 46%), var(--teal);
  box-shadow: inset 0 -.03em .05em rgba(0, 40, 42, .45);
  animation: drop .8s cubic-bezier(.3, 1.6, .4, 1) .9s both;
}

.lead { margin: clamp(18px, 2.2vw, 28px) 0 0; max-width: 36ch; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--body); text-wrap: pretty; animation: rise .9s var(--ease) .3s both; }
.lead em { display: block; margin-top: .4em; font-family: var(--serif); font-style: normal; font-size: 1.3em; line-height: 1.15; color: var(--teal); }

/* The milestones as a BBC BASIC listing on an ink screen, waiting at the prompt */
.basic {
  margin: clamp(20px, 2.6vw, 30px) 0 0;
  max-width: 520px;
  padding: 16px 18px 14px;
  border-radius: 14px;
  background: var(--ink);
  color: #F7F4EE;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: inset 0 0 0 1px rgba(228, 219, 205, .08), 0 22px 44px -30px rgba(11, 46, 47, .7);
  animation: rise .8s var(--ease) .42s both;
}
.basic ol { list-style: none; margin: 0; padding: 0; }
.basic li { display: grid; grid-template-columns: 2.6ch minmax(0, 1fr); gap: 12px; padding: 3px 0; }
.basic .ln { color: #5F908D; }
.basic .kw { color: #8CC3BF; margin-right: 1ch; }
.basic .q { color: #6F9D9A; }
.basic .str { text-wrap: pretty; }
/* Links are gold and underlined; on hover or focus they flip to inverse video, like a BBC Micro selection */
.basic a { color: #E8CF86; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; border-radius: 3px; transition: background .15s, color .15s, box-shadow .15s; }
.basic a:hover, .basic a:focus-visible { background: #E8CF86; color: var(--ink); text-decoration: none; box-shadow: 0 0 0 3px #E8CF86; outline: none; }
.basic-prompt { margin: 6px 0 0; color: #7FB8B5; }
.cursor { display: inline-block; width: .62em; height: 1.1em; margin-left: .3ch; vertical-align: -.2em; background: #E4DBCD; animation: blink 1.06s steps(1) infinite; }
.motion-paused .cursor { animation-play-state: paused; }
@keyframes blink { 50% { opacity: 0; } }
/* With the script, lines print one by one once the listing is on screen */
.js-basic .basic li, .js-basic .basic .basic-prompt { opacity: 0; }
.js-basic .basic.is-in li, .js-basic .basic.is-in .basic-prompt { animation: print .01s linear forwards; }
.js-basic .basic.is-in li:nth-child(1) { animation-delay: .05s; }
.js-basic .basic.is-in li:nth-child(2) { animation-delay: .2s; }
.js-basic .basic.is-in li:nth-child(3) { animation-delay: .35s; }
.js-basic .basic.is-in li:nth-child(4) { animation-delay: .5s; }
.js-basic .basic.is-in li:nth-child(5) { animation-delay: .65s; }
.js-basic .basic.is-in li:nth-child(6) { animation-delay: .8s; }
.js-basic .basic.is-in .basic-prompt { animation-delay: 1s; }
@keyframes print { to { opacity: 1; } }

/* Calls to action */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: clamp(22px, 2.6vw, 30px); animation: rise .8s var(--ease) .5s both; }
.btn, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px; border-radius: 999px;
  font-family: var(--sans); font-size: 15.5px; text-decoration: none; cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.btn { background: var(--teal); color: var(--paper); font-weight: 560; border: 0; box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 8px 24px -10px rgba(0, 90, 93, .55); }
.btn span { transition: transform .25s var(--ease); }
.btn:hover { background: var(--teal-deep); }
.btn:hover span { transform: translate(2px, -2px); }
.btn-ghost { border: 1px solid var(--line); background: transparent; color: var(--teal-deep); font-weight: 500; }
.btn-ghost:hover { border-color: var(--teal); background: rgba(0, 112, 115, .05); }
.btn:active, .btn-ghost:active { transform: scale(.98); }

/* Portrait: rendered in code, settling on a dot matrix */
.portrait { grid-area: art; justify-self: end; width: 100%; max-width: 520px; margin: clamp(0px, 1vw, 12px) 0 0; }
.portrait-stage { position: relative; aspect-ratio: 960 / 942; }
.portrait-stage::before {
  content: ""; position: absolute; inset: 8% 6% -2% 2%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 112, 115, .09), rgba(228, 219, 205, .35) 60%, transparent);
}
.portrait-still, .portrait-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.portrait-canvas { opacity: 0; }
/* The still only appears if the script has not taken over (no script, or it failed) */
.portrait-still { opacity: 0; animation: show .6s ease 2.2s forwards; }
.portrait.is-live .portrait-canvas { opacity: 1; }
.portrait.is-live .portrait-still { opacity: 0; animation: none; }

.portrait-cap { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-family: var(--mono); font-size: 11px; font-weight: 500; line-height: 1; letter-spacing: .1em; text-transform: uppercase; color: var(--teal-deep); }
.pc-label { white-space: nowrap; }
.pc-steps { display: flex; flex: 1; gap: 3px; min-width: 40px; }
.pc-steps i { flex: 1; height: 2px; border-radius: 2px; background: rgba(0, 112, 115, .16); transition: background .3s; }
.pc-steps i.on { background: var(--teal); }
.pc-layer { white-space: nowrap; color: var(--ink); }
.pc-pause { flex: none; min-height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--teal-deep); font: inherit; letter-spacing: inherit; text-transform: uppercase; cursor: pointer; }
.pc-pause:hover { border-color: var(--teal); }
.pc-pause[hidden] { display: none; }

/* Footer */
.foot { padding-block: 0 calc(26px + env(safe-area-inset-bottom)); font-size: 12.5px; line-height: 1.6; color: var(--body); }
.foot::before { content: ""; display: block; border-top: 1px solid rgba(0, 112, 115, .14); margin-bottom: 20px; }
.foot p { margin: 0 0 6px; max-width: 92ch; text-wrap: pretty; }
.foot-meta { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 10px !important; font-size: 12px; letter-spacing: .02em; color: var(--teal-deep); }

/* Motion */
@keyframes rise { from { opacity: 0; transform: translateY(.35em); } to { opacity: 1; transform: none; } }
@keyframes drop { 0% { opacity: 0; transform: translateY(-1.2em) scale(.6); } 60% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes show { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js-basic .basic li, .js-basic .basic .basic-prompt { opacity: 1; }
  .portrait-still { opacity: 1; }
}

/* Tablet and phone: headline, then portrait, then the detail */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "art" "body"; grid-template-rows: auto; row-gap: 26px; }
  .portrait { justify-self: start; max-width: 460px; margin: 0; }
  .h1-a { font-size: clamp(56px, 15vw, 104px); }
  .h1-b { font-size: clamp(28px, 7vw, 46px); }
  .lead { margin-top: 0; }
  .basic { max-width: none; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .nav-in { padding-block: 22px 16px; }
  .nav-logo img { width: 118px; }
  .nav.is-stuck .nav-logo img { width: 96px; }
  .nav-cta { min-height: 40px; padding: 0 16px; }
  .kicker { font-size: 11px; letter-spacing: .12em; margin-bottom: 16px; }
  .h1-a { font-size: clamp(60px, 21vw, 96px); line-height: .9; }
  .h1-b { font-size: clamp(25px, 7.1vw, 34px); margin-top: .22em; }
  .hero { row-gap: 22px; padding-bottom: 48px; }
  .portrait { max-width: min(100%, 400px); justify-self: center; }
  .lead em { font-size: 1.26em; margin-top: .45em; }
  .basic { padding: 14px 14px 12px; font-size: 13px; margin-top: 24px; }
  .basic li { gap: 10px; padding: 4px 0; }
  .cta { margin-top: 24px; }
  .cta .btn { flex: 1 1 100%; }
  .cta .btn-ghost { flex: 1 1 0; }
  .foot { font-size: 12.5px; }
}
@media (max-width: 480px) {
  .kicker-place, .kicker-sep { display: none; }
}
@media (max-width: 420px) {
  .pc-label { display: none; }
}
@media (max-width: 359px) {
  .portrait-cap { gap: 8px; letter-spacing: .06em; }
}
@media (max-width: 300px) {
  .basic li { gap: 8px; }
  .cta .btn-ghost { flex: 1 1 100%; }
  .pc-label { display: none; }
}
