* {
  box-sizing: border-box;
}

:root {
  --stage-h: clamp(360px, 58vh, 560px);
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: #faf9f6;
  color: #17202a;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.4rem 1rem 2.5rem;
}

.btn {
  border: 0;
  border-radius: 999px;
  padding: 0.72rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-primary {
  background: #17202a;
  color: #fff;
}

.btn-primary:hover {
  background: #2b3846;
}

.btn-ghost {
  background: transparent;
  color: #4a5561;
  border: 1px solid #d6d2c8;
  padding: 0.5rem 0.95rem;
  font-size: 0.82rem;
}

.btn-ghost:hover {
  border-color: #a9a294;
  color: #17202a;
}

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: 0.7rem 0 0.4rem;
}

.hero h1 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 6.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero-role {
  margin: 0.5rem 0 0;
  font-size: clamp(1rem, 3vw, 1.2rem);
  font-weight: 600;
  color: #46505b;
  letter-spacing: 0.005em;
}

.path {
  margin: 0.8rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.path-chip {
  background: #fff;
  border: 1px solid #e2ddd2;
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-weight: 600;
  color: #4a5561;
}

.path-arrow {
  color: #b0a893;
  font-weight: 600;
}

.path-now {
  background: #17202a;
  border-color: #17202a;
  color: #fff;
}

.path-now {
  letter-spacing: 0.04em;
}

.hero-line {
  margin: 0.8rem 0 0;
  color: #5a6470;
  font-size: 0.95rem;
}

.tip {
  position: relative;
  border-bottom: 1px dotted #98917f;
  cursor: help;
  outline: none;
}

.tip::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 3px);
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #17202a;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

.tip::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  transform: translateX(-50%);
  background: #17202a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
  z-index: 30;
}

.tip:hover::after,
.tip:focus::after,
.tip:hover::before,
.tip:focus::before {
  opacity: 1;
}

/* ---------- views / carousel ---------- */

.view-shell {
  position: relative;
  margin-top: 1.2rem;
}

.view-track {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  border-radius: 20px;
}

.view-track::-webkit-scrollbar {
  display: none;
}

.view {
  flex: 0 0 100%;
  min-width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #fff;
  border: 1px solid #e7e2d7;
  border-radius: 20px;
  padding: 1rem 0.9rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

.view + .view {
  margin-left: 0.8rem;
}

.view-caption {
  margin: 0;
  max-width: 34rem;
  text-align: center;
  font-size: 0.88rem;
  color: #5a6470;
}

.view-caption strong {
  color: #17202a;
}

.view-arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #e2ddd2;
  background: #fff;
  color: #17202a;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(23, 32, 42, 0.12);
}

.view-prev {
  left: -12px;
}

.view-next {
  right: -12px;
}

.view-dots {
  display: flex;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.view-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: #d8d2c4;
  cursor: pointer;
}

.view-dot.active {
  background: #17202a;
  transform: scale(1.25);
}

/* ---------- view 1: simulation ---------- */

.view-sim {
  gap: 0.75rem;
}

/* shared frame for all four marketplace views; fills leftover slide height so
   views 2-4 end up exactly as tall as the simulation view */
.stage {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e7e2d7;
  min-height: var(--stage-h);
  display: grid;
  place-items: center;
}

#map-canvas {
  width: 100%;
  height: var(--stage-h);
  display: block;
  object-fit: cover;
}

.mini-chart {
  position: absolute;
  z-index: 3;
  width: 200px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(23, 32, 42, 0.07);
  border-radius: 10px;
  padding: 0.4rem 0.5rem 0.3rem;
  min-width: 0;
}

.chart-balance {
  left: 12px;
  top: 12px;
}

.chart-tx {
  right: 12px;
  top: 12px;
}

.chart-cash {
  left: 12px;
  bottom: 12px;
}

.chart-nps {
  right: 12px;
  bottom: 12px;
}

@media (max-width: 759px) {
  .mini-chart {
    width: 37vw;
    max-width: 155px;
  }

  .chart-balance,
  .chart-cash {
    left: 8px;
  }

  .chart-tx,
  .chart-nps {
    right: 8px;
  }

  .chart-balance,
  .chart-tx {
    top: 8px;
  }

  .chart-cash,
  .chart-nps {
    bottom: 8px;
  }
}

.chart-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.chart-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 8px;
}

.mini-chart h3 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #3c4650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-chart canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 2;
  display: block;
}

.alert {
  min-height: 0.9rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #bf1e1e;
  opacity: 0;
  line-height: 1.2;
}

.alert.show {
  opacity: 1;
  animation: blink 0.7s step-end infinite;
}

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

.controls {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
}

.slider-wrap {
  --fill: 50%;
}

.slider-wrap label,
.select-wrap label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #3c4650;
  text-transform: lowercase;
}

.control-slider {
  width: 100%;
  appearance: none;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--c1) 0, var(--c2) var(--fill), #e6e2d8 var(--fill), #e6e2d8 100%);
  border: 0;
  touch-action: pan-y;
}

.demand .control-slider {
  --c1: #b6e1ff;
  --c2: #2278c8;
}

.supply .control-slider {
  --c1: #bceab7;
  --c2: #2f9e44;
}

.take-rate .control-slider {
  --c1: #ffe2ba;
  --c2: #f08c00;
}

.control-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2f3942;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.control-slider::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #2f3942;
  border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.inline-commission {
  font-weight: 700;
  color: #17202a;
}

.select-wrap select {
  width: 100%;
  height: 36px;
  border: 1px solid #d6d2c8;
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: inherit;
  background: #fff;
  color: #17202a;
  padding: 0 0.5rem;
}

.sim-actions {
  display: flex;
  justify-content: center;
}

/* ---------- view 2: flywheel ---------- */

.view-flywheel {
  justify-content: flex-start;
}

.flywheel {
  position: relative;
  width: min(86vw, calc(var(--stage-h) - 16px), 520px);
  aspect-ratio: 1;
  margin: 0.5rem 0;
}

.fly-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fly-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #fff;
  border: 1px solid #e2ddd2;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(23, 32, 42, 0.09);
  padding: 0.4rem 0.5rem;
  width: min(7.6rem, 36%);
  gap: 0.1rem;
}

.fly-node strong {
  font-size: 0.8rem;
  color: #17202a;
}

.fly-node span {
  font-size: 0.66rem;
  color: #6a7480;
  line-height: 1.25;
}

.fly-top {
  left: 50%;
  top: 13%;
  transform: translate(-50%, -50%);
}

.fly-right {
  left: 81%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.fly-bottom {
  left: 50%;
  top: 87%;
  transform: translate(-50%, -50%);
}

.fly-left {
  left: 19%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.fly-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  color: #8a7f68;
  font-size: 0.64rem;
  font-weight: 600;
}

.fly-spin {
  font-size: 1.6rem;
  color: #b0a893;
  display: inline-block;
  animation: flySpin 7s linear infinite;
}

@keyframes flySpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 480px) {
  .fly-center span:not(.fly-spin) {
    display: none;
  }
}

.fly-top {
  transition: transform 0.5s ease;
  z-index: 3;
}

.base-label {
  font-size: 0.54rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #98917f;
  margin-top: 0.2rem;
}

.base-track {
  width: 84%;
  height: 4px;
  background: #ece7db;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.14rem;
}

.base-track i {
  display: block;
  height: 100%;
  width: 38%;
  background: #2f9e44;
  border-radius: 999px;
  transition: width 0.7s ease;
}

.fly-cloud {
  position: absolute;
  left: -2%;
  top: -3%;
  width: clamp(86px, 26%, 112px);
  transform-origin: 60% 70%;
  transition: transform 0.6s ease;
  z-index: 4;
  pointer-events: none;
}

.fly-cloud svg {
  display: block;
  width: 100%;
}

.fly-cloud-label {
  position: absolute;
  inset: 16% 4% 8% 4%;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 0.58rem;
  font-weight: 600;
  color: #3f6d90;
  line-height: 1.15;
}

.fly-cloud.pop svg {
  animation: cloudPop 0.5s ease;
}

@keyframes cloudPop {
  35% {
    transform: scale(1.1);
  }
}

.fly-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  z-index: 6;
  pointer-events: none;
}

.dot-brand {
  background: #f08c00;
  box-shadow: 0 0 0 4px rgba(240, 140, 0, 0.18);
}

.dot-inflow {
  background: #2f9e44;
  box-shadow: 0 0 0 4px rgba(47, 158, 68, 0.18);
}

.dot-churn {
  width: 8px;
  height: 8px;
  background: #aab2bc;
  box-shadow: 0 0 0 3px rgba(170, 178, 188, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  .fly-spin {
    animation: none;
  }
}

/* ---------- view 3: the feed ---------- */

.phone {
  position: relative;
  height: clamp(360px, calc(var(--stage-h) + 40px), 580px);
  width: auto;
  border-radius: 34px;
  background: #17202a;
  padding: 10px;
  box-shadow: 0 18px 42px rgba(23, 32, 42, 0.28);
  margin: 22px 0;
}

.phone-notch {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  width: 34%;
  height: 18px;
  background: #17202a;
  border-radius: 0 0 12px 12px;
  z-index: 4;
}

.phone-screen {
  background: #f6f5f1;
  border-radius: 26px;
  overflow: hidden;
  height: 100%;
  aspect-ratio: 9 / 19.5;
  display: flex;
  flex-direction: column;
}

.feed-top {
  background: #fff;
  padding: 1.5rem 0.7rem 0.55rem;
  border-bottom: 1px solid #ece8de;
  flex: 0 0 auto;
}

.feed-search {
  background: #f1efe8;
  border-radius: 999px;
  padding: 0.38rem 0.65rem;
  font-size: 0.68rem;
  color: #8a93a0;
}

.feed-cats {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.45rem;
  overflow: hidden;
}

.cat {
  font-size: 0.6rem;
  font-weight: 600;
  color: #6a7480;
  background: #f1efe8;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  white-space: nowrap;
}

.cat.active {
  background: #17202a;
  color: #fff;
}

.feed-scroll {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.feed-scroll::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 46px;
  background: linear-gradient(180deg, rgba(246, 245, 241, 0), rgba(246, 245, 241, 0.95));
  pointer-events: none;
}

.feed-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0.55rem;
  display: flex;
  flex-direction: column;
}

.feed-card {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #fff;
  border: 1px solid #eceadf;
  border-radius: 12px;
  padding: 0.45rem;
  position: relative;
  margin-bottom: 0.45rem;
  max-height: 120px;
  transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease, margin-bottom 0.4s ease,
    filter 0.3s ease;
}

.feed-card.is-sold {
  filter: grayscale(0.85);
  opacity: 0.85;
}

.feed-card.is-sold::after {
  content: "SOLD";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-10deg);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #c92a2a;
  border: 2.5px solid #c92a2a;
  border-radius: 6px;
  padding: 0.08rem 0.5rem;
  background: rgba(255, 255, 255, 0.78);
  animation: stampIn 0.25s ease;
}

@keyframes stampIn {
  from {
    transform: translate(-50%, -50%) rotate(-10deg) scale(1.7);
    opacity: 0;
  }
}

.feed-card.is-gone {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  overflow: hidden;
}

.feed-thumb {
  width: 52px;
  height: 52px;
  border-radius: 9px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
}

.feed-thumb svg {
  width: 34px;
  height: 34px;
}

.feed-info {
  min-width: 0;
}

.feed-title {
  font-size: 0.72rem;
  font-weight: 600;
  color: #17202a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-price {
  font-size: 0.74rem;
  font-weight: 700;
  color: #0d7f57;
  margin-top: 0.06rem;
  transform-origin: left center;
}

.feed-price.bump {
  animation: priceBump 0.9s ease;
}

@keyframes priceBump {
  30% {
    color: #e8590c;
    transform: scale(1.16);
  }
}

.feed-meta {
  font-size: 0.62rem;
  color: #8a93a0;
  margin-top: 0.06rem;
}

.feed-badge {
  position: absolute;
  right: 0.45rem;
  top: 0.45rem;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.14rem 0.42rem;
}

.badge-new {
  background: #e2f3e6;
  color: #22773a;
}

.badge-top {
  background: #fdeeda;
  color: #b06508;
}

.badge-sold {
  background: #17202a;
  color: #fff;
}

/* ---------- view 4: order book ---------- */

.book-card {
  width: 100%;
  flex: 1 1 auto;
  background: #fff;
  border-radius: 16px;
  padding: 0.75rem 0.9rem 0.6rem;
  border: 1px solid #e7e2d7;
  min-height: var(--stage-h);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.book-head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.book-pair {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #7a8694;
}

.book-price {
  font-size: 1rem;
  font-weight: 700;
  color: #17202a;
  font-variant-numeric: tabular-nums;
}

.book-legend {
  margin-left: auto;
  font-size: 0.64rem;
  color: #5a6470;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}

.swatch-bid {
  background: #2f9e44;
}

.swatch-ask {
  background: #e8590c;
}

#book-canvas {
  width: 100%;
  max-width: calc((var(--stage-h) - 70px) * 1.95);
  height: auto;
  aspect-ratio: 820 / 420;
  display: block;
  margin: 0 auto;
}

/* ---------- outro ---------- */

.outro {
  text-align: center;
  padding: 1.6rem 0.5rem 0.5rem;
  max-width: 36rem;
  margin: 0 auto;
}

/* ---------- modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 26, 0.45);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 1rem;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(94vw, 600px);
  background: #fff;
  border-radius: 22px;
  padding: 1.8rem 1.7rem 1.6rem;
  position: relative;
  max-height: min(92vh, 900px);
  overflow: auto;
  box-shadow: 0 24px 60px -20px rgba(15, 20, 26, 0.35);
}

.modal-close {
  position: absolute;
  right: 0.9rem;
  top: 0.9rem;
  border: 0;
  background: #f1ede3;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  color: #4a5561;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
  background: #e7e1d3;
  color: #17202a;
}

/* header */

.expert-intro {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 1.8rem 0.9rem 0;
}

.expert-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  flex: 0 0 88px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #e7edf1, 0 6px 16px -8px rgba(15, 20, 26, 0.4);
}

.expert-quote {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #17202a;
}

.expert-summary {
  margin: 0 0 1.3rem;
  font-size: 0.92rem;
  color: #46505b;
  line-height: 1.55;
}

/* assignment — calm, flat */

.assign-eyebrow {
  margin: 0.2rem 0 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a7a08f;
}

.phase {
  margin-bottom: 1.5rem;
}

.phase-head {
  margin: 0 0 0.55rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: #17202a;
  line-height: 1.35;
}

.phase-num {
  color: #c3bbaa;
  margin-right: 0.6rem;
}

.phase-detail {
  margin: 0 0 1rem;
  font-size: 0.86rem;
  color: #667085;
  line-height: 1.5;
}

.phase-label {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: #98917f;
}

.forms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: stretch;
}

.form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  background: #faf9f6;
  border-radius: 12px;
  padding: 0.85rem 0.8rem;
}

.form-ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 36px;
}

.form-ic svg {
  width: 20px;
  height: 20px;
}

.ic-ml {
  background: rgba(140, 63, 209, 0.1);
  color: #8c3fd1;
}

.ic-fin {
  background: rgba(13, 127, 87, 0.11);
  color: #0d7f57;
}

.ic-story {
  background: rgba(224, 126, 10, 0.13);
  color: #cf7a12;
}

.form-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #17202a;
  line-height: 1.25;
  min-height: 2.5em;
}

.form-note {
  font-size: 0.78rem;
  color: #98917f;
  line-height: 1.3;
}

.phase-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.phase-chips span {
  font-size: 0.82rem;
  color: #5b6472;
  background: #f5f2ec;
  border-radius: 8px;
  padding: 0.34rem 0.7rem;
}

/* read-more career link */

.career-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0.15rem 0 1.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #5a6470;
  text-decoration: none;
}

.career-more:hover {
  color: #17202a;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.career-more span {
  transition: transform 0.15s;
}

.career-more:hover span {
  transform: translate(1px, -1px);
}

/* contact */

.contact {
  border-top: 1px solid #eee7da;
  padding-top: 1.2rem;
}

.modal-card h2 {
  margin: 0 0 0.75rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #17202a;
}

.modal-card form {
  display: grid;
  gap: 0.6rem;
}

.modal-card input,
.modal-card textarea {
  width: 100%;
  border: 1px solid #d6d2c8;
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  font-size: 0.92rem;
  font-family: inherit;
  color: #17202a;
  background: #fdfcfa;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.modal-card input::placeholder,
.modal-card textarea::placeholder {
  color: #9aa1a9;
}

.modal-card input:focus,
.modal-card textarea:focus {
  outline: none;
  border-color: #17202a;
  box-shadow: 0 0 0 3px rgba(23, 32, 42, 0.08);
  background: #fff;
}

.modal-card textarea {
  resize: vertical;
  min-height: 96px;
}

.modal-card form button {
  border: 0;
  background: #17202a;
  color: #fff;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background 0.15s;
}

.modal-card form button:hover {
  background: #2b3846;
}

.modal-card form button:disabled {
  opacity: 0.7;
  cursor: default;
}

@media (max-width: 480px) {
  .modal-card {
    padding: 1.4rem 1.15rem 1.3rem;
    border-radius: 18px;
  }

  .expert-avatar {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
  }

  .expert-quote {
    font-size: 1.12rem;
  }

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

  .form {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.8rem;
  }

  .form-name {
    min-height: 0;
  }
}

/* ---------- desktop ---------- */

@media (min-width: 760px) {
  :root {
    --stage-h: clamp(300px, calc(100vh - 400px), 620px);
  }

  .page {
    padding: 1rem 1.6rem 2.2rem;
  }

  .hero {
    padding: 0.5rem 0 0.3rem;
  }

  .hero-line {
    margin-top: 0.55rem;
  }

  .view-shell {
    margin-top: 0.9rem;
  }

  .view {
    padding: 0.9rem 1.6rem 1rem;
    gap: 0.7rem;
  }

  .view-arrow {
    display: grid;
    place-items: center;
  }

  #map-canvas {
    object-fit: contain;
  }

  .chart-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .controls {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    max-width: 980px;
  }

  .view-dots {
    margin-top: 0.7rem;
  }
}
