/* Dolphin LLM public pages. Tokens live in inc/layout_style.css.php (shared with the cabinet and admin). */

/* ---------- buttons of the public pages ---------- */
.btn-buoy, .btn-line { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 12px;
  font-weight: 600; font-size: 1rem; letter-spacing: -0.005em; white-space: nowrap; }
.btn-buoy { background: var(--buoy); color: var(--ink); box-shadow: inset 0 -2px 0 rgba(15,43,58,.18); }
.btn-buoy:hover { background: var(--buoy-ink); }
.btn-line { border: 1.5px solid var(--ink); color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }

/* ---------- hero: copy on the left, the client switch on the right ---------- */
body.home > .wrap { --wrap: 1180px; padding-top: 0; }
.hx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: center; padding: 56px 52px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.hx h1 { font-family: var(--f-display); font-weight: 750; font-size: clamp(2.1rem, 3.7vw, 3.1rem); line-height: 1.05; letter-spacing: -0.035em; margin: 0 0 22px; text-wrap: balance; }
.hx h1 span { display: block; }
.hx .lede { font-size: 1.14rem; line-height: 1.6; color: var(--ink-2); margin: 0 0 30px; max-width: 34em; }
.hx-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hx-note { margin: 18px 0 0; font-size: 0.93rem; color: var(--ink-3); }

.hx-demo { position: relative; }
.sonar { position: absolute; left: -150px; top: -120px; width: 520px; height: 520px; pointer-events: none; z-index: 0; }
.sonar circle { fill: none; stroke: var(--teal); stroke-width: 1.2; transform-origin: 260px 260px; }
.sonar circle:nth-child(1) { opacity: .34; } .sonar circle:nth-child(2) { opacity: .24; } .sonar circle:nth-child(3) { opacity: .16; }
.sonar circle:nth-child(4) { opacity: .10; } .sonar circle:nth-child(5) { opacity: .06; }
.sonar .pulse { stroke: var(--buoy); stroke-width: 2.5; opacity: 0; }
.ping .sonar .pulse { animation: ping 1.6s cubic-bezier(.2,.7,.3,1) .35s 1 both; }
@keyframes ping { 0% { transform: scale(.12); opacity: .95; } 100% { transform: scale(1); opacity: 0; } }

.term { position: relative; z-index: 1; background: var(--deep); color: var(--deep-ink); border-radius: 18px; overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 30px 60px -28px rgba(15,43,58,.55); }
.term-bar { display: flex; align-items: center; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid var(--deep-line); }
.term-bar button { font: inherit; font-size: 0.86rem; color: var(--deep-dim); background: none; border: 0; padding: 8px 12px 10px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.term-bar button[aria-selected="true"] { color: var(--deep-ink); border-bottom-color: var(--buoy); }
.term-bar button:focus-visible { outline: 2px solid var(--buoy); outline-offset: -4px; border-radius: 6px; }
.term-bar .file { margin-left: auto; color: var(--deep-dim); font-family: var(--f-mono); font-size: 0.78rem; padding-right: 6px; }
.term pre { margin: 0; background: none; border: 0; border-radius: 0; padding: 18px 0 16px; font-family: var(--f-mono); font-size: 0.8rem; line-height: 1.75; color: var(--deep-ink);
  overflow-x: auto; scrollbar-color: var(--deep-dim) transparent; scrollbar-width: thin; }
.term pre code { display: block; min-width: max-content; font-size: inherit; }
.term .ln { display: block; padding: 0 22px 0 18px; border-left: 3px solid transparent; }
.term .ln.chg { background: rgba(244,196,48,.10); border-left-color: var(--buoy); }
.term-legend { display: flex; align-items: center; gap: 8px; padding: 0 22px 14px; font-size: 0.8rem; color: var(--deep-dim); }
.term-legend i { width: 12px; height: 12px; border-radius: 3px; background: rgba(244,196,48,.25); box-shadow: inset 3px 0 0 var(--buoy); }
.term .k { color: #8FD3DE; } .term .s { color: #F2D57E; } .term .c { color: var(--deep-dim); }
.term-out { border-top: 1px solid var(--deep-line); padding: 14px 22px 20px; min-height: 128px; }
.term-out .who { font-size: 0.78rem; color: var(--deep-dim); margin-bottom: 6px; display: flex; justify-content: space-between; gap: 12px; }
.term-out p { margin: 0; font-size: 0.95rem; line-height: 1.6; color: #EAF3F5; }
.term-out .caret { display: inline-block; width: 8px; height: 1.05em; vertical-align: -0.16em; background: var(--buoy); margin-left: 2px; }
.term-out.done .caret { display: none; }

/* ---------- sections ---------- */
.sec { margin-top: 20px; padding: 56px 52px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; }
.sec > h2, .sec-head h2 { font-family: var(--f-display); font-weight: 720; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 12px; max-width: 22em; }
.sec-lede { color: var(--ink-2); font-size: 1.05rem; margin: 0 0 36px; max-width: 40em; }

/* the numbers: a spec plate, label on the left, value on the right */
.plate { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin: 0; }
.plate div { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-2); align-items: baseline; }
.plate dt { color: var(--ink-3); font-size: 0.95rem; }
.plate dd { margin: 0; font-size: 1.05rem; }
.plate dd b { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.plate dd small { display: block; color: var(--ink-3); font-size: 0.88rem; margin-top: 2px; }
.plate-foot { margin: 22px 0 0; color: var(--ink-2); }
.plate-foot a, .sec a.tx { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

/* in the API / not offered */
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; }
.two h3 { font-size: 1.12rem; margin: 0 0 14px; letter-spacing: -0.01em; }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding: 11px 0 11px 32px; border-bottom: 1px solid var(--line); position: relative; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 12px; height: 7px; border: solid var(--teal); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.ticks.no li { color: var(--ink-2); }
.ticks.no li::before { width: 13px; height: 0; border-width: 0 0 2px 0; border-color: var(--ink-3); transform: none; top: 22px; }
.ticks li span { display: block; color: var(--ink-3); font-size: 0.9rem; }

/* how to start: a real sequence */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; counter-reset: st; }
.steps li { counter-increment: st; padding: 0 28px 0 0; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line-2); }
.steps li::before { content: counter(st); display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--paper);
  font-weight: 700; margin-bottom: 16px; }
.steps h3 { font-size: 1.12rem; margin: 0 0 6px; }
.steps p { margin: 0; color: var(--ink-2); }

/* uses */
.uses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 56px; }
.uses h3 { font-size: 1.12rem; margin: 0 0 6px; }
.uses p { margin: 0; color: var(--ink-2); }

/* content rule */
.rule { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.rule-box { background: var(--wash); border-radius: 16px; padding: 26px 28px; }
.rule-box p { margin: 0 0 12px; } .rule-box p:last-child { margin: 0; }
.rule-box code { white-space: nowrap; }

/* FAQ */
.faq { max-width: 52em; }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 44px 20px 0; font-size: 1.08rem; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 27px; width: 10px; height: 10px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .18s ease; }
.faq details[open] summary::after { transform: rotate(-135deg); top: 31px; }
.faq details p { margin: 0 0 20px; color: var(--ink-2); max-width: 46em; }

/* last call */
.last { margin: 20px 0 0; background: var(--deep); color: var(--deep-ink); border-radius: 22px; padding: 48px 48px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.last h2 { font-family: var(--f-display); font-size: clamp(1.5rem, 2.8vw, 2.1rem); line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 8px; color: #fff; }
.last p { margin: 0; color: var(--deep-dim); }
.last .btn-line { border-color: var(--deep-ink); color: var(--deep-ink); }
.last .btn-line:hover { background: var(--deep-ink); color: var(--deep); }

@media (max-width: 960px) {
  .hx { grid-template-columns: minmax(0, 1fr); gap: 40px; padding: 36px 28px; }
  .sec { padding: 44px 28px; }
  .sonar { left: auto; right: -160px; top: -150px; }
  .plate, .two, .uses, .rule { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
  .two, .uses, .rule { gap: 36px; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .steps li, .steps li + li { padding: 0; border: 0; }
}
@media (max-width: 560px) {
  .plate div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hx { padding: 28px 18px; border-radius: 18px; }
  .sec { padding: 36px 18px; border-radius: 18px; margin-top: 14px; }
  .last { padding: 32px 22px; border-radius: 18px; margin-top: 14px; }
  .hx-cta a { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .ping .sonar .pulse { animation: none; }
  .faq summary::after { transition: none; }
}
