/* Kedai Kopi Aman — style-03 "Cold Store"
   Dark, technical, precise. Roast date and price are never buried. */

:root {
  --bg: #0E1113;
  --fg: #EDF0F2;
  --accent: #4FC1E9;
  --muted: #8A949B;
  --surface: #181D20;

  /* borders are tints of fg (#EDF0F2 = 237,240,242) — no new hues */
  --border: rgba(237, 240, 242, 0.12);
  --border-strong: rgba(237, 240, 242, 0.22);

  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius: 12px;

  /* spacing scale — multiples of spacing_unit (12px) */
  --sp-1: 12px;
  --sp-2: 24px;
  --sp-3: 36px;
  --sp-4: 48px;
  --sp-5: 60px;
  --sp-6: 72px;
  --sp-8: 96px;

  /* type scale — base 16px, ratio 1.333 */
  --text-body: 1rem;
  --text-small: 0.75rem;
  --text-h4: 1.333rem;
  --text-h3: 1.777rem;
  --text-h2: 2.368rem;
  --text-h1: 3.157rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--sp-2);
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }

p { margin: 0 0 var(--sp-2); color: var(--fg); }
p.lede { color: var(--muted); font-size: var(--text-h4); max-width: 42em; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--sp-3);
}

/* ---------- header / nav ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: var(--sp-2) 0;
  position: sticky;
  top: 0;
  background: rgba(14, 17, 19, 0.92);
  backdrop-filter: blur(6px);
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-h4);
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover { text-decoration: none; color: var(--accent); }

.brand .dot { color: var(--accent); }

nav.primary-nav ul {
  list-style: none;
  display: flex;
  gap: var(--sp-3);
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav.primary-nav a {
  color: var(--muted);
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  transition: color 0.15s ease;
}

nav.primary-nav a:hover,
nav.primary-nav a[aria-current="page"] {
  color: var(--fg);
  text-decoration: none;
}

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

.hero {
  padding: var(--sp-8) 0 var(--sp-6);
  border-bottom: 1px solid var(--border);
}

.hero h1 { max-width: 16em; }

.hero .lede { margin-bottom: var(--sp-4); }

.cta-row {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-body);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  text-decoration: none;
  transform: translateY(-1px);
  filter: brightness(1.12);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  text-decoration: none;
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- generic section ---------- */

section {
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type { border-bottom: none; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

.eyebrow {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: var(--text-small);
  color: var(--accent);
  display: block;
  margin-bottom: var(--sp-1);
}

/* ---------- bean cards / grid ---------- */

.bean-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--sp-2);
}

.bean-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.bean-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.bean-card h3 {
  font-size: var(--text-h4);
  margin-bottom: 0;
}

.bean-card .origin {
  color: var(--muted);
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.bean-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-1);
  margin-top: var(--sp-1);
  padding-top: var(--sp-1);
  border-top: 1px dashed var(--border);
}

.roast-tag {
  font-family: var(--font-heading);
  font-size: var(--text-small);
  color: var(--accent);
  background: rgba(79, 193, 233, 0.1);
  border: 1px solid rgba(79, 193, 233, 0.35);
  border-radius: 999px;
  padding: 2px var(--sp-1);
  white-space: nowrap;
}

.price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-h4);
  color: var(--fg);
}

.bean-card a.view {
  font-size: var(--text-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--sp-1);
}

/* ---------- filter bar ---------- */

.filter-bar {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-4);
}

.filter-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-1) var(--sp-2);
}

.filter-group span.label {
  display: block;
  font-size: var(--text-small);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.filter-group .options {
  display: flex;
  gap: var(--sp-1);
  flex-wrap: wrap;
}

.filter-group .options span {
  font-size: var(--text-small);
  color: var(--fg);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 2px 10px;
}

.filter-group .options span.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- tables ---------- */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-body);
}

th, td {
  text-align: left;
  padding: var(--sp-1) var(--sp-2);
  border-bottom: 1px solid var(--border);
}

th {
  font-family: var(--font-heading);
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

td .price-inline {
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 700;
}

/* ---------- bean detail page ---------- */

.bean-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.bean-header .origin-line {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-small);
}

.stamp {
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--sp-2);
  background: rgba(79, 193, 233, 0.06);
  min-width: 240px;
}

.stamp .stamp-label {
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
}

.stamp .stamp-value {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: 700;
}

.stamp .stamp-sub {
  color: var(--muted);
  font-size: var(--text-small);
  margin-top: 4px;
}

.notes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: var(--sp-1);
  flex-wrap: wrap;
}

.notes-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px var(--sp-2);
  font-size: var(--text-small);
}

.buy-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-width: 420px;
}

.buy-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-1) 0;
  border-bottom: 1px solid var(--border);
}

.buy-option:last-of-type { border-bottom: none; }

/* ---------- forms ---------- */

form.stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-width: 480px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: var(--text-small);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input, textarea {
  font-family: var(--font-body);
  font-size: var(--text-body);
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: var(--sp-1) var(--sp-2);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea { resize: vertical; min-height: 120px; }

button.btn {
  font-family: var(--font-heading);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: none;
  align-self: flex-start;
}

/* ---------- two column ---------- */

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-4);
}

.map-placeholder {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  min-height: 216px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- process steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-2);
}

.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-2);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-heading);
  color: var(--accent);
  font-size: var(--text-h4);
  margin-bottom: var(--sp-1);
}

/* ---------- footer ---------- */

footer.site-footer {
  padding: var(--sp-6) 0 var(--sp-4);
  color: var(--muted);
  font-size: var(--text-small);
}

footer.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

footer.site-footer h4 {
  color: var(--fg);
  font-size: var(--text-body);
  margin-bottom: var(--sp-1);
}

footer.site-footer nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

footer.site-footer nav a { color: var(--muted); }
footer.site-footer nav a:hover { color: var(--accent); }

footer.site-footer .legal {
  margin-top: var(--sp-4);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--border);
  width: 100%;
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  :root {
    --text-h1: 2.368rem;
    --text-h2: 1.777rem;
  }

  .site-header .container { flex-direction: column; align-items: flex-start; gap: var(--sp-1); }
  nav.primary-nav ul { gap: var(--sp-2); }

  .two-col { grid-template-columns: 1fr; }

  .bean-header { flex-direction: column; }

  footer.site-footer .container { flex-direction: column; }
}
