/* Solstice Interactive — showcase, lab, contact */

/* ---------------- showcase ---------------- */

.showcase-hero .count-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--panel);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.showcase-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(24px, 4vw, 54px);
  padding-bottom: clamp(50px, 7vw, 90px);
  align-items: start;
}

.gallery-list {
  border-top: 1px solid var(--line);
}

.gallery-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  width: 100%;
  padding: 18px 10px 18px 2px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  color: var(--muted);
  transition: color 0.25s var(--ease), padding 0.3s var(--ease), background-color 0.3s var(--ease);
}

.gallery-item:hover {
  color: var(--ink);
  padding-left: 10px;
}

.gallery-item.is-on {
  color: var(--ink);
  background: color-mix(in srgb, var(--iris) 5%, transparent);
  padding-left: 10px;
}

.gallery-item .g-n {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
}

.gallery-item .g-name {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 24px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.gallery-item .g-cat {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
}

.gallery-item.is-on .g-n,
.gallery-item.is-on .g-cat {
  color: var(--iris);
}

.gallery-stage {
  position: sticky;
  top: calc(var(--head-h) + 18px);
}

.gallery-canvas-wrap {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3.4;
  background: radial-gradient(circle at 60% 35%, #fffdf8, #e9e4f8 55%, #f4e4d3);
  box-shadow: var(--shadow);
}

#galleryCanvas {
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}

#galleryCanvas.is-live {
  opacity: 1;
}

.gallery-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 100px;
  background: rgba(255, 253, 248, 0.8);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.gallery-info {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
}

.gallery-info h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 34px);
  letter-spacing: -0.035em;
  line-height: 1;
}

.gallery-info p {
  margin-top: 7px;
  max-width: 44ch;
  font-size: 13px;
  color: var(--muted);
}

.gallery-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gallery-nav .count {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
}

.gallery-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.gallery-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 900px) {
  .showcase-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .gallery-stage {
    position: static;
    order: -1;
  }
  .gallery-canvas-wrap {
    aspect-ratio: 4 / 3;
  }
}

/* ---------------- lab ---------------- */

.lab-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 26px;
}

.lab-stage {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0d0e14;
  box-shadow: var(--shadow);
}

#labCanvas {
  width: 100%;
  height: clamp(380px, 58vh, 560px);
  display: block;
}

.lab-controls {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border-radius: 18px;
  background: rgba(10, 11, 16, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  color: #f4f1e9;
}

.lab-control .k {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 241, 233, 0.55);
}

.lab-control .v {
  float: right;
  color: #fff;
  font-size: 8px;
}

.lab-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.lab-pill {
  padding: 6px 10px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 241, 233, 0.65);
  transition: all 0.25s var(--ease);
}

.lab-pill:hover {
  color: #fff;
}

.lab-pill.is-on {
  background: #f4f1e9;
  border-color: #f4f1e9;
  color: #12131a;
}

.lab-actions {
  display: flex;
  gap: 6px;
}

.lab-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f4f1e9;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.lab-btn:hover {
  background: #f4f1e9;
  color: #12131a;
}

.lab-btn.is-copied {
  background: #c9efd9;
  border-color: #c9efd9;
  color: #1d5c3c;
}

.lab input[type='range']::-webkit-slider-runnable-track {
  background: rgba(255, 255, 255, 0.22);
}

.lab input[type='range']::-webkit-slider-thumb {
  background: #f4f1e9;
  border-color: #0d0e14;
}

.lab-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 16px;
  margin-top: 30px;
}

.lab-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: clamp(18px, 2.4vw, 28px);
}

.lab-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.lab-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.snippet {
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--ink);
  color: #d9d4fa;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
}

.motion-demo {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  padding: 12px;
}

.motion-track {
  position: relative;
  height: 54px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.motion-track + .motion-track {
  border-bottom: 0;
}

.motion-track .ball {
  position: absolute;
  top: 50%;
  left: 6px;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--iris);
  transition: transform var(--dur, 900ms) var(--curve, cubic-bezier(0.22, 1, 0.36, 1));
}

.motion-track:nth-child(2) .ball {
  background: var(--amber);
}

.motion-track:nth-child(3) .ball {
  background: #2fbf7f;
}

.motion-track.is-run .ball {
  transform: translateX(calc(var(--travel, 240px)));
}

.motion-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------- contact ---------------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 5vw, 70px);
  padding-bottom: clamp(50px, 8vw, 100px);
  align-items: start;
}

.form-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: clamp(22px, 3vw, 38px);
  box-shadow: var(--shadow);
}

.form-card h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 34px);
  letter-spacing: -0.035em;
  line-height: 1;
  margin-bottom: 6px;
}

.form-card .sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 22px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--iris);
  box-shadow: 0 0 0 3px rgba(83, 70, 245, 0.14);
}

.field .err {
  display: none;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d3452a;
}

.field.is-bad input,
.field.is-bad textarea,
.field.is-bad select {
  border-color: #d3452a;
}

.field.is-bad .err {
  display: block;
}

.form-row-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  margin-top: 6px;
}

.form-row-foot .note {
  max-width: 30ch;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.form-ok {
  display: none;
  border: 1px solid #b8e6cd;
  background: #edf9f2;
  border-radius: 18px;
  padding: 24px;
}

.form-ok.is-on {
  display: block;
}

.form-ok h3 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
  color: var(--mint-ink);
}

.form-ok p {
  font-size: 13.5px;
  color: #2b6b4c;
}

.side-cards {
  display: grid;
  gap: 12px;
}

.side-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 20px;
}

.side-card h3 {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.side-card p,
.side-card a {
  font-size: 14px;
  line-height: 1.6;
}

.side-card a:hover {
  color: var(--iris);
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 10px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 32px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.steps li::before {
  content: '0' counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--iris);
}

.avail {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mint-ink);
}

.avail .d {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2fbf7f;
}

.faq-list {
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.faq-list details {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: '+';
  color: var(--iris);
  font-family: var(--font-mono);
}

.faq-list details[open] summary::after {
  content: '−';
}

.faq-list p {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .contact-layout,
  .lab-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .lab-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lab-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .lab-controls {
    position: static;
    border-radius: 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
}
