/* CNC Inlay Studio — a Tapawingo Labs project.

   Styled to the Tapawingo Labs brand: the night ground, the teal/amber dawn
   palette, Outfit for everything that is read and JetBrains Mono for anything
   that labels, counts, or names a machine. Section breaks are the horizon
   hairline from tapawingolabs.com rather than flat borders, so the two sites
   read as one house.

   Class names are unchanged from the original markup. */

:root {
  /* Brand tokens, inherited from tapawingolabs.com. */
  --night:      #0B1524;
  --dusk:       #1B2A4A;
  --teal:       #4FD1C5;
  --teal-deep:  #0E8585;
  --amber:      #C47D2E;
  --amber-text: #E4A55C;
  --paper:      #E8EEF2;

  /* Local roles, expressed in brand tokens. */
  --bg:       var(--night);
  --bg-elev:  #0E1A2D;
  --bg-card:  #101D33;
  --border:   var(--dusk);
  --text:     var(--paper);
  --text-dim: rgba(232, 238, 242, .72);
  --accent:   var(--teal);
  --primary:  var(--teal);

  --display: "Outfit", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1120px;

  /* The horizon: a teal hairline that fades out at both ends. Used wherever
     the original had a flat 1px border between sections. */
  --horizon: linear-gradient(
    to right,
    transparent,
    rgba(79, 209, 197, .10) 12%,
    rgba(79, 209, 197, .42) 50%,
    rgba(79, 209, 197, .10) 88%,
    transparent
  );
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 300;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--paper);
  text-decoration: none;
  text-decoration-color: var(--teal-deep);
  text-underline-offset: .2em;
}
a:hover { color: var(--teal); }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- header ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  background: rgba(11, 21, 36, .86);
  backdrop-filter: saturate(180%) blur(12px);
  z-index: 50;
}

/* The header sits on the horizon, the way the wordmark does on the main site. */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--horizon);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 15px;
  padding-bottom: 15px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--paper);
  font-weight: 400;
  font-size: 1.02rem;
  letter-spacing: -.004em;
}
.brand:hover { color: var(--paper); }

.brand-mark {
  display: inline-flex;
  width: 32px;
  height: 32px;
  background: var(--bg-card);
  border: 1px solid rgba(79, 209, 197, .4);
  color: var(--teal);
  border-radius: 7px;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: .08em;
  flex: none;
}

/* Product nav and the house mark share the right-hand end of the header, with
   a hairline between them: the product's own controls, then who makes it. */
.header-right { display: flex; align-items: center; gap: 20px; }

.header-house {
  display: inline-flex;
  align-items: baseline;
  gap: .06em;
  font-size: .95rem;
  line-height: 1;
  text-decoration: none;
  padding-left: 20px;
  border-left: 1px solid var(--dusk);
  --horizon-drop: .158em;
}
.header-house:hover .sitemark-name { color: var(--teal); }

.site-nav { display: flex; align-items: center; gap: 22px; }

.site-nav a {
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
}
.site-nav a:hover { color: var(--teal); }

/* ---- buttons --------------------------------------------------------- */

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 7px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.3;
}

.btn-primary { background: var(--teal); color: var(--night); }
.btn-primary:hover { background: #6FDED4; color: var(--night); }

.btn-secondary {
  background: transparent;
  color: var(--paper);
  border-color: var(--dusk);
}
.btn-secondary:hover { border-color: var(--teal); color: var(--teal); }

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--dusk);
  padding: 9px 15px;
  font-size: 12px;
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

.btn-link {
  background: transparent;
  color: var(--text-dim);
  padding: 8px 0;
  font-size: 12px;
}
.btn-link:hover { color: var(--teal); }

.btn-full { width: 100%; }

.btn-meta {
  display: block;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .1em;
  opacity: .72;
  margin-top: 3px;
}

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

.hero {
  position: relative;
  padding: clamp(3.5rem, 9vh, 5.5rem) 0 clamp(2.5rem, 6vh, 3.5rem);
  isolation: isolate;
  overflow: hidden;
}

/* Dawn light, the same two radials as the main site's load sequence. */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 60%;
  top: 40%;
  width: min(150vw, 1700px);
  height: min(110vh, 950px);
  transform: translate(-50%, -50%);
  background:
    radial-gradient(ellipse 30% 40% at 50% 50%, rgba(196, 125, 46, .16), transparent 70%),
    radial-gradient(ellipse 68% 54% at 50% 50%, rgba(14, 133, 133, .14), transparent 72%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.hero-copy h1 {
  margin: 0 0 1.3rem;
  font-weight: 200;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -.022em;
  text-wrap: balance;
}

.accent { color: var(--teal); }

.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  line-height: 1.68;
  color: var(--text-dim);
  margin: 0 0 1.9rem;
  max-width: 34rem;
  text-wrap: pretty;
}
.lede strong { color: var(--paper); font-weight: 400; }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 1.3rem; }

.hero-meta {
  font-size: .88rem;
  line-height: 1.7;
  color: rgba(232, 238, 242, .58);
  margin: 0;
  max-width: 34rem;
}

.hero-shot img {
  border-radius: 8px;
  border: 1px solid var(--dusk);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}

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

.how h2,
.features h2,
.pricing h2,
.requirements h2,
.faq h2,
.finished h2 {
  margin: 0 0 2.4rem;
  font-weight: 200;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -.018em;
  text-wrap: balance;
}

.finished h2 { margin-bottom: .6rem; }

/* ---- how it works ---------------------------------------------------- */

.how { padding: clamp(3.5rem, 9vh, 5.5rem) 0; }

.how-grid { display: grid; grid-template-columns: 1fr; gap: clamp(2.75rem, 7vh, 4rem); }

.how-step {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  align-items: center;
}
.how-step:nth-child(even) { grid-template-columns: 380px 1fr; }
.how-step:nth-child(even) .how-text { order: 2; }
.how-step:nth-child(even) .how-shot { order: 1; }

.how-text { max-width: 36rem; }

.how-step h3 {
  margin: 0 0 .8rem;
  font-weight: 300;
  font-size: clamp(1.2rem, 2.3vw, 1.5rem);
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: 14px;
}

.how-step p { margin: 0; color: var(--text-dim); line-height: 1.72; }

/* These are genuinely ordered — step 1 has to happen before step 2 — so the
   numbers carry information rather than decoration. */
.how-num {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid rgba(79, 209, 197, .35);
  color: var(--teal);
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  flex: none;
}

.how-shot img { border-radius: 7px; border: 1px solid var(--dusk); width: 100%; }

/* ---- finished -------------------------------------------------------- */

.finished { padding: clamp(2.75rem, 7vh, 3.75rem) 0 1.5rem; }

.finished .section-note {
  color: var(--text-dim);
  max-width: 42rem;
  margin: 0 0 1.75rem;
  line-height: 1.7;
}

.finished-shot {
  border-radius: 8px;
  border: 1px solid var(--dusk);
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ---- features -------------------------------------------------------- */

.features {
  position: relative;
  padding: clamp(3.5rem, 9vh, 5.5rem) 0;
  background: var(--bg-elev);
}

.features::before,
.features::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--horizon);
}
.features::before { top: 0; }
.features::after { bottom: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }

.feature {
  background: var(--bg-card);
  border: 1px solid var(--dusk);
  border-radius: 7px;
  padding: 22px;
  transition: border-color 200ms ease;
}
.feature:hover { border-color: rgba(79, 209, 197, .4); }

.feature h3 {
  margin: 0 0 .5rem;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -.004em;
  color: var(--teal);
}

.feature p { margin: 0; color: var(--text-dim); font-size: .92rem; line-height: 1.65; }

/* ---- free and open source -------------------------------------------- */

.pricing { padding: clamp(3.5rem, 9vh, 5.5rem) 0; }
.pricing-inner { text-align: center; }

.price-card {
  max-width: 380px;
  margin: 0 auto;
  background: var(--bg-elev);
  border: 1px solid var(--dusk);
  border-radius: 10px;
  padding: 30px;
  text-align: left;
}

.price-tag { text-align: center; margin-bottom: 1.5rem; }

.amount {
  font-weight: 200;
  font-size: 3rem;
  color: var(--paper);
  letter-spacing: -.03em;
  line-height: 1;
}

.cadence {
  display: block;
  color: var(--amber-text);
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  margin-top: .6rem;
}

.price-features { list-style: none; padding: 0; margin: 0 0 1.5rem; }

.price-features li {
  padding: 11px 0;
  border-bottom: 1px solid rgba(27, 42, 74, .8);
  color: var(--text-dim);
  font-size: .92rem;
  line-height: 1.6;
}
.price-features li::before { content: "✓"; color: var(--teal); margin-right: 10px; }
.price-features li:last-child { border-bottom: 0; }

.price-card .btn-link { display: block; text-align: center; margin-top: 10px; }

/* ---- requirements ---------------------------------------------------- */

.requirements {
  position: relative;
  padding: clamp(3rem, 8vh, 4.5rem) 0;
  background: var(--bg-elev);
}

.requirements::before,
.requirements::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--horizon);
}
.requirements::before { top: 0; }
.requirements::after { bottom: 0; }

.req-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 15px;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 54rem;
}
.req-list li::before { content: "→"; color: var(--teal); margin-right: 10px; }
.req-list strong { color: var(--paper); font-weight: 500; }

/* ---- faq ------------------------------------------------------------- */

.faq { padding: clamp(3.5rem, 9vh, 5.5rem) 0; }

details {
  background: var(--bg-elev);
  border: 1px solid var(--dusk);
  border-radius: 7px;
  padding: 16px 20px;
  margin-bottom: 10px;
  transition: border-color 200ms ease;
}
details[open] { border-color: rgba(79, 209, 197, .3); }

details summary {
  cursor: pointer;
  font-weight: 400;
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
details summary::-webkit-details-marker { display: none; }

details summary::after {
  content: "+";
  color: var(--teal);
  font-size: 1.3rem;
  font-weight: 300;
  line-height: 1;
  flex: none;
}
details[open] summary::after { content: "−"; }

details p { margin: .85rem 0 0; color: var(--text-dim); line-height: 1.72; }

details code {
  font-family: var(--mono);
  background: var(--night);
  border: 1px solid var(--dusk);
  padding: .1em .4em;
  border-radius: 4px;
  font-size: .85em;
}

/* ---- footer ---------------------------------------------------------- */

.site-footer {
  position: relative;
  padding: clamp(2rem, 5vh, 2.75rem) 0 clamp(2.5rem, 6vh, 3.5rem);
  background: var(--night);
}

.site-footer::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background: var(--horizon);
}

.footer-inner { text-align: center; font-size: .88rem; color: var(--text-dim); }
.footer-inner p { margin: 5px 0; }

/* Ties the product back to the company that makes it: the Tapawingo Labs
   wordmark, at the same ratios the main site uses. The product keeps its own
   name in the header; the house mark signs the page at the bottom. */
.footer-house {
  display: inline-flex;
  align-items: baseline;
  gap: .06em;
  font-size: 1.3rem;
  line-height: 1;
  text-decoration: none;
  --horizon-drop: .158em;
}

.sitemark-mark {
  align-self: baseline;
  position: relative;
  top: var(--horizon-drop);
  width: auto;
  height: 1.526em;
  flex: none;
  overflow: visible;
}

.sitemark-name {
  font-weight: 300;
  letter-spacing: .012em;
  color: rgba(232, 238, 242, .92);
  transition: color 200ms ease;
}

/* Larger share of the lockup than the main site's .27em, for the same reason:
   at footer scale the strict ratio lands near 6px and reads as dots. */
.sitemark-labs {
  font-family: var(--mono);
  font-weight: 500;
  font-size: .36em;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--amber-text);
  margin-left: .55em;
  white-space: nowrap;
}

.footer-house:hover .sitemark-name { color: var(--teal); }

.footer-house-note {
  font-family: var(--mono);
  font-size: .64rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(232, 238, 242, .45);
  margin: .85rem 0 1.4rem !important;
}

.footer-meta { font-size: .78rem; color: rgba(232, 238, 242, .45); }

/* ---- responsive ------------------------------------------------------ */

@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .hero { padding: 2.5rem 0 2rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .how-step,
  .how-step:nth-child(even) { grid-template-columns: 1fr; gap: 1.25rem; }
  .how-step:nth-child(even) .how-text { order: initial; }
  .how-step:nth-child(even) .how-shot { order: initial; }
  .feature-grid { grid-template-columns: 1fr; }
  .site-nav { gap: 14px; }
  .site-nav a:not(.btn) { display: none; }
  /* Narrow headers keep the product's own controls; the house mark is in the
     footer on every page, so it steps aside here rather than wrapping. */
  .header-right { gap: 12px; }
  .header-house { display: none; }
}
