/* /designs. Loaded after home-v3.css, home-onboarding.css and web-design.css. */

/* Jump links */
.dg-jump { position: sticky; top: 0; z-index: 20; border-block: 1px solid var(--sw-line); background: var(--sw-bg); }
.dg-jump ul { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: 0; padding: .75rem 0; overflow-x: auto; list-style: none; scrollbar-width: none; }
.dg-jump a { display: block; padding: .5rem 1.15rem; border-radius: 40px; color: var(--sw-text); font-family: var(--sw-heading); font-weight: 700; white-space: nowrap; text-decoration: none; }
.dg-jump a:hover { background: var(--sw-card); color: var(--sw-mustard); }

/* One design */
.dg-design { padding: clamp(3.5rem, 7vw, 6.5rem) 0; scroll-margin-top: 3.5rem; }
.dg-design + .dg-design { border-top: 1px solid var(--sw-line); }
.dg-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; gap: clamp(2rem, 5vw, 5rem); }
.dg-design:nth-of-type(even) .dg-info { order: 2; }
.dg-info { position: sticky; top: 6rem; }
.sw .dg-num { margin: 0 0 .75rem; color: var(--sw-sage); font-family: var(--sw-heading); font-weight: 700; }
.dg-info h2 { margin-bottom: 1rem; font-weight: 900; font-size: clamp(3rem, 6vw, 5rem); line-height: 1; letter-spacing: -0.03em; }
.dg-info > p { max-width: 30rem; color: var(--sw-muted); font-size: 1.125rem; }
.sw .dg-suits { margin-top: 1rem; }
.dg-suits strong { color: var(--sw-text); font-family: var(--sw-heading); }

.dg-colours { margin: 2rem 0; padding: 0; border: 0; }
.dg-colours legend { margin-bottom: .75rem; padding: 0; font-family: var(--sw-heading); font-weight: 700; }
.dg-colours legend span { color: var(--sw-mustard); }
.dg-swatches { display: flex; flex-wrap: wrap; gap: .75rem; }
.dg-swatches button { width: 2.75rem; height: 2.75rem; padding: 0; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; transition: border-color .2s ease; }
.dg-swatches button span { display: block; width: 100%; height: 100%; border: 3px solid var(--sw-bg); border-radius: 50%; }
.dg-swatches button:hover { border-color: var(--sw-muted); }
.dg-swatches button[aria-pressed="true"] { border-color: var(--sw-text); }
.dg-swatches button:focus-visible { outline: 2px solid var(--sw-mustard); outline-offset: 2px; }

/* The preview */
.dg-preview { margin: 0; min-width: 0; }
.dg-expand { display: none; }
.dg-panel { --dg-colour: var(--sw-sage); padding: clamp(1rem, 3vw, 2.5rem) clamp(1rem, 3vw, 2.5rem) 0; overflow: hidden; border-radius: 20px; background: var(--dg-colour); transition: background-color .3s ease; }
.dg-window { overflow: hidden; border-radius: 10px 10px 0 0; background: #fff; box-shadow: 0 18px 40px rgba(0, 0, 0, .32); }
.dg-bar { display: flex; align-items: center; gap: .35rem; padding: .7rem .9rem; background: var(--sw-ink); }
.dg-bar i { width: .55rem; height: .55rem; border-radius: 50%; background: var(--sw-text); opacity: .45; }
.dg-bar em { margin-left: .6rem; color: var(--sw-muted); font-size: .8rem; font-style: normal; }
.dg-scroll { height: clamp(26rem, 62vh, 40rem); overflow-y: auto; overscroll-behavior: auto; }
.dg-scroll:focus-visible { outline: 3px solid var(--sw-mustard); outline-offset: -3px; }
.dg-shot { display: block; width: 100%; height: auto; }
.sw .dg-hint { margin: .75rem 0 0; color: var(--sw-muted); font-size: .9rem; }

/* Made yours */
.dg-yours, #contact { scroll-margin-top: 3.5rem; }
.dg-yours { padding: clamp(3.5rem, 7vw, 6rem) 0; background: var(--sw-sage); color: var(--sw-ink); }
.dg-yours h2 { max-width: 44rem; margin-bottom: 2.5rem; color: var(--sw-ink); font-weight: 900; font-size: clamp(2.4rem, 4.6vw, 3.5rem); line-height: 1.05; letter-spacing: -0.02em; }
.dg-yours ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; margin: 0; padding: 0; list-style: none; }
.dg-yours li { padding-top: 1rem; border-top: 2px solid var(--sw-ink); }
.dg-yours h3 { margin-bottom: .4rem; color: var(--sw-ink); font-size: 1.3rem; }
.dg-yours p { margin: 0; color: var(--sw-ink); }

@media (max-width: 860px) {
  .dg-jump ul { justify-content: flex-start; }
  /* On touch screens a box you scroll inside traps the page, so show the top of
     the design with a button that opens the whole page in place. */
  .dg-scroll { position: relative; height: 26rem; overflow: hidden; }
  .dg-scroll::after { content: ""; position: absolute; inset: auto 0 0; height: 5rem; background: linear-gradient(transparent, rgba(0, 0, 0, .35)); pointer-events: none; }
  .dg-preview.is-open .dg-scroll { height: auto; }
  .dg-preview.is-open .dg-scroll::after { display: none; }
  .sw .dg-hint { display: none; }
  .dg-expand { display: flex; width: 100%; margin-top: .85rem; cursor: pointer; background: none; }
  .dg-grid { grid-template-columns: minmax(0, 1fr); }
  .dg-design:nth-of-type(even) .dg-info { order: 0; }
  .dg-info { position: static; }
  .dg-yours ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .dg-jump ul { justify-content: space-between; gap: 0; }
  .dg-jump a { padding: .55rem .5rem; font-size: .95rem; }
  .dg-panel { padding: .9rem .9rem 0; }
}
@media (max-width: 480px) {
  .dg-yours ul { grid-template-columns: minmax(0, 1fr); }
}
