/* gildesys.com
 *
 * One screen, forest-dark. The Pixel Canopy tree is the hero and grows on
 * load: roots draw, the trunk rises, the canopy pops in outward from the
 * trunk, the data spark lights last. Palette and type are the logo's own
 * (../logo/README.md). */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/sora-latin.woff2) format('woff2');
}

:root {
  --night: #0C1C14;
  --night-2: #10231A;
  --panel: #13291E;
  --line: rgba(158, 221, 178, .14);
  --line-hi: rgba(158, 221, 178, .42);
  --ink: #EEF3EC;
  --dim: #9FB5A6;
  --sprout: #9EDDB2;
  --leaf: #4FA872;
  --shade: #2F7A4E;
  --bark: #B07D52;
  --gutter: clamp(16px, 4vw, 56px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60vw 60vw at 78% 38%, rgba(79, 168, 114, .16), transparent 62%),
    radial-gradient(40vw 40vw at 8% 100%, rgba(158, 221, 178, .06), transparent 70%),
    var(--night);
  color: var(--ink);
  font-family: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ── Bar ── */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
}
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 18px; letter-spacing: -.02em; }
.wordmark b { font-weight: 700; }
.wordmark .wm span { font-weight: 300; color: var(--sprout); }
.wordmark svg { width: 26px; height: 26px; }
.lang { display: flex; gap: 4px; font-size: 12px; letter-spacing: .14em; }
.lang a, .lang span {
  padding: 7px 10px; border-radius: 999px; text-decoration: none; color: var(--dim);
}
.lang span { color: var(--night); background: var(--sprout); font-weight: 600; }
.lang a:hover { color: var(--ink); }

/* ── Hero ── */
.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(8px, 2vw, 24px) var(--gutter) clamp(24px, 4vw, 48px);
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}
.eyebrow {
  margin: 0 0 22px;
  font-size: 12px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase;
  color: var(--sprout);
  display: flex; align-items: center; gap: 14px;
}
.eyebrow::before { content: ''; width: 28px; height: 1px; background: currentColor; }
h1 {
  margin: 0;
  font-size: clamp(44px, 7.2vw, 108px);
  font-weight: 300;
  line-height: .98;
  letter-spacing: -.045em;
}
h1 b { font-weight: 700; color: var(--sprout); }
.lede {
  margin: 28px 0 0;
  max-width: 30ch;
  font-size: clamp(17px, 1.5vw, 20px);
  font-weight: 300;
  line-height: 1.55;
  color: var(--dim);
}

.stage { position: relative; display: grid; place-items: center; }
.tree { width: min(100%, 460px); height: auto; overflow: visible; }

/* ── Products ── */
.products {
  list-style: none;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(24px, 3vw, 40px);
  max-width: 1440px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.tile {
  height: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  column-gap: 16px;
  row-gap: 10px;
  padding: 20px 22px 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(19, 41, 30, .92), rgba(16, 35, 26, .92));
  border: 1px solid var(--line);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease;
}
.tile:hover, .tile:focus-visible { border-color: var(--line-hi); transform: translateY(-3px); }
.tile:focus-visible { outline: 2px solid var(--sprout); outline-offset: 3px; }
.tile img { width: 48px; height: 48px; border-radius: 13px; grid-row: 1 / 3; }
.tile-head { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.tile-name { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.tile-domain { font-size: 12px; color: var(--dim); }
.tile-n { font-size: 12px; font-weight: 600; letter-spacing: .14em; color: var(--sprout); align-self: start; }
.tile-line { grid-column: 2 / 4; margin: 0; font-size: 14px; line-height: 1.5; color: var(--dim); }

/* ── Foot ── */
.foot {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter) 24px;
  border-top: 1px solid var(--line);
  font-size: 12px; letter-spacing: .04em; color: var(--dim);
}

/* ── The tree grows ── */
.roots { stroke: var(--leaf); }
.roots path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw .7s ease-out forwards; }
.roots path:nth-child(2) { animation-delay: .15s; }
.roots path:nth-child(3) { animation-delay: .25s; }
.nodes circle { fill: var(--sprout); transform-box: fill-box; transform-origin: center; animation: pop .35s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: .75s; }
.trunk { fill: var(--bark); transform-box: fill-box; transform-origin: 50% 100%; animation: rise .5s cubic-bezier(.2, .9, .3, 1) both; animation-delay: .55s; }
.px { transform-box: fill-box; transform-origin: center; animation: pop .45s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(1s + var(--i) * 45ms); }
.px-s { fill: var(--shade); }
.px-l { fill: var(--leaf); }
.px-p { fill: var(--sprout); }
.spark {
  fill: var(--sprout); transform-box: fill-box; transform-origin: center;
  animation: pop .4s cubic-bezier(.3, 1.6, .5, 1) both 2.4s, glow 3.2s ease-in-out infinite 3s;
}
.hero-copy > * { animation: rise-in .8s cubic-bezier(.2, .8, .2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: .1s; }
.hero-copy > :nth-child(3) { animation-delay: .2s; }
.products li { animation: rise-in .8s cubic-bezier(.2, .8, .2, 1) both; }
.products li:nth-child(1) { animation-delay: .5s; }
.products li:nth-child(2) { animation-delay: .6s; }
.products li:nth-child(3) { animation-delay: .7s; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes glow { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .roots path { stroke-dashoffset: 0; }
}

/* ── Narrow ── */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .stage { order: -1; }
  .tree { width: min(62vw, 300px); }
  .products { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .bar { padding-top: 16px; padding-bottom: 8px; }
  .eyebrow { margin-bottom: 16px; }
  .lede { margin-top: 18px; }
  .tile { padding: 16px; column-gap: 14px; }
  .tile img { width: 42px; height: 42px; border-radius: 11px; }
  .foot { flex-direction: column; gap: 6px; }
}
