/* 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: 64px;
}

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: var(--accent);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand svg {
  flex-shrink: 0;
}

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

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

.nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 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-nav {
  padding: 7px 14px;
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
}

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

.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;
}

/* Measuring instrument in the hero: a graduated scale, measured bars and the reserved line */

.gauge {
  margin: 44px 0 0;
  border: 1px solid var(--ink);
}

.gauge-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gauge-head span:last-child {
  color: var(--grey);
}

.gauge-body,
.gauge-axis {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 150px;
}

.gauge-body {
  padding-top: 28px;
}

.gauge-scale,
.gauge-plot,
.gauge-key {
  position: relative;
  height: 280px;
}

.gauge-scale {
  border-right: 1px solid var(--ink);
}

.gauge-scale i {
  position: absolute;
  right: 0;
  bottom: var(--y);
  width: 7px;
  border-top: 1px solid var(--ink);
}

.gauge-scale i.major {
  width: 14px;
}

.gauge-scale span {
  position: absolute;
  right: 18px;
  bottom: var(--y);
  transform: translateY(50%);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--grey);
}

.gauge-plot {
  display: grid;
  grid-template-columns: repeat(48, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
  padding: 0 8px;
  background-image:
    linear-gradient(to top, #ffd3be 1px, transparent 1px),
    linear-gradient(to top, #fff0e8 1px, transparent 1px),
    linear-gradient(to right, #fff0e8 1px, transparent 1px);
  background-size: 100% 12.5%, 100% 2.5%, 16px 100%;
  background-position: left bottom;
}

.gauge-plot i {
  position: relative;
  height: var(--h);
  background: var(--accent);
  opacity: 0.88;
  transform-origin: bottom;
  animation: bar-rise 1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(300ms + var(--i) * 18ms);
}

.gauge-plot i::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -2px;
  right: -2px;
  border-top: 2px solid var(--ink);
}

.gauge-plot .reserved {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 50%;
  border-top: 1.5px dashed var(--ink);
}

.gauge-plot .reserved-label {
  display: none;
}

.gauge-plot .scan {
  position: absolute;
  top: -8px;
  bottom: 0;
  left: 0;
  border-left: 1px solid var(--ink);
  animation: sweep 9s linear infinite;
}

.gauge-key span {
  position: absolute;
  left: 14px;
  bottom: 50%;
  transform: translateY(50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--mono);
  font-size: 12px;
}

.gauge-key small {
  font-size: 12px;
  color: var(--grey);
}

.gauge-axis {
  padding: 10px 0 14px;
}

.gauge-axis div {
  display: flex;
  justify-content: space-between;
  padding: 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--grey);
}

.hero .footnote {
  max-width: none;
  margin-top: -12px;
  font-family: var(--mono);
  font-size: 12px;
}

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

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

/* Ruler used as a divider between sections */

.ruler {
  margin-top: 64px;
  height: 18px;
  border-bottom: 1px solid var(--ink);
  background-image:
    repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(to right, var(--ink) 0 1px, transparent 1px 120px);
  background-size: 100% 7px, 100% 18px;
  background-position: left bottom;
  background-repeat: no-repeat;
}

/* 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;
}

/* Each card shows an animated root-two sheet; the animation lives inside the SVG file */
.model .sheet {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  border-bottom: 1px solid var(--line);
  background: #fffbf8;
}

.model .sheet img {
  width: 108px;
  height: 151px;
}

.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;
}

/* 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: center;
}

.two-col .section-head {
  gap: 18px;
}

.readout {
  margin: 0;
  border: 1px solid var(--ink);
  font-family: var(--mono);
  font-size: 14px;
}

.readout-head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--ink);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.readout dl {
  margin: 0;
  padding: 4px 18px;
}

.readout dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.readout dl div:last-child {
  border-bottom: 0;
}

.readout dt {
  color: var(--grey);
}

.readout dd {
  margin: 0;
  text-align: right;
}

.readout .hot {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent-soft);
}

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

/* Testing */

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

.standards .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 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,
  .standards .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; }
  .brand { gap: 10px; font-size: 13px; letter-spacing: 0.12em; }
  .btn-nav { padding: 6px 12px; font-size: 13px; }
  .hero .wrap { padding-top: 48px; }
  .gauge-body,
  .gauge-axis { grid-template-columns: 44px minmax(0, 1fr); }
  .gauge-key,
  .gauge-axis > span:last-child { display: none; }
  .gauge-scale,
  .gauge-plot { height: 200px; }
  .gauge-scale span { right: 16px; font-size: 10px; }
  .gauge-plot { grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; padding: 0 6px; }
  .gauge-plot i:nth-of-type(2n) { display: none; }
  .gauge-plot .reserved-label {
    display: flex;
    align-items: center;
    gap: 6px;
    position: absolute;
    top: 6px;
    right: 6px;
    font-family: var(--mono);
    font-size: 11px;
  }
  .gauge-plot .reserved-label::before {
    content: '';
    width: 16px;
    border-top: 1.5px dashed var(--ink);
  }
  .models .wrap,
  .dedicated .wrap { padding-block: 64px; }
  .ways .wrap,
  .standards .wrap,
  .cta .wrap { padding-block: 64px; }
  .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 .sheet { height: 170px; }
  .model .sheet img { width: 90px; height: 126px; }
}

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