/* GitLoom landing page
   Palette: natural dyes on undyed cotton. Indigo ink, woad blue, saffron, madder red, weld green. */
:root {
  --cotton: #f3f4f6; --ink: #191c3a; --mut: #5d6180; --line: #dcdfe8; --card: #ffffff;
  --woad: #3b5bdb; --saffron: #e3a72f; --madder: #c8323c; --weld: #5c8a3a;
  --fd: "Bricolage Grotesque", system-ui, sans-serif; --fb: "Geist", system-ui, sans-serif; --fm: "Geist Mono", ui-monospace, monospace;
  --gut: max(20px, 5vw); --maxw: 1240px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body { background: var(--cotton); color: var(--ink); font-family: var(--fb); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--woad); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--saffron); color: var(--ink); }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
code { font-family: var(--fm); font-size: .88em; background: rgba(25, 28, 58, .06); border-radius: 5px; padding: 1px 5px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 32px; padding: 16px var(--gut); transition: background .3s, box-shadow .3s; }
.nav.stuck { background: rgba(243, 244, 246, .82); backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5); box-shadow: 0 1px 0 var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--fd); font-weight: 700; font-size: 20px; letter-spacing: -.02em; text-decoration: none; }
.logo svg { width: 30px; height: 30px; stroke: none; }
.logo rect { fill: var(--ink); }
.logo .w { stroke: var(--cotton); stroke-width: 2.5; }
.logo .f { stroke: var(--saffron); stroke-width: 2.5; }
.nav nav { display: flex; gap: 28px; margin-left: auto; }
.nav nav a { font-size: 14.5px; color: var(--mut); text-decoration: none; transition: color .2s; }
.nav nav a:hover { color: var(--ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 24px; border-radius: 12px; font-weight: 600; font-size: 15.5px; text-decoration: none; white-space: nowrap; transition: transform .15s, background .2s, box-shadow .2s; }
.btn:active { transform: scale(.98); }
.btn.sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: 10px; }
.btn.ink { background: var(--ink); color: #fff; }
.btn.ink:hover { background: #2a2e57; box-shadow: 0 10px 24px -12px var(--ink); }
.btn.saffron { background: var(--saffron); color: var(--ink); }
.btn.saffron:hover { background: #efb645; }

/* Hero */
.hero { position: relative; min-height: calc(100vh - 72px); max-height: 940px; display: flex; align-items: center; padding: 6vh var(--gut) 10vh; overflow: hidden; }
#loom { position: absolute; top: 0; right: 0; width: 58%; height: 100%; -webkit-mask-image: linear-gradient(transparent, #000 18%); mask-image: linear-gradient(transparent, #000 18%); }
.hero::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 70%; pointer-events: none; background: linear-gradient(90deg, var(--cotton) 0%, rgba(243, 244, 246, .85) 22%, rgba(243, 244, 246, 0) 52%); }
.hero-copy { position: relative; z-index: 2; max-width: 640px; }
.hero h1 { font-family: var(--fd); font-weight: 800; font-size: clamp(48px, 7.4vw, 104px); line-height: .95; letter-spacing: -.045em; font-variation-settings: "opsz" 96; text-wrap: balance; }
.lede { font-size: clamp(17px, 1.5vw, 19px); color: var(--mut); max-width: 33em; margin-top: 28px; line-height: 1.6; }
.weave { display: flex; gap: 8px; margin-top: 36px; padding: 6px; background: var(--card); border: 1.5px solid var(--ink); border-radius: 16px; box-shadow: 0 18px 40px -24px rgba(25, 28, 58, .5); max-width: 560px; }
.weave:focus-within { box-shadow: 0 0 0 4px rgba(59, 91, 219, .18), 0 18px 40px -24px rgba(25, 28, 58, .5); }
.weave-field { flex: 1; display: flex; align-items: center; min-width: 0; padding-left: 14px; font-family: var(--fm); font-size: 15.5px; cursor: text; }
.pre { color: var(--mut); }
.weave-field input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font: inherit; color: var(--ink); padding: 12px 2px; }
.weave-field input::placeholder { color: #a5a9c0; }
.fine { font-size: 14px; color: var(--mut); margin-top: 16px; }
.fine a { color: var(--ink); text-decoration-color: var(--saffron); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.hero-copy > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .1s; } .hero-copy > :nth-child(3) { animation-delay: .2s; } .hero-copy > :nth-child(4) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
.weave.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }

/* Strip */
.strip { display: grid; grid-template-columns: repeat(4, 1fr); max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
.strip p { padding: 22px 0; border-top: 1.5px solid var(--ink); font-size: 15px; color: var(--mut); }
.strip p + p { padding-left: 22px; border-left: 1px solid var(--line); }
.strip b { font-family: var(--fd); font-weight: 700; font-size: 40px; color: var(--ink); letter-spacing: -.03em; margin-right: 8px; vertical-align: -4px; }

/* Section heads */
.sec-head { max-width: var(--maxw); margin: 0 auto 44px; padding: 0 var(--gut); display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 5vw; align-items: end; }
.sec-head h2 { font-family: var(--fd); font-weight: 700; font-size: clamp(34px, 4.4vw, 60px); line-height: 1; letter-spacing: -.035em; text-wrap: balance; }
.sec-head p { color: var(--mut); font-size: 17px; max-width: 30em; }
.sec-head:not(:has(p)) { grid-template-columns: 1fr; }
.sec-head:not(:has(p)) h2 { max-width: 20ch; }

/* Templates gallery */
.templates { padding: 16vh 0 0; }
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: min(560px, 82vw); gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; --edge: max(var(--gut), calc((100vw - var(--maxw)) / 2 + var(--gut))); scroll-padding: 0 var(--edge); padding: 6px var(--edge) 28px; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.shot { scroll-snap-align: start; display: block; text-decoration: none; }
.shot-frame { position: relative; aspect-ratio: 16 / 10.5; border-radius: 16px; overflow: hidden; background: var(--card); box-shadow: 0 0 0 1px rgba(25, 28, 58, .1), 0 30px 60px -30px rgba(25, 28, 58, .45); transition: transform .4s cubic-bezier(.2, .7, .2, 1), box-shadow .3s; }
.shot:hover .shot-frame { transform: translateY(-6px); box-shadow: 0 0 0 1.5px var(--ink), 0 40px 70px -30px rgba(25, 28, 58, .55); }
.shot-frame iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 945px; border: 0; transform-origin: 0 0; pointer-events: none; background: #fff; }
.shot-frame .ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mut); font-size: 13px; background: repeating-linear-gradient(90deg, #eceef3 0 2px, transparent 2px 18px), var(--card); }
.shot-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 4px 0; }
.shot-meta h3 { font-family: var(--fd); font-weight: 700; font-size: 22px; letter-spacing: -.02em; }
.shot-meta p { color: var(--mut); font-size: 14px; }
.shot-meta .use { font-size: 14px; font-weight: 600; color: var(--woad); opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s; white-space: nowrap; }
.shot:hover .use, .shot:focus-visible .use { opacity: 1; transform: none; }
.gallery-nav { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); display: flex; gap: 8px; justify-content: flex-end; }
.round { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; transition: background .2s, color .2s; }
.round svg { width: 20px; height: 20px; }
.round:hover { background: var(--ink); color: #fff; }

/* Features */
.features { padding: 16vh 0 0; }
.feat-grid { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1.5px solid var(--ink); }
.feat { padding: 34px 40px 40px 0; border-bottom: 1px solid var(--line); }
.feat:nth-child(even) { padding: 34px 0 40px 40px; border-left: 1px solid var(--line); }
.feat h3 { font-family: var(--fd); font-weight: 700; font-size: 26px; letter-spacing: -.02em; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.feat h3::before { content: ""; width: 26px; height: 10px; border-radius: 99px; background: var(--c, var(--woad)); }
.feat:nth-child(2) h3::before { --c: var(--saffron); }
.feat:nth-child(3) h3::before { --c: var(--madder); }
.feat:nth-child(4) h3::before { --c: var(--weld); }
.feat ul { list-style: none; display: grid; gap: 12px; }
.feat li { color: var(--mut); font-size: 16px; padding-left: 18px; position: relative; }
.feat li::before { content: ""; position: absolute; left: 0; top: .75em; width: 8px; height: 1.5px; background: var(--ink); }
.feat b { color: var(--ink); font-weight: 600; }

/* Steps */
.steps { padding: 16vh 0 0; }
.steps ol { list-style: none; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.steps li { position: relative; padding: 30px; background: var(--card); border-radius: 18px; box-shadow: 0 0 0 1px var(--line); }
.steps li + li::before { content: ""; position: absolute; left: -22px; top: 52px; width: 22px; border-top: 2px dashed #b9bdd0; }
.steps .n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--fd); font-weight: 700; font-size: 18px; margin-bottom: 22px; }
.steps li:nth-child(2) .n { background: var(--woad); }
.steps li:nth-child(3) .n { background: var(--saffron); color: var(--ink); }
.steps h3 { font-family: var(--fd); font-weight: 700; font-size: 22px; letter-spacing: -.02em; margin-bottom: 8px; }
.steps p { color: var(--mut); }

/* FAQ */
.faq { padding: 16vh 0 0; }
.qs { max-width: 860px; margin: 0 auto; padding: 0 var(--gut); }
.faq .sec-head { max-width: 860px; grid-template-columns: 1fr; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font-family: var(--fd); font-weight: 500; font-size: 21px; letter-spacing: -.01em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 14px; height: 14px; background: linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat, linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat; transition: transform .25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--mut); padding: 0 40px 24px 0; max-width: 46em; }

/* Closer */
.closer { padding: 16vh var(--gut) 0; }
.closer-in { position: relative; max-width: var(--maxw); margin: 0 auto; border-radius: 28px; padding: clamp(40px, 7vw, 96px); background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.closer-in::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .55;
  background:
    repeating-linear-gradient(90deg, rgba(243, 244, 246, .09) 0 6px, transparent 6px 22px),
    repeating-linear-gradient(0deg, transparent 0 16px, rgba(59, 91, 219, .5) 16px 22px, transparent 22px 44px, rgba(227, 167, 47, .35) 44px 50px, transparent 50px 66px);
  mask-image: linear-gradient(110deg, transparent 30%, #000 85%); }
.closer h2 { font-family: var(--fd); font-weight: 800; font-size: clamp(44px, 7vw, 96px); letter-spacing: -.045em; line-height: 1; }
.weave.light { border-color: transparent; background: #fff; color: var(--ink); }

.foot { max-width: var(--maxw); margin: 0 auto; padding: 60px var(--gut) 50px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--mut); font-size: 14px; }
.foot a { color: var(--ink); }

/* Responsive */
@media (max-width: 960px) {
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
  #loom { width: 100%; opacity: .35; }
  .hero::after { width: 100%; background: linear-gradient(180deg, rgba(243, 244, 246, .3), var(--cotton) 85%); }
  .hero { min-height: auto; padding-top: 10vh; }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip p:nth-child(3) { padding-left: 0; border-left: 0; }
  .sec-head { grid-template-columns: 1fr; gap: 14px; }
  .feat-grid { grid-template-columns: 1fr; }
  .feat, .feat:nth-child(even) { padding: 30px 0; border-left: 0; }
  .steps ol { grid-template-columns: 1fr; }
  .steps li + li::before { left: 52px; top: -22px; width: 0; height: 22px; border-top: 0; border-left: 2px dashed #b9bdd0; }
}
@media (max-width: 560px) {
  .weave { flex-direction: column; }
  .weave .btn { width: 100%; }
  .strip b { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
