/* Shared styles for the ToyCAD Ideas articles.
   Palette and type follow the main site (index.html):
   orange #d35400, cream #fff7ed, dark #1a1a1a / #2d2d2d. */

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

body {
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  background: #fff;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0 0 16px 0;
  line-height: 1.25;
}

p {
  margin: 0 0 18px 0;
}

.wrap {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.wrap.narrow {
  max-width: 740px;
}

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

/* ---------- Shared header (partials/header.html) ---------- */

.site-head {
  background: #fff7ed;
  border-bottom: 1px solid #f0dfc7;
  padding: 12px 0;
}

.site-logo img {
  max-width: 150px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #3b2c1b;
}

.site-nav a:hover {
  color: #d35400;
}

.site-nav .nav-cta {
  background: #d35400;
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.site-nav .nav-cta:hover {
  color: #fff;
  background: #e2650d;
  transform: translateY(-1px);
}

/* ---------- Shared footer (partials/footer.html) ---------- */

.site-foot {
  background: #1a1a1a;
  color: #fff;
  text-align: center;
  padding: 0 0 48px;
  margin-top: 72px;
}

.foot-cta {
  background: #2d2d2d;
  text-align: left;
  padding: 40px 0;
  margin-bottom: 34px;
}

.foot-cta h2 {
  margin-bottom: 6px;
}

.foot-cta p {
  margin: 0;
}

.store-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.store-buttons img {
  height: 48px;
  width: auto;
}

.footer-links {
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.footer-links a {
  margin: 0 12px;
}

.footer-links a:hover {
  color: #ffb27a;
}

.copyright {
  margin: 0;
  font-size: 0.85rem;
  color: #bdbdbd;
}

/* ---------- Article ---------- */

.article {
  padding-top: 44px;
}

.crumb {
  font-size: 0.9rem;
  color: #8a8a8a;
  margin-bottom: 18px;
}

.crumb a:hover {
  color: #d35400;
}

.article-title {
  font-size: 2.6rem;
  margin-bottom: 14px;
}

.article-standfirst {
  font-size: 1.2rem;
  color: #5b5b5b;
  margin-bottom: 18px;
}

.meta {
  font-size: 0.82rem;
  color: #8a8a8a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 28px;
}

.meta .dot {
  margin: 0 8px;
}

.tag {
  display: inline-block;
  background: #fff7ed;
  border: 1px solid #f0dfc7;
  color: #3b2c1b;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Lead image under the headline */

.article-lead {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 4px 0 8px;
}

/* Body copy */

.prose {
  font-size: 1.08rem;
}

.prose h2 {
  font-size: 1.8rem;
  margin-top: 48px;
}

.prose h3 {
  font-size: 1.28rem;
  margin-top: 34px;
}

.prose ul,
.prose ol {
  margin: 0 0 18px 0;
  padding-left: 24px;
}

.prose li {
  margin-bottom: 8px;
}

.prose a {
  color: #d35400;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: #e2650d;
}

.prose strong {
  color: #222;
}

.prose blockquote {
  margin: 28px 0;
  padding: 4px 0 4px 20px;
  border-left: 4px solid #d35400;
  color: #555;
  font-style: italic;
}

.prose hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 44px 0;
}

/* Figures */

figure {
  margin: 34px 0;
}

figure img,
figure svg,
figure video {
  margin: 0 auto;
  border-radius: 10px;
}

figure video {
  display: block;
  max-width: 100%;
  height: auto;
  background: #f4f4f4;
}

figure img.framed {
  border: 1px solid #eee;
}

/* Tall images (the kid-designing gif is square) should not dominate the page. */
figure img.tall {
  max-height: 560px;
  width: auto;
}

figcaption {
  margin-top: 12px;
  font-size: 0.88rem;
  color: #777;
  text-align: center;
  line-height: 1.5;
}

figcaption a {
  color: #777;
}

/* Comparison table */

.table-scroll {
  overflow-x: auto;
  margin: 28px 0;
  -webkit-overflow-scrolling: touch;
}

.compare {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.compare caption {
  caption-side: top;
  text-align: left;
  font-size: 0.85rem;
  color: #8a8a8a;
  padding-bottom: 10px;
}

.compare th,
.compare td {
  border: 1px solid #eee;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.compare thead th {
  background: #fff7ed;
  color: #3b2c1b;
  font-size: 0.92rem;
}

.compare tbody th {
  background: #fcfcfc;
  font-weight: 600;
  width: 26%;
}

.compare .col-toycad {
  background: #fffaf4;
}

/* Call to action inside an article */

.article-cta {
  margin: 52px 0 8px;
  background: #fff7ed;
  border: 1px solid #f0dfc7;
  border-radius: 12px;
  padding: 30px 32px;
  text-align: center;
}

.article-cta h2 {
  font-size: 1.45rem;
  margin: 0 0 8px;
}

.article-cta p {
  color: #3b2c1b;
  margin-bottom: 20px;
}

.btn {
  display: inline-block;
  background: #d35400;
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

.btn:hover {
  background: #e2650d;
  transform: translateY(-1px);
}

/* ---------- Ideas index ---------- */

.ideas-head {
  padding: 56px 0 8px;
}

.ideas-head h1 {
  font-size: 2.5rem;
}

.ideas-head .lede {
  font-size: 1.15rem;
  color: #5b5b5b;
  max-width: 620px;
}

.card-list {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 32px;
}

.card {
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 40%;
}

.card-body {
  padding: 22px 24px 26px;
}

.card-body .meta {
  margin-bottom: 10px;
}

.card-body h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.card-body h2 a:hover {
  color: #d35400;
}

.card-body p {
  color: #555;
}

.read-more {
  color: #d35400;
  font-weight: 700;
  font-size: 0.95rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  .site-nav {
    gap: 14px;
    font-size: 0.88rem;
  }

  .site-logo img {
    max-width: 118px;
  }

  .article-title {
    font-size: 1.95rem;
  }

  .article-standfirst {
    font-size: 1.08rem;
  }

  .ideas-head h1 {
    font-size: 2rem;
  }

  .prose h2 {
    font-size: 1.5rem;
  }

  .article-cta {
    padding: 24px 20px;
  }
}
