/* Home page only. The shared system is in /styles.css.
   Six sections: the top, the trades (marquee and photo tiles), why Trades Websites, the packages, the
   example, and the closing call to action. */

/* ================================================================
   1. Top: headline left, the layered picture of the sample site right
   ================================================================ */

.hero {
  padding-top: calc(var(--header-space) + clamp(40px, 6vw, 88px));
  padding-bottom: clamp(56px, 7vw, 104px);
}
.hero-grid {
  display: grid;
  gap: clamp(48px, 6vw, 72px);
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
}
/* Sized so "Good work deserves" (about 8 times the font size wide in Big Shoulders) fills but never
   overflows its column: one column up to 999px, the left of two from 1000px. On phones the nowrap is
   lifted as a safety net, but the size still keeps the headline to its two lines. */
.hero h1 { margin-bottom: 24px; font-size: min(12vw - 4px, 4.25rem); line-height: 0.98; }
@media (min-width: 1000px) { .hero h1 { font-size: min(5.9vw, 4.75rem); } }
@media (max-width: 560px) { .hero h1 .nowrap { white-space: normal; } }
.hero .lede { max-width: 26em; margin-bottom: 34px; }

/* The one-time-fee line, under the buttons, lined up left */
.hero-fee {
  justify-content: flex-start;
  gap: 10px 24px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.hero-fee .ico { background: var(--white); box-shadow: inset 0 0 0 1px var(--tile-line); }
@media (max-width: 559px) { .hero-fee { flex-direction: column; align-items: flex-start; } }

/* The layered picture: a browser with the computer view, a phone-width card over it, a small label */
.stack {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  aspect-ratio: 100 / 82;
}
.stack-browser {
  position: absolute;
  top: 0;
  right: 0;
  width: 90%;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.stack-browser:hover { transform: translateY(-4px); }
.stack-browser img { display: block; width: 100%; height: auto; }
.stack-phone {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 29%;
  padding: 5px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 0 0 1px rgba(var(--shade), 0.08), var(--shadow-lg);
}
.stack-phone img { display: block; width: 100%; height: auto; border-radius: 19px; }
.stack-label {
  position: absolute;
  right: 3%;
  bottom: 9%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 10px 18px 10px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-lg);
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.3;
}
.stack-label b { display: block; color: var(--ink); font-size: 1rem; }
@media (max-width: 519px) {
  .stack { aspect-ratio: 100 / 86; }
  .stack-phone { padding: 4px; border-radius: 18px; }
  .stack-phone img { border-radius: 14px; }
  .stack-label { right: 0; bottom: 7%; padding: 8px 14px 8px 8px; gap: 10px; border-radius: 14px; }
  .stack-label .tile { width: 34px; height: 34px; border-radius: 10px; }
  .stack-label .tile .ico { width: 20px; height: 20px; }
}
@media (prefers-reduced-motion: reduce) { .stack-browser:hover { transform: none; } }

/* ================================================================
   2. The trades: the marquee strip, then a photo tile for every trade on the dark band.
   41 trades plus the "Don't see yours?" tile make 42: 2, 3 or 6 to a row, every row full.
   (The grid starts short, see below.)
   ================================================================ */

.marquee-band { border-top: 0; border-bottom: 0; }

.trade-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 720px) { .trade-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1100px) { .trade-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; } }

.trade {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--r);
  background: var(--deep-2);
  box-shadow: 0 0 0 1px var(--dark-line);
}
@media (max-width: 719px) { .trade { aspect-ratio: 1 / 1; } }
.trade img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* a faint shade at the top, so the icon badge sits calmly on bright photos */
.trade::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(7, 22, 48, 0.18) 0%, rgba(7, 22, 48, 0) 30%);
}
.trade-ico {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(7, 22, 48, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  color: var(--on-dark);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.trade-ico .ico { width: 20px; height: 20px; }
/* The name sits on its own shade: nearly solid behind the words, fading out just above them, so
   every name is easy to read however long it is and the rest of the photo stays clear */
.trade-name {
  --fade: 40px;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--fade) 14px 12px;
  background: linear-gradient(0deg,
    rgba(7, 22, 48, 0.94) 0%,
    rgba(7, 22, 48, 0.84) calc(100% - var(--fade)),
    rgba(7, 22, 48, 0.45) calc(100% - var(--fade) * 0.5),
    rgba(7, 22, 48, 0) 100%);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: var(--on-dark);
  text-shadow: 0 1px 2px rgba(7, 22, 48, 0.6);
  text-wrap: balance;
}
@media (max-width: 719px) { .trade-name { --fade: 36px; padding: var(--fade) 12px 11px; font-size: 1.125rem; } }

/* The last tile: "Don't see yours? Start a project", the whole tile is the link */
.trade--cta { background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%); box-shadow: none; }
.trade--cta::after { display: none; }
.band--dark .trade--cta a {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: inherit;
  color: var(--on-dark);
  text-align: center;
  text-decoration: none;
}
.trade-cta-q { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; line-height: 1.1; letter-spacing: 0.01em; }
.trade-cta-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.trade-cta-go .ico { width: 18px; height: 18px; transition: transform 0.2s var(--ease-out); }
.band--dark .trade--cta a:hover { color: var(--on-dark); }
.trade--cta a:hover .trade-cta-go { text-decoration: underline var(--red) 2px; text-underline-offset: 0.22em; }
.trade--cta a:hover .ico { transform: translateX(3px); }
.band--dark .trade--cta a:focus-visible { outline: 3px solid var(--on-dark-accent); outline-offset: 3px; }

/* With JavaScript the grid starts short, every row full: 12 trades on phones and tablets (2 or 3 to
   a row), 18 on computers (6 to a row). The "Don't see yours?" tile waits until the button under the
   grid shows every trade. Without JavaScript every tile shows. */
.trade-grid.is-short > .trade--cta { display: none; }
@media (max-width: 1099px) {
  .trade-grid.is-short > .trade:nth-child(n+13):not(.trade--cta) { display: none; }
}
@media (min-width: 1100px) {
  .trade-grid.is-short > .trade:nth-child(n+19):not(.trade--cta) { display: none; }
}
.trades-more { display: flex; justify-content: center; margin-top: 28px; }
.trades-more[hidden] { display: none; }
@media (max-width: 479px) { .trades-more .btn { width: 100%; } }
.trades-more .btn:hover .ico { transform: none; }
.trades-more .ico--down { transition: transform 0.25s var(--ease-out); }
.trades-more [aria-expanded="true"] .ico--down,
.trades-more [aria-expanded="true"]:hover .ico--down { transform: rotate(180deg); }

/* ================================================================
   3. Why Trades Websites: six equal cards, 3 to a row on computers, 2 on tablets, 1 on phones
   (every row full). Plain facts, not links.
   ================================================================ */

.why-grid > .card { display: flex; flex-direction: column; }
.why-grid .card p { margin: 0; }
/* Phones: the icon sits beside the heading, so the six cards stay short */
@media (max-width: 719px) {
  .why-grid { gap: 12px; }
  .why-grid > .card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 16px;
    align-items: start;
    padding: 20px;
  }
  .why-grid > .card > .tile { grid-row: span 2; margin: 0; }
  .why-grid h3 { margin: 2px 0 4px; }
}

/* ================================================================
   4. The packages, short: name, price, who it is for. Centered.
   ================================================================ */

.pkgs--short .pkg { align-items: center; text-align: center; }
.pkgs--short .pkg-price { justify-content: center; margin: 18px 0 16px; }
.pkgs--short .pkg-for { margin: 0; padding: 18px 0 0; border-bottom: 0; border-top: 1px solid var(--dark-line); width: 100%; text-wrap: balance; }
.band--dark .pkgs--short .pkg--pick .pkg-for { border-top-color: var(--line-soft); }
@media (min-width: 1000px) {
  .pkgs--short .pkg--pick { margin-block: -12px; padding-block: calc(clamp(26px, 2.6vw, 36px) + 12px); }
}

/* ================================================================
   5. The example: words left, the whole sample page in a frame right (it scrolls on hover)
   ================================================================ */

.example-copy h2 { margin-bottom: 18px; }
.example-copy .lede { margin-bottom: 30px; }
@media (max-width: 999px) { .example-copy { text-align: center; } }
@media (max-width: 479px) { .example-copy .btn { width: 100%; } }
.showcase { width: 100%; max-width: 600px; justify-self: center; }
.showcase-img {
  display: block;
  width: 100%;
  height: clamp(300px, 36vw, 480px);
  object-fit: cover;
  object-position: 50% 28%;   /* the middle of the sample page (the top is already in the first section) */
}
@media (prefers-reduced-motion: no-preference) {
  .showcase-img { transition: object-position 1.2s var(--ease-out); }
  .showcase:hover .showcase-img,
  .showcase:focus-visible .showcase-img { object-position: 50% 100%; transition: object-position 9s cubic-bezier(0.45, 0, 0.55, 1); }
}

/* ================================================================
   6. Closing call to action: a little less space under it, the footer follows
   ================================================================ */

.band--cta { padding-bottom: clamp(56px, 6vw, 96px); }
