/* ==========================================================================
   appmaster.dev landing page
   Fonts: Space Grotesk (500, 700) + JetBrains Mono (500) from Google Fonts
   Palette: ink #0A0A0A · paper #FFFFFF · mist #F3F3F3 · teal #2DD4BF · deep teal #0F766E
   ========================================================================== */

:root {
  --ink: #0A0A0A;
  --paper: #FFFFFF;
  --mist: #F3F3F3;
  --muted: #5C5C5C;
  --line: #E4E4E4;
  --line-dark: #3A3A3A;
  --soft-on-dark: #D4D4D4;
  --meta-on-dark: #BDBDBD;
  --teal: #2DD4BF;
  --teal-deep: #0F766E;

  --font-sans: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
}

a:focus-visible {
  outline: 3px solid var(--teal-deep);
  outline-offset: 3px;
}

.page {
  background: var(--paper);
  color: var(--ink);
  min-width: 0;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ---------- Shared type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.display {
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin: 0;
}

.h2 {
  font-size: clamp(40px, 6vw, 88px);
  margin-top: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 30px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.btn--dark  { background: var(--ink);   color: var(--paper); border-color: var(--ink); }
.btn--light { background: var(--paper); color: var(--ink);   border-color: var(--ink); }
.btn--teal  { background: var(--teal);  color: var(--ink);   border-color: var(--teal); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Pills / badges ---------- */
.pill {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  border-radius: 999px;
}

/* ---------- Arrow icon button ---------- */
.arrow {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
}
.arrow--teal { background: var(--teal); color: var(--ink); }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav-wrap { padding-top: 20px; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  background: var(--paper);
  border-radius: 999px;
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.10);
  padding: 10px 12px 10px 24px;
}

.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav__logo svg { height: 38px; width: auto; }

.nav__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.nav__cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-top: 72px;
  padding-bottom: 40px;
}

.hero__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  align-items: center;
}

.hero__copy { flex: 1 1 520px; min-width: 0; }

.hero__title {
  font-size: clamp(52px, 7.4vw, 108px);
  margin-top: 20px;
  color: var(--ink);
}

.hero__lead {
  font-size: 20px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 520px;
  margin: 28px 0 0;
}

.hero__copy .btn-row { margin-top: 36px; }

.hero__stack {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  color: var(--muted);
  margin-top: 22px;
}

/* Hero app showcase: three landscape cards, each showing the full preview banner */
.showcase {
  flex: 1 1 440px;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.app--wide { grid-column: 1 / -1; }

.app {
  min-width: 0;
  padding: 10px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
}
.app--live { background: var(--ink);  color: var(--paper); }
.app--soon { background: var(--mist); color: var(--ink); }
.app--teal { background: var(--teal); color: var(--ink); }

/* The preview banner (590x300), never cropped. Hidden automatically if the file is missing. */
.app__shot {
  display: block;
  aspect-ratio: 590 / 300;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.14);
}
.app__shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.app__body { padding: 16px 12px 12px; }

.app__badge {
  display: inline-block;
  font-size: 11px;
  padding: 6px 10px;
}
.app--live .app__badge { background: var(--teal);  color: var(--ink); }
.app--soon .app__badge { background: var(--paper); color: var(--ink); }
.app--teal .app__badge { background: var(--ink);   color: var(--paper); }

.app__name {
  font-size: 26px;
  margin-top: 12px;
}
.app--wide .app__name { font-size: 34px; }

.app__desc {
  font-size: 15px;
  line-height: 1.35;
  margin: 8px 0 0;
  opacity: 0.9;
}

/* Stats */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 72px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.stat { flex: 1 1 180px; }
.stat__num { font-size: 48px; }
.stat__label {
  font-size: 15px;
  color: var(--muted);
  margin-top: 8px;
}

/* ==========================================================================
   How it works
   ========================================================================== */
.how { background: var(--mist); }
.how .container { padding-top: 96px; padding-bottom: 96px; }

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 56px;
}

.step {
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.step__num {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
}

.step__title {
  font-size: 26px;
  letter-spacing: -0.03em;
}

.step__text {
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
  margin: 10px 0 0;
}

/* ==========================================================================
   Source code (CodeCanyon)
   ========================================================================== */
.products {
  padding-top: 112px;
  padding-bottom: 112px;
}

.products__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 56px;
  align-items: stretch;
}

.featured {
  flex: 1.3 1 520px;
  min-width: 0;
  border-radius: 32px;
  background: var(--ink);
  color: var(--paper);
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.featured__body { padding: 28px 28px 28px; }

.featured__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.featured__badge {
  font-size: 12px;
  padding: 7px 12px;
  background: var(--teal);
  color: var(--ink);
}

.featured__price {
  font-size: 44px;
  color: var(--teal);
}

.featured__name {
  font-size: clamp(34px, 4.4vw, 52px);
  margin-top: 20px;
}

.featured__desc {
  font-size: 17px;
  line-height: 1.5;
  max-width: 520px;
  margin: 16px 0 0;
  color: var(--soft-on-dark);
}

.featured__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.featured__meta li {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.02em;
  padding: 7px 12px;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  color: var(--soft-on-dark);
}

.featured__cta { margin-top: 28px; }

/* Workshop list */
.workshop {
  flex: 1 1 380px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.workshop__list { margin-top: 8px; }

.workshop__item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.workshop__name {
  font-size: 26px;
  letter-spacing: -0.03em;
}

.workshop__sub {
  font-size: 15px;
  color: var(--muted);
  margin-top: 6px;
}

.workshop__badge {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  padding: 6px 11px;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}

.workshop__cta { margin-top: 28px; }

/* ==========================================================================
   Hire me (Fiverr)
   ========================================================================== */
.hire {
  padding-top: 24px;
  padding-bottom: 112px;
}

.hire__head {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
}

/* Rating card */
.hire__rating {
  flex: 0 1 400px;
  min-width: 0;
  padding: 24px 28px;
  border-radius: 28px;
  background: var(--mist);
}
.rating__top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rating__score { font-size: 56px; }
.rating__stars { display: flex; gap: 3px; color: var(--teal-deep); }
.rating__stars svg { width: 22px; height: 22px; }
.rating__sub { font-size: 15px; color: var(--muted); margin-top: 8px; }
.rating__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.rating__chips li {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
}

/* Gig grid: 3 columns; the "Custom project" card spans two so the last row is full */
.gigs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 56px;
}

.gig {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-radius: 28px;
  background: var(--mist);
  padding: 12px;
  text-decoration: none;
  color: var(--ink);
}

/* Cover: shows images/gig-*.jpg when present, otherwise a themed icon panel */
.gig__cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1280 / 769;   /* same ratio as the gig cover images, so nothing is cropped */
  border-radius: 20px;
  overflow: hidden;
}
.gig__cover::before,
.gig__cover::after {          /* quiet decorative rings */
  content: "";
  position: absolute;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  opacity: 0.14;
}
.gig__cover::before { width: 70%; aspect-ratio: 1; top: -38%; right: -12%; }
.gig__cover::after  { width: 46%; aspect-ratio: 1; bottom: -30%; left: -8%; }
.gig__cover svg {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  stroke-width: 1.6;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gig__cover img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.gig__cover--dark  { background: var(--ink);       color: var(--teal); }
.gig__cover--teal  { background: var(--teal);      color: var(--ink); }
.gig__cover--light { background: var(--paper);     color: var(--teal-deep); }
.gig__cover--deep  { background: var(--teal-deep); color: var(--paper); }

.gig__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px 14px 10px;
}

.gig__tag {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--teal-deep);
}

.gig__title {
  font-size: 28px;
  letter-spacing: -0.035em;
  margin-top: 10px;
}

.gig__text {
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
  margin: 12px 0 0;
}

.gig__foot {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gig__price {
  font-size: 16px;
  font-weight: 700;
}

/* "Custom project" dark card (no cover) */
.gig--custom {
  grid-column: span 2;
  justify-content: space-between;
  gap: 32px;
  padding: 36px;
  background: var(--ink);
  color: var(--paper);
}
.gig--custom { position: relative; overflow: hidden; }
.gig--custom > * { position: relative; z-index: 1; }
.gig--custom::before,
.gig--custom::after {         /* concentric teal rings on the right */
  content: "";
  position: absolute;
  top: 50%;
  right: -140px;
  border: 1.5px solid var(--teal);
  border-radius: 50%;
  transform: translateY(-50%);
}
.gig--custom::before { width: 460px; height: 460px; opacity: 0.28; }
.gig--custom::after  { width: 300px; height: 300px; right: -60px; opacity: 0.5; }
.gig--custom .gig__tag   { color: var(--teal); }
.gig--custom .gig__title { font-size: clamp(36px, 4vw, 56px); }
.gig--custom .gig__text  { color: var(--soft-on-dark); max-width: 440px; font-size: 17px; }

@media (max-width: 1000px) {
  .gigs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gig--custom { grid-column: auto; }
}
@media (max-width: 640px) {
  .gigs { grid-template-columns: 1fr; }
  .hire__rating { flex-basis: 100%; }
  .gig--custom { padding: 28px 24px; }
  .gig--custom::before, .gig--custom::after { display: none; }   /* rings would cross the text */
}

/* ==========================================================================
   Fiverr picks (affiliate)
   ========================================================================== */
.deals {
  background: var(--ink);
  color: var(--paper);
}
.deals .container { padding-top: 112px; padding-bottom: 112px; }

.deals .eyebrow { color: var(--teal); }

.deals__lead {
  font-size: 19px;
  line-height: 1.5;
  color: var(--soft-on-dark);
  max-width: 560px;
  margin: 28px 0 0;
}

.deals__list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 48px;
  margin-top: 48px;
  border-top: 1px solid var(--line-dark);
}

.deal {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-dark);
  text-decoration: none;
  color: var(--paper);
}

.deal__cat {
  font-size: 34px;
  letter-spacing: -0.035em;
}

.deal__sub {
  font-size: 16px;
  color: var(--paper);
  margin-top: 8px;
}

.deal__meta {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--meta-on-dark);
  margin-top: 6px;
}

/* ==========================================================================
   Final CTA
   ========================================================================== */
.cta { padding-top: 112px; padding-bottom: 112px; }

.cta__box {
  border-radius: 40px;
  background: var(--teal);
  padding: 64px 40px;
  text-align: center;
}

.cta__title {
  font-size: clamp(40px, 7vw, 104px);
  color: var(--ink);
}

.cta__text {
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
  max-width: 520px;
  margin: 24px auto 0;
}

.cta__box .btn-row {
  justify-content: center;
  margin-top: 36px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--ink);
  color: var(--paper);
}
.footer .container { padding-top: 56px; padding-bottom: 48px; }

.footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  align-items: center;
}

.footer__logo { display: flex; text-decoration: none; }
.footer__logo svg { height: 44px; width: auto; }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}
.footer__links a {
  font-size: 15px;
  color: var(--soft-on-dark);
  text-decoration: none;
}

.footer__copy {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--meta-on-dark);
  margin-top: 40px;
  line-height: 1.6;
}

/* ==========================================================================
   Thumbnails
   Real images go in images/<name>.jpg. If a file is missing the <img> removes
   itself and the icon tile underneath stays visible.
   ========================================================================== */
.thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
  background: var(--paper);
  color: var(--teal-deep);
}
.thumb svg { width: 46%; height: 46%; }
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.thumb--dark { background: #1F1F1F; color: var(--teal); }

/* Landscape thumbnails: same 590:300 ratio as the preview banners, so nothing is cropped */
.thumb--banner { width: 100%; aspect-ratio: 590 / 300; border-radius: 22px; }
.thumb--wide   { width: 148px; aspect-ratio: 590 / 300; border-radius: 14px; background: var(--mist); color: var(--ink); }
.thumb--banner svg { width: 56px; height: 56px; }
.thumb--wide svg   { width: 26px; height: 26px; }

.workshop__info { flex: 1; min-width: 0; }

/* ==========================================================================
   Hover & motion
   ========================================================================== */
.btn, .nav__cta, .nav__link, .app, .featured, .gig, .gig__price, .arrow, .deal,
.deal__cat, .workshop__item, .workshop__name, .workshop__badge, .footer__links a {
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1),
              background-color 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, box-shadow 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  /* Nav */
  .nav__link:hover { color: var(--teal-deep); }
  .nav__cta:hover  { background: var(--teal-deep); transform: translateY(-1px); }

  /* Buttons */
  .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16); }
  .btn--dark:hover  { background: var(--teal-deep); border-color: var(--teal-deep); }
  .btn--light:hover { background: var(--ink); color: var(--paper); }
  .btn--teal:hover  { background: #5EEAD4; border-color: #5EEAD4; }
  .btn:active { transform: translateY(0); box-shadow: none; }

  /* Hero app cards */
  .app:hover { transform: translateY(-6px); box-shadow: 0 22px 44px rgba(0, 0, 0, 0.16); }
  .app:hover .app__shot img { transform: scale(1.04); }

  /* Featured product */
  .featured:hover { transform: translateY(-4px); box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22); }
  .featured:hover .thumb img { transform: scale(1.06); }

  /* Workshop rows */
  .workshop__item:hover .workshop__name { transform: translateX(6px); }
  .workshop__item:hover .workshop__badge { background: var(--ink); color: var(--paper); }
  .workshop__item:hover .thumb img { transform: scale(1.08); }

  /* Fiverr gig cards */
  a.gig:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12); }
  a.gig:hover .gig__cover img { transform: scale(1.06); }
  a.gig:hover .gig__cover svg { transform: scale(1.12) rotate(-4deg); }
  a.gig:hover .arrow { background: var(--teal-deep); transform: translateX(4px); }

  /* Fiverr picks rows */
  .deal:hover .deal__cat { color: var(--teal); }
  .deal:hover .arrow { background: var(--paper); transform: translateX(4px) rotate(-45deg); }

  /* Footer */
  .footer__links a:hover { color: var(--teal); }
}

/* Keyboard users get the same feedback as hover */
a.gig:focus-visible .arrow  { background: var(--teal-deep); }
.deal:focus-visible .arrow { background: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .btn:hover, .app:hover, .featured:hover, .gig:hover { transform: none !important; }
}

/* ==========================================================================
   Smooth scrolling + reveal on scroll
   ========================================================================== */
html {
  scroll-behavior: smooth;   /* nav / logo / button anchors glide up and down */
  scroll-padding-top: 24px;
}

/* .js is set by the inline script at the bottom of the page, so content is
   never hidden when scripts are blocked. `translate` is used instead of
   `transform` so it never clashes with the hover transforms above. */
.js .reveal {
  opacity: 0;
  translate: 0 32px;
  transition: opacity 0.8s ease var(--d, 0ms),
              translate 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms);
}
.js .reveal.is-in {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; translate: none; }
}

/* Phones: stack the three cards, each full width */
@media (max-width: 560px) {
  .showcase { grid-template-columns: 1fr; }
  .app--wide .app__name, .app__name { font-size: 28px; }
}

@media (max-width: 480px) {
  .thumb--wide { width: 96px; border-radius: 10px; }
  .workshop__name { font-size: 22px; }
  .featured__body { padding: 24px 16px 20px; }
  .featured__price { font-size: 36px; }
}
