/* ============================================================
   Crest & Route — the design system of Putra Kramat Sejahtera.

   The language comes from the logo: a crest, sharp corners, one-pixel
   rules, ink on warm paper, teal for action and red for the accent.
   Nothing is rounded. There are no decorative gradients; the only depth
   comes from photography, borders, and contrast.
   ============================================================ */

:root {
  --ink: #010202;
  --ink-2: #2f3442;
  --paper: #f4f1e8;
  --paper-2: #e9e4d6;
  --paper-3: #dcd5c3;
  --surface: #ffffff;
  --teal: #1aa2b5;
  --teal-deep: #134e67;
  --teal-soft: #e2f0f2;
  --red: #d50907;
  --red-soft: #fbe6e4;
  --gold: #f4b223;
  --gold-soft: #fbf0d8;
  --line: #d5cdbb;
  --line-strong: #b3a992;
  --muted: #6c6558;
  --muted-2: #8e8677;

  --font-display: "Bebas Neue", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Poppins", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 0;
  --radius-sm: 0;
  --radius-xs: 0;
  --shell-max: 1180px;
  --sidebar-w: 236px;
  --topbar-h: 60px;
}

@font-face {
  font-family: "Poppins";
  src: url("/static/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/static/fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/static/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/static/fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("/static/fonts/Poppins-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Bebas Neue";
  src: url("/static/fonts/BebasNeue-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

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

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

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

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

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

:focus-visible {
  outline: 2px solid var(--teal-deep);
  outline-offset: 2px;
}

::selection {
  color: var(--ink);
  background: var(--gold);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 60;
  padding: 8px 12px;
  color: var(--paper);
  background: var(--ink);
  font-size: 12px;
  font-weight: 600;
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: none;
}

/* ------------------------------------------------------------
   Type
   ------------------------------------------------------------ */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.86;
  text-transform: uppercase;
}

.display-xl {
  font-size: clamp(3.4rem, 8vw, 6.6rem);
}
.display-lg {
  font-size: clamp(2.6rem, 5vw, 4rem);
}
.display-md {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
}
.display-sm {
  font-size: 1.6rem;
  letter-spacing: 0.03em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--red);
}

.eyebrow.is-light {
  color: var(--teal);
}
.eyebrow.is-light::before {
  background: var(--gold);
}

.lede {
  max-width: 58ch;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.rule {
  height: 1px;
  background: var(--ink);
  border: 0;
}

.rule-soft {
  height: 1px;
  background: var(--line);
  border: 0;
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:hover {
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.btn:active {
  transform: translate(1px, 1px);
}

.btn-primary {
  color: var(--paper);
  background: var(--red);
  border-color: var(--red);
}
.btn-primary:hover {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.btn-teal {
  color: var(--paper);
  background: var(--teal-deep);
  border-color: var(--teal-deep);
}
.btn-teal:hover {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.btn-sm {
  min-height: 32px;
  padding: 0 12px;
  font-size: 10.5px;
}

.btn .icon {
  width: 15px;
  height: 15px;
}

/* ------------------------------------------------------------
   Surfaces
   ------------------------------------------------------------ */

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

.card-ink {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}

.media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.tag {
  display: inline-block;
  padding: 3px 8px;
  color: var(--teal-deep);
  background: var(--teal-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag.is-red {
  color: var(--red);
  background: var(--red-soft);
}

.tag.is-gold {
  color: #6b4a05;
  background: var(--gold-soft);
}

.tag.is-ink {
  color: var(--paper);
  background: var(--ink);
}

/* ------------------------------------------------------------
   Forms
   ------------------------------------------------------------ */

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

.field > span,
.field-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-family: var(--font-sans);
  font-size: 14px;
  appearance: none;
}

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

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

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

.form-grid .span-2 {
  grid-column: 1 / -1;
}

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

/* ------------------------------------------------------------
   Tables
   ------------------------------------------------------------ */

.table {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
}

.table th {
  padding: 10px 12px;
  color: var(--muted);
  background: var(--paper-2);
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

.table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover td {
  background: var(--paper);
}

.table .num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------
   Utility
   ------------------------------------------------------------ */

.wrap {
  width: min(var(--shell-max), calc(100% - 48px));
  margin: 0 auto;
}

.stack {
  display: flex;
  flex-direction: column;
}

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

.gap-xs {
  gap: 6px;
}
.gap-sm {
  gap: 10px;
}
.gap-md {
  gap: 16px;
}
.gap-lg {
  gap: 28px;
}

.grow {
  flex: 1;
}

.hide-sm {
  display: initial;
}

@media (max-width: 860px) {
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .hide-sm {
    display: none;
  }
}

/* Native date fields follow the same sharp form language. */
input[type="date"] {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  font-family: var(--font-sans);
  font-size: 13px;
  color-scheme: light;
}

input[type="date"]:focus {
  border-color: var(--teal-deep);
  outline: none;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.65;
}
