/* =========================================================
   WEB DESIGN PAGE (only used by web-design.html)
   ========================================================= */

.section-sub {
  max-width: 640px;
  margin: -16px auto 36px;
  font-size: 17px;
}

/* ---------- 1. Hero: animation on the left, a few words on the right ---------- */

.wd-hero {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 50px 40px 40px;
  text-align: left;
}

.wd-hero h1 {
  font-size: 46px;
  line-height: 1.15;
  margin: 12px 0 14px;
}

.wd-lead {
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 26px;
}

.wd-hero-text .btn {
  margin-top: 0;
}

/* Hero buttons: "See pricing" + "Talk to us" side by side */
.wd-hero-buttons {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 18px;
}

.wd-hero-buttons .btn,
.wd-hero-buttons .btn-outline {
  margin: 0;
}

/* The small promise under the buttons, removes the fear of clicking */
.wd-reassure {
  margin: 0 0 10px;
  font-size: 14px;
  opacity: 0.75;
}

/* The small "check your website" link under the buttons */
.wd-check-link {
  font-size: 15px;
  color: inherit;
  opacity: 0.8;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.wd-check-link:hover,
.wd-check-link:focus-visible {
  opacity: 1;
}

/* Leave space for the top menu when a button jumps to a section */
#pricing,
#audit {
  scroll-margin-top: 90px;
}

/* The code window sits behind, the website overlaps it in front */
.wd-demo {
  position: relative;
  height: 470px;
}

.editor,
.mini-browser {
  position: absolute;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
}

.editor {
  top: 0;
  left: 0;
  width: 66%;
  height: 360px;
  z-index: 1;
}

.mini-browser {
  right: 0;
  bottom: 0;
  width: 60%;
  height: 330px;
  z-index: 2;
}

.editor {
  background: #12121a;
  border: 1px solid #2a2a35;
}

.editor-bar,
.mini-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  flex-shrink: 0;
}

.editor-bar {
  background: #1b1b25;
}

.editor-bar span,
.mini-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a3a48;
}

.editor-bar em,
.mini-bar em {
  margin-left: 10px;
  font-style: normal;
  font-size: 12px;
  color: #8a8a9a;
}

.editor-code {
  flex: 1;
  margin: 0;
  padding: 18px 20px;
  overflow-y: auto;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13.5px;
  line-height: 1.75;
  color: #e8e8f0;
  white-space: pre-wrap;
}

.editor-code .t-tag { color: #a29bfe; }
.editor-code .t-css { color: #00d2ff; }
.editor-code .t-note { color: #6b6b7b; }

.editor-code .cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  margin-left: 1px;
  vertical-align: -2px;
  background: #00d2ff;
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ---------- The mini website ---------- */

.mini-browser {
  background: #ffffff;
}

.mini-bar {
  background: #ececf1;
}

.mini-bar em {
  color: #777777;
}

/* BEFORE any CSS: plain, old-fashioned browser defaults */
.mini-page {
  position: relative;
  flex: 1;
  padding: 14px 18px;
  font-family: 'Times New Roman', serif;
  color: #000000;
}

.m-nav,
.m-h1,
.m-p,
.m-btn,
.m-card,
.m-badge {
  opacity: 0;
  transition: opacity 0.4s, color 0.6s, background 0.6s, padding 0.6s, font-size 0.6s, box-shadow 0.6s, border-radius 0.6s;
}

.m-nav {
  display: block;
  font-size: 15px;
  margin-bottom: 10px;
}

.m-hero {
  transition: background 0.8s, padding 0.6s, border-radius 0.6s;
}

.m-h1 {
  display: block;
  font-size: 20px;
  font-weight: 700;
}

.m-p {
  display: block;
  font-size: 13px;
  margin: 4px 0;
}

.m-btn {
  display: inline-block;
  font-size: 13px;
  color: #0000ee;
  text-decoration: underline;
}

.m-menu {
  margin-top: 10px;
}

.m-card {
  display: block;
  font-size: 13px;
}

.m-badge {
  position: absolute;
  right: 14px;
  bottom: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: #6c5ce7;
  background: #f1efff;
  padding: 5px 10px;
  border-radius: 99px;
}

/* Each line of HTML makes one part appear */
.show-nav .m-nav,
.show-h1 .m-h1,
.show-p .m-p,
.show-btn .m-btn,
.show-menu .m-card,
.done .m-badge {
  opacity: 1;
}

/* Each line of CSS makes it more beautiful */
.css-font .mini-page {
  font-family: 'Poppins', sans-serif;
}

.css-font .m-nav {
  font-weight: 800;
  color: #e84393;
}

.css-hero .m-hero {
  padding: 22px 16px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(135deg, #ff9a5c, #e84393);
}

.css-hero .m-p {
  color: rgba(255, 255, 255, 0.9);
}

.css-h1 .m-h1 {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
}

.css-btn .m-btn {
  margin-top: 12px;
  padding: 9px 22px;
  border-radius: 99px;
  background: #ffffff;
  color: #e84393;
  font-weight: 600;
  text-decoration: none;
}

.css-menu .m-menu {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.css-menu .m-card {
  padding: 14px 6px;
  border-radius: 12px;
  background: #fff4ec;
  text-align: center;
  font-weight: 600;
}

.css-cards .m-card {
  box-shadow: 0 10px 24px rgba(232, 67, 147, 0.18);
  animation: card-float 3s ease-in-out infinite;
}

.css-cards .m-card:nth-child(2) { animation-delay: 0.3s; }
.css-cards .m-card:nth-child(3) { animation-delay: 0.6s; }

@keyframes card-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---------- 2. Why code ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.why-card {
  background: #15151c;
  border: 1px solid #2a2a35;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: left;
  transition: transform 0.3s, border-color 0.3s;
}

.why-card:hover {
  transform: translateY(-6px);
  border-color: #6c5ce7;
}

.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.25), rgba(0, 210, 255, 0.2));
  font-size: 22px;
}

.why-card h3 {
  font-size: 20px;
  margin: 16px 0 8px;
}

.why-card p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Phones ---------- */

@media (max-width: 900px) {
  /* Animation first, words underneath */
  .wd-hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 18px;
    text-align: center;
  }

  .wd-hero h1 {
    font-size: 32px;
  }

  .wd-hero-buttons {
    justify-content: center;
  }

  /* On phones the windows overlap less, so the code stays readable */
  .wd-demo {
    height: 570px;
    text-align: left;
  }

  .editor {
    width: 92%;
    height: 240px;
  }

  .mini-browser {
    top: 200px;
    bottom: auto;
    width: 82%;
    height: 370px;
  }

  .why-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .editor-code {
    font-size: 12px;
  }

  .css-h1 .m-h1 {
    font-size: 24px;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .m-nav,
  .m-h1,
  .m-p,
  .m-btn,
  .m-card,
  .m-badge,
  .m-hero,
  .why-card {
    transition: none;
  }

  .css-cards .m-card,
  .editor-code .cursor {
    animation: none;
  }
}
