/* Landing page for samudracorp.web.id (plain HTML, outside the SolidJS bundle).
   Role values mirror :root in web/src/styles.css; flat design: no shadows, radius, or gradients. */
:root {
  color-scheme: light;
  --bg: #f3f6f3;
  --surface: #ffffff;
  --border: #e1e7e2;
  --guide: #d6ded8;
  --text: #15233b;
  --muted: #5d6b7f;
  --accent: #4e90f5;
  --accent-strong: #2f74e0;
  --highlight: #9ebeed;
  --tint: #eaf1fd;
  --success: #94c000;
  --success-strong: #4b6b03;
  --success-tint: #f1f7dc;
  --code-bg: #f6f8fa;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  --frame: 1180px;
  --pad: clamp(16px, 4vw, 40px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  overflow-x: hidden;
}

a {
  color: inherit;
}

code,
pre {
  font-family: var(--mono);
}

/* Header */
.nav {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--frame);
  margin: 0 auto;
  padding: 12px var(--pad);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 450;
}

.nav-links {
  display: flex;
  gap: 22px;
  margin: 0 auto;
  font-size: 14px;
}

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

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

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

.lang {
  display: flex;
  border: 1px solid var(--border);
}

.lang button {
  padding: 4px 9px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 12px var(--sans);
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  background: var(--tint);
  color: var(--text);
}

/* Buttons: solid accent with a darker right/bottom edge (a border, not a shadow). */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-right-width: 3px;
  border-bottom-width: 3px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent-strong);
  color: #fff;
}

.button.primary:hover {
  background: var(--accent-strong);
}

.button.small {
  padding: 6px 12px;
  font-size: 14px;
}

.button:focus-visible,
.chip:focus-visible,
.tab:focus-visible,
.lang button:focus-visible,
.row-button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--highlight);
  outline-offset: 2px;
}

/* Page frame: vertical guide lines at the content edges, square markers where section rules
   cross them. */
main {
  max-width: var(--frame);
  margin: 0 auto;
  border-left: 1px dashed var(--guide);
  border-right: 1px dashed var(--guide);
}

section {
  position: relative;
  padding: clamp(48px, 8vw, 96px) var(--pad);
  border-top: 1px dashed var(--guide);
}

section:first-child {
  border-top: 0;
}

section::before,
section::after {
  content: "";
  position: absolute;
  top: -4px;
  width: 7px;
  height: 7px;
  background: var(--bg);
  border: 1px solid var(--guide);
}

section::before {
  left: -4px;
}

section::after {
  right: -4px;
}

section:first-child::before,
section:first-child::after {
  display: none;
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 {
  font-size: clamp(38px, 6vw, 60px);
}

h2 {
  font-size: clamp(30px, 4.4vw, 44px);
}

h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}

mark {
  padding: 0 0.12em;
  background: var(--highlight);
  color: var(--text);
}

.lead {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 32px;
}

.section-head .lead {
  margin-top: 12px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
}

.badge::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--success);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 32px;
}

.link-arrow {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.link-arrow::after {
  content: " →";
}

/* Free daily tokens promo and the tokens-served counter (both hidden until /public/models says so) */
.promo {
  max-width: 560px;
  margin-top: 28px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--success) 45%, var(--border));
  background: var(--success-tint);
  font-size: 14px;
  line-height: 1.5;
}

.promo-label {
  display: inline-block;
  margin-bottom: 6px;
  padding: 1px 6px;
  background: var(--success-strong);
  color: var(--surface);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.promo strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
}

.promo span:last-child {
  color: var(--muted);
}

.served {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 32px 0 0;
}

.served[hidden] {
  display: none;
}

.served strong {
  font-size: clamp(36px, 9vw, 56px);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.served span {
  color: var(--muted);
  font-size: 15px;
}

/* Price chart */
.chart {
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.chart-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.legend {
  display: flex;
  gap: 14px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border: 1px solid var(--accent-strong);
}

.dot.list {
  background: var(--surface);
  border-color: var(--muted);
}

.chart-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.row-button {
  display: grid;
  grid-template-columns: minmax(96px, 38%) 1fr;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 8px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: 13px var(--mono);
  text-align: left;
  cursor: pointer;
}

.row-button[aria-pressed="true"] {
  background: var(--tint);
}

.row-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track {
  position: relative;
  height: 12px;
}

.track .span {
  position: absolute;
  top: 5px;
  height: 0;
  border-top: 2px dotted var(--highlight);
}

.track .dot {
  position: absolute;
  top: 1px;
  margin-left: -5px;
}

.axis {
  display: grid;
  grid-template-columns: minmax(96px, 38%) 1fr;
  gap: 12px;
  padding: 6px 8px 0;
  color: var(--muted);
  font: 11px var(--mono);
}

.axis-ticks {
  position: relative;
  height: 14px;
}

.axis-ticks span {
  position: absolute;
  transform: translateX(-50%);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
}

.stat-list {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.stat-value {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.stat-value small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 450;
}

.strike {
  color: var(--muted);
  font-size: 12px;
  text-decoration: line-through;
}

.save {
  color: var(--success-strong);
}

.note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* Model list */
.models {
  border-top: 1px solid var(--border);
}

.model {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
}

.model-name {
  font-size: 19px;
  font-weight: 600;
}

.model-id {
  margin: 2px 0 8px;
  color: var(--muted);
  font: 13px var(--mono);
}

.tag {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 8px;
  margin-bottom: 4px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  font-size: 12px;
}

.tag.save {
  background: var(--success-tint);
  border-color: color-mix(in srgb, var(--success) 45%, var(--border));
}

.tag.mono {
  font-family: var(--mono);
}

.price {
  text-align: right;
}

.price .now {
  font-size: 22px;
  font-weight: 600;
}

.price .unit {
  color: var(--muted);
  font-size: 12px;
}

.empty {
  padding: 24px 0;
  color: var(--muted);
}

/* Code */
.picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.picker-label {
  margin-right: 4px;
  color: var(--muted);
  font-size: 13px;
}

.chip {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: 13px var(--mono);
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--tint);
  border-color: var(--accent);
}

.code {
  border: 1px solid var(--border);
  background: var(--surface);
}

.code-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

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

.tab {
  padding: 5px 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 600 13px var(--sans);
  cursor: pointer;
}

.tab[aria-selected="true"] {
  border-color: var(--border);
  background: var(--code-bg);
  color: var(--text);
}

.code pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  background: var(--code-bg);
  font-size: 13px;
  line-height: 1.7;
}

/* Privacy */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pillar {
  padding: 0 24px;
  border-left: 1px solid var(--border);
}

.pillar:first-child {
  padding-left: 0;
  border-left: 0;
}

.pillar p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.pillar-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent-strong);
  font: 600 13px var(--mono);
}

/* FAQ */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 32px;
}

details {
  border-bottom: 1px solid var(--border);
}

details:first-child {
  border-top: 1px solid var(--border);
}

summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

details[open] summary::after {
  content: "−";
}

details p {
  margin: 0 0 16px;
  color: var(--muted);
}

/* Closing call to action */
.closing {
  text-align: center;
}

.closing .lead {
  margin-left: auto;
  margin-right: auto;
}

.closing .cta-row {
  justify-content: center;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: var(--frame);
  margin: 0 auto;
  padding: 24px var(--pad);
  color: var(--muted);
  font-size: 13px;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-inner p {
  max-width: 560px;
  margin: 0;
}

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }

  .nav-actions {
    margin-left: auto;
  }

  .hero,
  .faq {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .pillar:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .model {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .model-info {
    grid-column: 1 / -1;
  }

  .price {
    text-align: left;
  }

  .price .now {
    font-size: 18px;
  }
}

@media (max-width: 560px) {
  .brand small {
    display: none;
  }

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

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

  .pillar,
  .pillar:nth-child(3) {
    padding: 0;
    border-left: 0;
  }

  /* Chart rows: the model id above its track, so long ids are not cut off. */
  .row-button,
  .axis {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .axis > span:first-child {
    display: none;
  }
}

/* Below the frame width the guides would sit on the viewport edge (and their markers past it). */
@media (max-width: 1200px) {
  main {
    border-left: 0;
    border-right: 0;
  }

  section::before,
  section::after {
    display: none;
  }
}

@media (max-width: 380px) {
  .brand-name {
    display: none;
  }
}
