/* ABOUTME: Shared styles for every Standard Compute page: tokens, layout, components and animations. */
/* ABOUTME: All motion is CSS and switches off under prefers-reduced-motion. */

:root {
  --accent: #ff5b14;
  --accent-soft: #ffe6d9;
  --peach: #fff1ea;
  --peach-line: #f3d3c2;
  --peach-ink: #3d2a20;
  --ink: #0b0b0c;
  --grey: #5c5f66;
  --line: #e6e7ea;
  --line-strong: #dadce0;
  --field-line: #d5d7dc;
  --panel: #f7f7f8;
  --white: #ffffff;
  --code-bg: #0b0b0c;
  --code-line: #26272b;
  --code-text: #e9e9ec;
  --code-dim: #9a9ca3;
  --code-string: #ffb48c;
  --pass: #c2410c;
  --display: 'Funnel Display', system-ui, sans-serif;
  --sans: 'Funnel Sans', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gutter: 64px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--ink);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 15px;
  font-weight: 500;
}

.nav a {
  color: var(--grey);
  text-decoration: none;
}

.nav a:hover {
  color: var(--ink);
}

/* Buttons and labels */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-accent {
  padding: 11px 18px;
  background: var(--accent);
  color: var(--ink);
  font-size: 15px;
}

.nav a.btn-accent {
  color: var(--ink);
}

.btn-dark {
  padding: 15px 24px;
  border: 0;
  background: var(--ink);
  color: var(--white);
}

.btn-outline {
  padding: 14px 23px;
  border: 1px solid var(--field-line);
  color: var(--ink);
}

.label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey);
}

.label::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--accent);
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-title {
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--grey);
  text-wrap: pretty;
}

/* Hero */

.hero .wrap {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding-top: 72px;
}

.hero h1 {
  max-width: 1000px;
  font-size: clamp(46px, 7.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 640px;
  font-size: clamp(18px, 1.7vw, 21px);
  color: var(--grey);
  text-wrap: pretty;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.bars {
  display: grid;
  grid-template-columns: repeat(64, minmax(0, 1fr));
  gap: 5px;
  align-items: end;
  height: 300px;
  margin-top: 56px;
  border-bottom: 1px solid var(--ink);
}

.bars i {
  height: var(--h);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--accent) 0%, #ffb48c 45%, #fff0e8 100%) bottom / 100% 300px no-repeat;
  transform-origin: bottom;
  animation-name: bar-rise, bar-breathe;
  animation-duration: 1s, 2.8s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1), ease-in-out;
  animation-iteration-count: 1, infinite;
  animation-direction: normal, alternate;
  animation-fill-mode: both, none;
  animation-delay: calc(var(--i) * 14ms), calc(1000ms + var(--i) * 70ms);
}

@keyframes bar-rise {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes bar-breathe {
  from { transform: scaleY(1); }
  to { transform: scaleY(0.8); }
}

/* Models */

.models .wrap {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-block: 96px 88px;
}

.split-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
}

.split-head .note {
  max-width: 330px;
  font-size: 15px;
  color: var(--grey);
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.model {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.model .art {
  height: 170px;
  background-size: 180% 180%;
  animation: art-drift 14s ease-in-out infinite alternate;
}

@keyframes art-drift {
  from { background-position: 0% 40%; }
  to { background-position: 100% 60%; }
}

.model .meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
}

.model .maker,
.model .specs {
  font-family: var(--mono);
  color: var(--grey);
}

.model .maker {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.model .specs {
  font-size: 13px;
}

.model h3 {
  font-size: 26px;
  letter-spacing: -0.02em;
}

.art-k3 { background-image: radial-gradient(circle at 28% 72%, var(--accent) 0%, #ff9a66 30%, #ffe1d1 62%, #ffffff 100%); }
.art-qwen { background-image: radial-gradient(ellipse at 75% 20%, #ffffff 0%, #ffe6d9 35%, #ff8a4d 75%, var(--accent) 100%); animation-delay: -3s; }
.art-v4pro { background-image: linear-gradient(200deg, var(--accent) 0%, #ffb48c 40%, #ffffff 100%); animation-delay: -6s; }
.art-glm { background-image: conic-gradient(from 210deg at 62% 44%, var(--accent), #ffd4bd, #ffffff, #ffb48c, var(--accent)); animation-delay: -9s; }
.art-flash { background-image: linear-gradient(155deg, #fff3ec 0%, #ffffff 40%, #ffc2a1 78%, var(--accent) 100%); animation-delay: -2s; }
.art-glmflash { background-image: radial-gradient(circle at 50% 110%, var(--accent) 0%, #ffb48c 35%, #ffffff 70%); animation-delay: -5s; }
.art-minimax { background-image: radial-gradient(circle at 82% 78%, var(--accent) 0%, #ffc4a3 26%, #ffffff 62%); animation-delay: -8s; }
.art-k27 { background-image: conic-gradient(from 90deg at 30% 30%, #ffffff, #ffe1d1, var(--accent), #ffffff); animation-delay: -11s; }

/* Ways to run */

.panel {
  background: var(--panel);
}

.ways .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: start;
  padding-block: 88px;
}

.ways-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.way-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--line-strong);
}

.way {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 0;
  border-top: 1px solid var(--line-strong);
}

.way-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.way h3 {
  font-size: 24px;
}

.way p {
  color: var(--grey);
}

.price-tag {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--grey);
  white-space: nowrap;
}

.price-tag.hot {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--ink);
}

/* Code card */

.code {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: var(--mono);
}

.code-bar {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--code-line);
  font-size: 12px;
  color: var(--code-dim);
}

.code pre {
  margin: 0;
  padding: 22px 24px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.75;
}

.code .k { color: var(--code-dim); }
.code .s { color: var(--code-string); }

.code-response {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 24px 22px;
  border-top: 1px solid var(--code-line);
  font-size: 14px;
}

.code-response .k {
  font-size: 12px;
}

.typed {
  display: inline-block;
  overflow: hidden;
  width: 0;
  white-space: nowrap;
  vertical-align: bottom;
  color: var(--white);
  animation: type-out 7s steps(44) 1s infinite;
}

@keyframes type-out {
  0% { width: 0; }
  55%, 100% { width: 44ch; }
}

.caret {
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
}

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

/* Dedicated */

.dedicated .wrap {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-block: 96px 88px;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: end;
}

.chart {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 28px 32px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.chart-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 24px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey);
}

.chart-head figcaption {
  font-size: 13px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend li::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend .avail::before { background: #ffd4bd; }
.legend .use::before { background: var(--accent); }
.legend .rate::before { width: 18px; height: 0; border-top: 2px dashed var(--ink); border-radius: 0; }

.plot {
  position: relative;
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 6px;
  height: 240px;
  border-bottom: 1px solid var(--ink);
}

.plot i {
  position: relative;
}

.plot i::before,
.plot i::after {
  content: '';
  position: absolute;
  bottom: 0;
}

.plot i::before {
  left: 0;
  right: 0;
  height: var(--a);
  border-radius: 4px 4px 0 0;
  background: #ffd4bd;
}

.plot i::after {
  left: 20%;
  right: 20%;
  height: var(--u);
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}

.plot .rate {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 64%;
  border-top: 2px dashed var(--ink);
}

.plot .now {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  border-left: 1.5px solid var(--ink);
  animation: sweep 12s linear infinite;
}

@keyframes sweep {
  from { left: 0%; }
  to { left: 100%; }
}

.axis {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey);
}

.footnote {
  max-width: 980px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--grey);
}

/* Testing */

.testing .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
  padding-block: 88px;
}

.testing .section-head {
  gap: 16px;
}

.report {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  font-family: var(--mono);
}

.report-head,
.report-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  font-size: 12px;
  color: var(--grey);
}

.report-head {
  border-bottom: 1px solid var(--line);
}

.report ol {
  margin: 0;
  padding: 10px 22px 6px;
  list-style: none;
  font-size: 14px;
}

.report li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f2;
}

.report li:last-child {
  border-bottom: 0;
}

.report li span:last-child {
  color: var(--pass);
}

.report-foot {
  border-top: 1px solid var(--line);
  background: #fff4ee;
  color: var(--ink);
  font-size: 13px;
}

.report-foot span:last-child {
  color: var(--grey);
}

.report li,
.report-foot {
  animation: line-in 0.5s ease-out both;
}

.report li:nth-child(1) { animation-delay: 0.2s; }
.report li:nth-child(2) { animation-delay: 0.5s; }
.report li:nth-child(3) { animation-delay: 0.8s; }
.report li:nth-child(4) { animation-delay: 1.1s; }
.report li:nth-child(5) { animation-delay: 1.4s; }
.report li:nth-child(6) { animation-delay: 1.7s; }
.report-foot { animation-delay: 2.1s; }

@keyframes line-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* Call to action */

.cta .wrap {
  padding-block: 88px;
}

.cta-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 48px;
  padding: 64px;
  border-radius: 24px;
  background: var(--accent);
}

.cta-card h2 {
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.cta-card p {
  max-width: 700px;
  margin-top: 18px;
  font-size: 19px;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--grey);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 28px;
  padding-block: 28px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.site-footer a {
  color: var(--grey);
}

/* Contact */

.page-head .wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-block: 72px 56px;
}

.page-head h1 {
  font-size: clamp(46px, 6.8vw, 88px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.page-head p {
  max-width: 620px;
  font-size: 20px;
  color: var(--grey);
}

.contact .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding-bottom: 88px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 14px;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0 14px;
  border: 1px solid var(--field-line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
}

.field input,
.field select {
  height: 48px;
}

.field textarea {
  min-height: 140px;
  padding-block: 12px;
  line-height: 1.5;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-top: 4px;
}

.form-foot a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--grey);
}

.partners {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px;
  border-radius: 16px;
  background: var(--peach);
  color: var(--peach-ink);
}

.partners .label {
  color: #5c3a2a;
}

.partners h2 {
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.partners ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--peach-line);
}

.partners li {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--peach-line);
  font-size: 15px;
}

.partners li strong {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
}

.partners .send {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
}

.partners a {
  color: var(--ink);
}

/* Short notice pages: thanks and form errors */

.notice {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-block: 96px;
}

.notice h1 {
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.notice p,
.notice ul {
  max-width: 620px;
  font-size: 19px;
  color: var(--grey);
}

/* Responsive */

@media (max-width: 1000px) {
  :root { --gutter: 32px; }
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ways .wrap,
  .testing .wrap,
  .two-col,
  .contact .wrap { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .split-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .cta-card { flex-direction: column; align-items: flex-start; padding: 48px; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; }
  .nav a:not(.btn) { display: none; }
  .hero .wrap { padding-top: 48px; }
  .bars { grid-template-columns: repeat(32, minmax(0, 1fr)); gap: 4px; height: 200px; margin-top: 40px; }
  .bars i { background-size: 100% 200px; }
  .bars i:nth-child(2n) { display: none; }
  .models .wrap,
  .dedicated .wrap { padding-block: 64px; }
  .ways .wrap,
  .testing .wrap,
  .cta .wrap { padding-block: 64px; }
  .chart { padding: 20px 16px 16px; }
  .plot { gap: 3px; height: 180px; }
  .code pre { font-size: 13px; padding: 18px; }
  .typed { width: auto; white-space: normal; animation: none; }
  .cta-card { padding: 32px 24px; }
  .form,
  .partners { padding: 24px 20px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .partners li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

@media (max-width: 520px) {
  .model-grid { grid-template-columns: minmax(0, 1fr); }
  .model .art { height: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bars i,
  .model .art,
  .plot .now,
  .caret,
  .report li,
  .report-foot { animation: none; }
  .typed { width: auto; animation: none; }
  .btn:hover { transform: none; }
}
