/* Gittalo public page. Colours and type from docs/DESIGN.md */
:root {
  --dark: #171615;
  --panel: #242321;
  --paper: #F7F6F3;
  --paper-2: #ECEAE5;
  --ink: #2F3437;
  --ink-light: #ECEAE6;
  --text-light: #C9C5BF;
  --muted-light: #A39F98;
  --claude: #D97757; /* taste-skill-ignore: the one brand accent, docs/DESIGN.md §2.2 */
  --lane-blue: #5AA9E6;
  --lane-green: #6CC070;
  --lane-yellow: #E3C651;
  --lane-pink: #E07AB8;
  --margin: clamp(24px, 2.4vw, 32px);
  --bar: 80px;
  --gap: clamp(120px, 14vw, 200px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* No sideways scroll on phones, whatever pokes past the edge; clip keeps the sticky header working */
html, body { overflow-x: clip; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--claude); outline-offset: 3px; }
::selection { background: var(--claude); color: var(--dark); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header: takes the ink of the chapter beneath it */
.top {
  position: sticky; top: 0; z-index: 10; height: var(--bar);
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 var(--margin);
  color: var(--ink-light); background: var(--dark);
  transition: color 300ms var(--ease), background-color 300ms var(--ease);
}
.top.on-paper { color: var(--ink); background: var(--paper); }
.ico { width: 1.1em; height: 1.1em; flex: none; }
.lang {
  all: unset; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 600; font-size: 15px; padding: 6px 10px; border-radius: 6px;
  background: rgba(236, 234, 230, .1); transition: background-color 150ms ease-out;
}
.top.on-paper .lang { background: var(--paper-2); }
.flag { width: 21px; height: 14px; border-radius: 2px; flex: none; }
.lang:hover { background: rgba(217, 119, 87, .3); }
.lang:focus-visible { outline: 2px solid var(--claude); outline-offset: 2px; }
.wordmark { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 22px; text-decoration: none; letter-spacing: -.01em; }
.wordmark img { width: 32px; height: 32px; }
.top nav { display: flex; gap: 28px; align-items: center; font-size: 18px; }
.links { display: flex; gap: 28px; align-items: center; }
.menu-btn { all: unset; display: none; cursor: pointer; padding: 8px; margin-right: -8px; border-radius: 7px; }
.menu-btn .ico { width: 26px; height: 26px; }
.menu-btn path { transition: transform 250ms var(--ease), opacity 150ms ease-out; transform-origin: center; }
.menu-btn[aria-expanded="true"] path:first-child { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] path:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] path:last-child { transform: translateY(-6px) rotate(-45deg); }
.menu-btn:focus-visible { outline: 2px solid var(--claude); outline-offset: 2px; }
.top nav a { text-decoration: none; transition: opacity 150ms ease-out; }
.top nav a:not(.btn):hover { opacity: .7; }
.top nav a:not(.btn) { text-decoration: underline 2px transparent; text-underline-offset: 8px; transition: opacity 150ms ease-out, text-decoration-color 200ms ease-out; }
.top nav a[aria-current] { text-decoration-color: var(--claude); }
.btn {
  display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 7px; font-weight: 600; text-decoration: none;
  background: var(--ink-light); color: var(--dark);
  transition: background-color 150ms ease-out, color 150ms ease-out, transform 150ms ease-out;
}
.top.on-paper .btn { background: var(--ink); color: var(--paper); }
.btn:hover { background: var(--claude); color: var(--dark); }
.top.on-paper .btn:hover { background: var(--claude); color: var(--dark); }
.btn:active { transform: translateY(1px); }

/* Hero: two fields, the headline across the seam */
.hero { position: relative; height: calc(100svh - var(--bar)); min-height: 560px; overflow: hidden; }
.hero-icon {
  position: absolute; left: 0; right: 0; margin: 0 auto; z-index: 1;
  top: clamp(16px, 5vh, 56px); width: min(168px, 18vh, 30vw); height: auto;
  animation: rise 900ms var(--ease) both;
}
.field { position: absolute; left: 0; right: 0; }
.field.upper { top: 0; height: 50%; background: var(--dark); }
.field.lower { bottom: 0; height: 50%; background: var(--paper); }
.headline { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 var(--margin); }
.headline h1 {
  font-size: clamp(64px, 11vw, 168px); line-height: .88; letter-spacing: -.045em; font-weight: 800; text-align: center;
}
.headline h1 { position: relative; color: var(--ink-light); padding: .16em 0; }
/* The same words again in the paper ink, shown only below the seam */
.headline h1::after { content: attr(data-copy); white-space: pre-line; position: absolute; inset: 0; padding: inherit; color: var(--ink); background: var(--paper); clip-path: inset(50% 0 0 0); }
.hero .sub {
  position: absolute; left: var(--margin); right: var(--margin); bottom: 56px;
  text-align: center; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; max-width: 40ch; margin: 0 auto;
}
@media (min-width: 1000px) { .hero .sub { max-width: none; white-space: nowrap; } }

/* The window */
.shot { padding: 40px var(--margin) 0; }
.shot-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 40px; }
.shot h2 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.05; letter-spacing: -.03em; font-weight: 700; max-width: 16ch; }
.shot-head p { max-width: 44ch; font-size: 18px; }
.frame { overflow: hidden; border-radius: 12px; background: var(--dark); }
.frame .win { zoom: 1.075; }
@media (max-width: 1400px) { .frame .win { zoom: .95; } }
@media (max-width: 1240px) { .frame .win { zoom: .8; } }
@media (max-width: 1040px) { .frame .win { zoom: .66; } }
@media (max-width: 860px) { .frame .win { zoom: .6; } }
@media (max-width: 520px) { .frame .win { zoom: .42; } .diff, .hometab { zoom: .7; } }

/* Features: the product's own finder, enlarged */
.features { padding: var(--gap) var(--margin) 0; }
.features h2 { font-size: clamp(30px, 3.2vw, 46px); letter-spacing: -.03em; font-weight: 700; margin-bottom: 32px; }
.finder-input {
  width: min(100%, 1100px); display: block; border: 0; border-radius: 0; background: var(--paper-2); color: var(--ink);
  font: 400 clamp(26px, 3vw, 44px)/1.3 var(--font); letter-spacing: -.02em; padding: .3em .55em; margin-bottom: 20px;
}
.finder-input::placeholder { color: #6E6A64; }
.finder-input:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }
.finder { list-style: none; }
.finder li { display: block; }
.finder li + li { border-top: 2px solid var(--paper-2); }
.finder button {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; grid-template-columns: 1fr auto; align-items: baseline;
  padding: .12em .32em; font-size: clamp(34px, 4.6vw, 72px); line-height: 1.1; font-weight: 700; letter-spacing: -.035em;
  transition: background-color 150ms ease-out, color 150ms ease-out;
}
.finder button:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.finder button:hover { background: var(--paper-2); }
.finder .say { display: none; grid-column: 1 / -1; font-size: 18px; line-height: 1.5; font-weight: 400; letter-spacing: 0; max-width: 62ch; padding: 4px 0 14px; }
.finder li.on button { background: var(--lane); color: var(--dark); }
.finder li.on .say { display: block; animation: rise 300ms var(--ease) both; }
.keys { display: inline-flex; gap: 6px; }
.keys kbd { font: 600 .42em/1 var(--font); letter-spacing: 0; background: var(--paper-2); color: var(--ink); width: 1.9em; height: 1.9em; display: inline-grid; place-items: center; border-radius: 6px; }
.finder li.on .keys kbd { background: rgba(23, 22, 21, .14); color: var(--dark); }
.finder .none { font-size: 22px; padding: 12px .32em; }

/* Close-up of the diff */
.closeup { padding: var(--gap) var(--margin) 0; display: grid; grid-template-columns: 4fr 8fr; gap: 32px; align-items: start; }
.closeup h2 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.05; letter-spacing: -.03em; font-weight: 700; }
.closeup .side p { margin-top: 20px; max-width: 34ch; }
.closeup .frame { min-width: 0; }

/* Home tab: picture left, words right */
.home { padding: var(--gap) var(--margin) 0; display: grid; grid-template-columns: 8fr 4fr; gap: 32px; align-items: start; }
.home h2 { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.05; letter-spacing: -.03em; font-weight: 700; }
.home .side p { margin-top: 20px; max-width: 34ch; }
.home .frame { min-width: 0; }

/* Claude: a chapter on the dark field */
.claude { background: var(--dark); color: var(--ink-light); margin-top: var(--gap); padding: 140px var(--margin); }
.claude h2 { font-size: clamp(30px, 3.2vw, 46px); letter-spacing: -.03em; font-weight: 700; display: flex; gap: 14px; align-items: center; }
.claude h2 img { width: .8em; height: .8em; }
.claude .lead { max-width: 52ch; color: var(--text-light); margin-top: 16px; }
.ask-wrap { position: relative; margin-top: 56px; }
.ask {
  display: block; resize: none; overflow: hidden; width: 100%; border: 0; background: transparent; color: var(--ink-light); caret-color: var(--claude);
  font: 700 clamp(40px, 7vw, 120px)/1.3 var(--font); letter-spacing: -.04em; padding: 0;
}
.ask:focus-visible { outline: none; }
.ask-wrap:focus-within::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 3px; background: var(--claude); }
.answer { margin-top: 48px; max-width: 640px; min-height: 230px; zoom: 1.2; }
.answer > * { animation: rise 300ms var(--ease) both; }
.examples { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 40px; }
.examples button {
  all: unset; cursor: pointer; font-size: 18px; color: var(--text-light); padding: 6px 0;
  transition: color 150ms ease-out, transform 150ms ease-out;
}
.examples button:hover, .examples button[aria-pressed="true"] { color: var(--claude); }
.examples button:focus-visible { outline: 2px solid var(--claude); outline-offset: 4px; }
.examples button:active { transform: translateY(1px); }
.claude .note { margin-top: 40px; color: var(--muted-light); font-size: 15px; max-width: 60ch; }
@media (min-width: 1240px) { .claude .note { max-width: none; white-space: nowrap; } }

/* How it works: the progress bar as the diagram */
.how { padding: var(--gap) var(--margin) 0; }
.how h2 { font-size: clamp(34px, 4.6vw, 72px); line-height: .95; letter-spacing: -.045em; font-weight: 800; margin-bottom: 64px; }
.bar { display: flex; gap: 6px; height: 22vh; min-height: 150px; }
.bar > div { flex: var(--grow) 1 0; min-width: 12%; background: var(--c); color: var(--dark); padding: 20px; transform-origin: left center; }
.bar h3 { font-size: 22px; line-height: 1.1; letter-spacing: -.02em; font-weight: 700; display: block; }
.steps { display: flex; gap: 6px; margin-top: 20px; list-style: none; }
.steps li { flex: var(--grow) 1 0; min-width: 12%; font-size: 18px; line-height: 1.45; padding-right: 16px; }
.steps code { font: 600 .95em/1 var(--font); white-space: nowrap; }

/* FAQ */
.faq { padding: var(--gap) var(--margin) 0; }
.faq h2 { font-size: clamp(34px, 4.6vw, 72px); line-height: .95; letter-spacing: -.045em; font-weight: 800; }
.faq .qs { margin: 80px 24px 0 33.3%; display: grid; gap: 12px; }
.faq details { padding: 12px 24px; margin: 0 -24px; transition: background-color 200ms ease-out; }
.faq details[open] { background: var(--paper-2); }
.faq summary { list-style: none; cursor: pointer; font-size: 22px; display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 12px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 12px; height: 12px; flex: none; border: solid currentColor; border-width: 0 2px 2px 0;
  transform: translateY(-3px) rotate(45deg); transition: transform 200ms var(--ease);
}
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq details p { font-size: 18px; padding: 0 0 16px; }

/* Call to action: the whole band is the link */
.cta {
  display: block; position: relative; margin-top: var(--gap); height: 64svh; min-height: 380px; overflow: hidden;
  background: var(--ink); color: var(--paper); text-decoration: none;
  transition: background-color 200ms ease-out, color 200ms ease-out;
}
.cta:hover, .cta:focus-visible { background: var(--paper-2); color: var(--ink); outline: none; }
.cta .what { position: absolute; top: 28px; left: var(--margin); font-size: 22px; max-width: 34ch; line-height: 1.4; }
@media (min-width: 761px) { .cta .what { max-width: none; white-space: nowrap; } }
.cta svg { display: inline-block; vertical-align: -.35em; margin-left: 12px; width: 40px; height: 40px; transition: transform 200ms var(--ease); }
.cta:hover svg { transform: translate(4px, -4px); }
.cta .word {
  position: absolute; left: var(--margin); right: var(--margin); bottom: 24px; text-align: center; line-height: .78;
  font-size: clamp(90px, 21vw, 340px); font-weight: 800; letter-spacing: -.06em;
}

/* Footer: everything set to the right, back to top in the middle */
footer { background: var(--panel); color: var(--ink-light); padding: 0 var(--margin) 32px; text-align: right; }
.bigname { font-size: clamp(120px, 26vw, 420px); font-weight: 800; letter-spacing: -.06em; line-height: .9; padding-top: .12em; }
.foot-row { margin-top: 56px; display: grid; justify-items: end; gap: 20px; }
.made { font-size: 18px; color: var(--text-light); white-space: nowrap; }
.made a { text-underline-offset: 3px; transition: color 150ms ease-out; }
.made a:hover { color: var(--ink-light); }
.legal { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px 24px; margin-top: 96px; font-size: 15px; color: var(--muted-light); }
.legal a { text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.owner { display: inline-flex; gap: 12px; align-items: center; justify-self: end; }
.li { width: 24px; height: 24px; display: block; transition: transform 150ms ease-out; }
.li-link:hover .li { transform: translateY(-2px); }
.legal a:hover { color: var(--ink-light); }

/* Entrances */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .bar[data-reveal] > div { transform: scaleX(.2); transition: transform 900ms var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .bar[data-reveal].is-in > div { transform: none; }
.js .bar[data-reveal] { transform: none; }
.hero .headline { animation: rise 900ms var(--ease) both; }
.hero .sub { animation: rise 900ms 150ms var(--ease) both; }

/* The window settles into place as it scrolls in */
@supports (animation-timeline: view()) {
  .shot .frame .win { animation: settle linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; transform-origin: top center; }
  @keyframes settle { from { transform: scale(.92) translateY(40px); } to { transform: none; } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .js [data-reveal], .js .bar[data-reveal] > div { opacity: 1; transform: none; }
}

/* Phone */
@media (max-width: 760px) {
  body { font-size: 17px; }
  .top nav { gap: 10px; font-size: 16px; }
  .menu-btn { display: block; }
  /* The links and the language switch slide in from the right */
  .links {
    position: fixed; top: var(--bar); right: 0; bottom: 0; width: min(80vw, 320px);
    flex-direction: column; align-items: flex-start; gap: 24px; padding: 40px var(--margin);
    background: var(--dark); color: var(--ink-light); font-size: 32px; font-weight: 700; letter-spacing: -.02em;
    clip-path: inset(0 0 0 100%); visibility: hidden; transition: clip-path 300ms var(--ease), visibility 0s 300ms;
  }
  .links.open { clip-path: inset(0); visibility: visible; transition: clip-path 300ms var(--ease); }
  .links .lang { font-size: 16px; margin-top: 8px; }
  .top.on-paper .links .lang { background: rgba(236, 234, 230, .1); }
  .wordmark span, .wordmark { font-size: 0; gap: 0; }
  .headline h1 { font-size: 15.5vw; }
  .hero .sub { bottom: auto; top: calc(50% + 15.5vw + 32px); font-size: 18px; }
  .hero .nb { display: block; }
  .hero .nw { white-space: nowrap; }
  /* The icon sits just above the headline, whose two lines are about 32vw tall */
  .hero-icon { width: 28vw; top: calc(50% - 16vw - 28vw - 4px); }
  .ask { font-size: 9vw; }
  .hometab { zoom: .5; }
  .shot-head { display: block; } .shot-head p { margin-top: 16px; }
  .finder button { font-size: 8.5vw; }
  .keys { display: none; }
  .closeup, .home { grid-template-columns: 1fr; }
  .home .side { order: -1; }
  .how h2 { font-size: 11vw; }
  .bar { flex-direction: column; height: auto; }
  .bar > div { min-height: 96px; flex: none; transform-origin: top center; }
  .steps { display: none; }
  .bar .m { display: block; font-size: 15px; font-weight: 400; margin-top: 8px; }
  .faq h2 { font-size: 10vw; }
  .faq .qs { margin: 48px 0 0; }
  .faq details { margin: 0 calc(-1 * var(--margin)); padding: 8px var(--margin); }
  .cta { height: auto; min-height: 0; padding: 28px var(--margin) 24px; }
  .cta .what, .cta .word { position: static; display: block; }
  .cta .what { font-size: 17px; max-width: 18ch; }
  .cta .word { margin-top: 40px; }
  .cta svg { width: 28px; height: 28px; }
  .cta .word { font-size: 22vw; }
  .legal { grid-template-columns: 1fr; justify-items: end; }
  .legal > span:empty { display: none; }
  .legal > a { justify-self: center; }
}
@media (min-width: 1041px) { .bar .m { display: none; } }
@media (max-width: 1040px) {
  .home { grid-template-columns: 1fr; } .home .side { order: -1; }
  .bar { flex-direction: column; height: auto; }
  .bar > div { min-height: 96px; flex: none; transform-origin: top center; }
  .steps { display: none; }
  .bar .m { display: block; font-size: 15px; margin-top: 8px; }
}
