/* ==========================================================================
   Website design page — builds on the tokens and components in styles.css
   ========================================================================== */

.wd-container {
  max-width: 1160px;
  margin: 0 auto;
}

/* Shared editorial pieces -------------------------------------------------- */

.wd-eyebrow {
  display: inline-block;
  font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
}

.wd-eyebrow--center {
  display: block;
  margin-bottom: 14px;
  text-align: center;
}

.wd-section-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: clamp(40px, 6vw, 64px);
}

.wd-section-head--split {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
}

.wd-section-head--split > div {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wd-section-title {
  margin: 0;
  max-width: 18ch;
  font-family: "roc-grotesk", "Roc Grotesk", sans-serif;
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--text);
  text-wrap: balance;
}

.wd-section-title em,
.wd-hero-title em {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-weight: 400;
  font-feature-settings: "swsh" 1, "ss01" 1;
  color: var(--orange);
  padding-right: 0.04em;
}

.wd-section-lede {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  line-height: 1.6;
  color: var(--text-muted);
}

.wd-section {
  padding: clamp(72px, 10vw, 128px) clamp(20px, 5vw, 64px);
  background: var(--bg-light);
}

.wd-section--white {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.wd-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid rgba(26, 26, 26, 0.25);
  transition: color 0.25s ease, border-color 0.25s ease, gap 0.25s ease;
}

.wd-link:hover {
  color: var(--orange);
  border-color: var(--orange);
  gap: 14px;
}

/* Hero --------------------------------------------------------------------- */

.wd-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-height) + clamp(48px, 7vw, 96px)) clamp(20px, 5vw, 64px) clamp(64px, 8vw, 112px);
  background: var(--white);
}

.wd-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, #c8c8c8 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 75% 50%, black 10%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 70% at 75% 50%, black 10%, transparent 100%);
  pointer-events: none;
}

.wd-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(48px, 6vw, 88px);
}

.wd-crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.wd-crumbs a {
  transition: color 0.2s ease;
}

.wd-crumbs a:hover {
  color: var(--text);
}

.wd-crumbs [aria-current] {
  color: var(--orange);
}

.wd-hero-title {
  margin: 0;
  max-width: 13ch;
  font-family: "roc-grotesk", "Roc Grotesk", sans-serif;
  font-size: clamp(2.5rem, 5.6vw, 4.75rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  color: var(--text);
  text-wrap: balance;
}

.wd-hero-desc {
  margin: 28px 0 0;
  max-width: 34em;
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  line-height: 1.6;
  color: var(--text-muted);
  text-wrap: pretty;
}

.wd-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.wd-hero-cta .btn {
  min-width: 160px;
  padding: 14px 24px;
}

/* Stacked browser frames */
.wd-hero-visual {
  position: relative;
  aspect-ratio: 1.12;
  width: 100%;
}

.wd-browser {
  position: absolute;
  background: var(--white);
  border: 1px solid rgba(26, 26, 26, 0.12);
  overflow: hidden;
}

.wd-browser img {
  display: block;
  width: 100%;
  height: auto;
}

.wd-browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  background: #f3f1ec;
  border-bottom: 1px solid rgba(26, 26, 26, 0.08);
}

.wd-browser-bar > span:not(.wd-browser-url) {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.16);
}

.wd-browser-url {
  margin: 0 auto;
  padding: 3px 14px;
  background: var(--white);
  font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  transform: translateX(-14px);
}

.wd-browser--back {
  top: 0;
  right: 0;
  width: 74%;
  transform: rotate(2deg);
  box-shadow: 0 20px 50px -24px rgba(26, 26, 26, 0.22);
}

.wd-browser--back img {
  opacity: 0.9;
}

.wd-browser--front {
  left: 0;
  bottom: 0;
  width: 88%;
  transform: rotate(-1deg);
  box-shadow:
    0 32px 70px -26px rgba(26, 26, 26, 0.3),
    0 10px 24px -12px rgba(232, 93, 44, 0.2);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.wd-hero-visual:hover .wd-browser--front {
  transform: rotate(-0.2deg) translateY(-6px);
}

/* Designer's redline annotations */
.wd-redline {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--charcoal);
  color: #f5f2ec;
  font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wd-redline b {
  font-weight: 500;
  color: var(--orange);
}

.wd-redline--a {
  top: 52%;
  left: -18px;
}

.wd-redline--b {
  right: -10px;
  bottom: 12%;
  background: var(--orange);
  color: var(--white);
}

.wd-redline--b b {
  color: var(--white);
}

/* Hero entrance */
.wd-reveal {
  opacity: 0;
  transform: translateY(14px);
  filter: blur(6px);
  animation: wd-reveal 900ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.wd-crumbs.wd-reveal { animation-delay: 60ms; }
.wd-hero-title.wd-reveal { animation-delay: 160ms; }
.wd-hero-desc.wd-reveal { animation-delay: 320ms; }
.wd-hero-cta.wd-reveal { animation-delay: 440ms; }
.wd-hero-visual.wd-reveal { animation-delay: 380ms; }

@keyframes wd-reveal {
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* Facts strip -------------------------------------------------------------- */

.wd-facts {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.wd-facts-list {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.wd-facts-list > div {
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  padding: clamp(28px, 4vw, 40px) clamp(20px, 3vw, 32px);
  border-left: 1px solid var(--border);
}

.wd-facts-list > div:first-child {
  border-left: 0;
}

.wd-facts-list dt {
  font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.wd-facts-list dd {
  margin: 0;
  font-family: "roc-grotesk", "Roc Grotesk", sans-serif;
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.wd-facts-list small {
  font-size: 0.45em;
  letter-spacing: 0;
  color: var(--text-muted);
}

/* What's included ---------------------------------------------------------- */

.wd-included {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(26, 26, 26, 0.14);
}

.wd-included-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 0.9fr);
  align-items: baseline;
  gap: 24px clamp(24px, 3vw, 40px);
  padding: clamp(24px, 3vw, 36px) 0;
  border-bottom: 1px solid rgba(26, 26, 26, 0.14);
  transition: background 0.3s ease;
}

.wd-included-num {
  font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--orange);
}

.wd-included-title {
  margin: 0;
  font-family: "roc-grotesk", "Roc Grotesk", sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  transition: color 0.25s ease;
}

.wd-included-row:hover .wd-included-title {
  color: var(--orange);
}

.wd-included-desc {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.wd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wd-tags li {
  padding: 5px 10px;
  border: 1px solid rgba(26, 26, 26, 0.14);
  background: var(--white);
  font-size: 0.8125rem;
  color: var(--text);
}

/* Process ------------------------------------------------------------------ */

.wd-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--charcoal);
}

.wd-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px clamp(16px, 2vw, 28px) 8px 0;
}

.wd-step + .wd-step {
  padding-left: clamp(16px, 2vw, 28px);
  border-left: 1px solid var(--border);
}

/* Marker sitting on the timeline rule */
.wd-step::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  background: var(--orange);
}

.wd-step + .wd-step::before {
  left: -5px;
  background: var(--charcoal);
}

.wd-step-num {
  font-family: ui-monospace, "SF Mono", "Menlo", "Consolas", monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.wd-step-title {
  margin: 0;
  font-family: "roc-grotesk", "Roc Grotesk", sans-serif;
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.wd-step-desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Selected websites -------------------------------------------------------- */

.wd-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 56px) clamp(24px, 3vw, 40px);
}

.wd-work-grid .work-preview-img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.6s ease;
}

.wd-work-grid .work-preview:hover .work-preview-img {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -28px rgba(26, 26, 26, 0.35);
}

/* Principles (dark band) --------------------------------------------------- */

.wd-principles {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(80px, 11vw, 140px) clamp(20px, 5vw, 64px);
  background: #0f0e0d;
  color: #f5f2ec;
}

.wd-principles-inner {
  position: relative;
  z-index: 1;
}

.wd-principles .wd-section-title {
  color: #f5f2ec;
}

.wd-principles-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(245, 242, 236, 0.12);
  border-left: 1px solid rgba(245, 242, 236, 0.12);
}

.wd-principles-grid li {
  padding: clamp(28px, 3vw, 40px) clamp(22px, 2.6vw, 34px);
  border-right: 1px solid rgba(245, 242, 236, 0.12);
  border-bottom: 1px solid rgba(245, 242, 236, 0.12);
  transition: background 0.3s ease;
}

.wd-principles-grid li:hover {
  background: rgba(245, 242, 236, 0.03);
}

.wd-principles-grid h3 {
  position: relative;
  margin: 0 0 12px;
  padding-left: 20px;
  font-family: "roc-grotesk", "Roc Grotesk", sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.wd-principles-grid h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background: var(--orange);
}

.wd-principles-grid p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(245, 242, 236, 0.66);
}

/* FAQ tweaks --------------------------------------------------------------- */

.faq-answer a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Keyboard focus ----------------------------------------------------------- */

.wd-link:focus-visible,
.wd-crumbs a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}

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

@media (max-width: 1000px) {
  .wd-included-row {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .wd-included-desc,
  .wd-tags {
    grid-column: 2;
  }

  .wd-steps {
    grid-template-columns: repeat(2, 1fr);
    border-top: 0;
    row-gap: 40px;
  }

  .wd-step,
  .wd-step + .wd-step {
    padding: 28px 24px 0 0;
    border-left: 0;
    border-top: 1px solid var(--charcoal);
  }

  .wd-step::before,
  .wd-step + .wd-step::before {
    left: 0;
  }

  .wd-principles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 960px) {
  .wd-hero-inner {
    grid-template-columns: 1fr;
  }

  .wd-hero-visual {
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
  }

  .wd-facts-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .wd-facts-list > div:nth-child(3) {
    border-left: 0;
  }

  .wd-facts-list > div:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 740px) {
  .wd-work-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .wd-hero-cta {
    flex-direction: column;
  }

  .wd-hero-cta .btn {
    width: 100%;
  }

  .wd-redline--a {
    left: 0;
  }

  .wd-redline--b {
    right: 0;
  }

  .wd-included-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wd-included-desc,
  .wd-tags {
    grid-column: auto;
  }

  .wd-steps {
    grid-template-columns: 1fr;
    row-gap: 32px;
  }

  .wd-principles-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wd-reveal {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }

  .wd-browser--front,
  .wd-work-grid .work-preview-img {
    transition: none;
  }
}
