:root {
  /* Sampled from the printed cover: paper yellow, tag gold, ink maroon */
  --yellow: #eeda68;
  --yellow-deep: #ddc247;
  --gold: #d9a94c;
  --gold-deep: #c0902f;
  --maroon: #6b2712;
  --maroon-deep: #4f1c0c;
  --bg: #faf3cf;
  --card: #ffffff;
  --ink: #2b2320;
  --ink-soft: #5a4f47;
  --line: #e5d7a8;
  --error: #b3402f;
  --error-bg: #fbeceb;
  --success: #2f6d29;
  --success-bg: #e4f2e1;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(60, 40, 10, 0.06), 0 4px 14px rgba(60, 40, 10, 0.1);
  --serif-en: "Nanum Myeongjo", "Noto Serif Kannada", serif;
  --serif-kn: "Noto Serif Kannada", "Nanum Myeongjo", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif-en);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.kn {
  font-family: var(--serif-kn);
  font-size: 1.08em;
}

h1,
h2,
h3 {
  font-family: var(--serif-en);
  color: var(--maroon);
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 .kn,
h2 .kn,
h3 .kn {
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

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

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

/* Header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
  /* Same color as the page (not a white bar) but must stay opaque — this
     is sticky, so without a solid background scrolled content shows
     through behind the brand/nav text instead of passing cleanly under it. */
  background: var(--bg);
}

.brand {
  text-decoration: none;
  color: var(--maroon);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
  display: inline-block;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1;
  border-bottom: 1px solid transparent;
}

.site-nav a:hover {
  color: var(--maroon);
  border-bottom-color: var(--maroon);
}

main {
  flex: 1;
}

/* Hero / landing */

.hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-cover {
  justify-self: center;
  width: min(320px, 70vw);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-copy {
  text-align: center;
}

.eyebrow {
  color: var(--ink-soft);
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.hero-copy h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  margin-bottom: 0.15em;
}

.subtitle {
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.desc {
  color: var(--ink-soft);
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}

.price-row {
  margin: 1.5rem 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
}

.price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--maroon);
}

.price-note {
  color: var(--ink-soft);
  font-size: 1rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: var(--radius);
  font-family: var(--serif-en);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  opacity: 0.9;
}

.btn-primary {
  background: var(--maroon);
  color: var(--card);
}

.btn-primary:hover {
  background: var(--maroon-deep);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--card);
  color: var(--maroon);
  border: 1.5px solid var(--maroon);
}

.btn-secondary:hover {
  background: var(--bg);
}

/* Checkout form */

.checkout,
.track,
.confirm {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 5rem;
}

.checkout h1,
.track h1 {
  font-size: 1.9rem;
  margin-bottom: 1.5rem;
}

fieldset {
  border: none;
  padding: 0;
  margin: 0 0 2rem;
}

legend {
  font-family: var(--serif-en);
  font-weight: 700;
  color: var(--maroon);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  padding: 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  width: 100%;
  padding-bottom: 0.5rem;
}

.field {
  margin-bottom: 1.1rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.optional {
  font-weight: 400;
  color: var(--ink-soft);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-family: var(--serif-en);
  font-size: 1rem;
  transition: border-color 0.15s ease;
}

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

input.invalid,
select.invalid {
  border-color: var(--error);
}

.input-prefix {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}

.input-prefix span {
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 0.95rem;
  border-right: 1.5px solid var(--line);
}

.input-prefix input {
  border: none;
  border-radius: 0;
  flex: 1;
}

.input-prefix:focus-within {
  border-color: var(--maroon);
}

.field-error {
  color: var(--error);
  font-size: 0.85rem;
  margin: 0.35rem 0 0;
  min-height: 0;
  display: none;
}

.field-error.visible {
  display: block;
}

.field-warning {
  color: var(--maroon);
  font-size: 0.85rem;
  margin: 0.5rem 0 0;
  background: var(--yellow);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%235a4f47' stroke-width='1.6' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.2rem;
}

/* Quantity stepper */

.qty-group {
  margin-bottom: 2rem;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}

.qty-stepper button {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--bg);
  color: var(--maroon);
  font-size: 1.3rem;
  cursor: pointer;
}

.qty-stepper button:hover {
  background: var(--yellow);
}

.qty-stepper input {
  width: 60px;
  text-align: center;
  border: none;
  border-left: 1.5px solid var(--line);
  border-right: 1.5px solid var(--line);
  height: 44px;
  padding: 0;
  font-size: 1.05rem;
  -moz-appearance: textfield;
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Order summary */

.order-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--maroon);
  font-size: 1.15rem;
}

.form-error {
  color: var(--error);
  background: var(--error-bg);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  font-size: 0.9rem;
}

#submit-btn,
#track-submit {
  width: 100%;
}

/* Confirmation page */

.confirm {
  text-align: center;
}

.confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.6rem;
  font-weight: 800;
}

.confirm-icon-ok {
  background: var(--success-bg);
  color: var(--success);
}

.confirm-icon-pending {
  background: var(--yellow);
  color: var(--maroon);
}

.confirm-icon-error {
  background: var(--error-bg);
  color: var(--error);
}

.confirm-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  text-align: left;
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.confirm-row:last-child {
  border-bottom: none;
}

.confirm-row span:first-child {
  color: var(--ink-soft);
}

.confirm-note {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* Track page */

.track-sub {
  color: var(--ink-soft);
}

.track-results {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.order-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.3rem;
}

.order-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.order-card-id {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.status-pill {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
}

.status-paid {
  background: var(--success-bg);
  color: var(--success);
}

.status-created,
.status-pending {
  background: var(--yellow);
  color: var(--maroon);
}

.status-failed,
.status-cancelled,
.status-expired {
  background: var(--error-bg);
  color: var(--error);
}

.order-card-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--ink-soft);
  padding: 0.15rem 0;
}

.track-empty {
  color: var(--ink-soft);
  text-align: center;
  padding: 2rem 0;
}

/* Footer */

.site-footer {
  margin-top: 3rem;
}

.site-footer-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.site-footer-inner p {
  margin: 0.3rem 0;
}

.site-footer-inner .kn {
  color: var(--maroon);
  font-weight: 700;
  font-size: 1.15rem;
}

.footer-links a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--maroon);
}

.footer-links span {
  margin: 0 0.4rem;
}

.footer-fine {
  opacity: 0.7;
}

/* Responsive */

@media (min-width: 720px) {
  .hero {
    grid-template-columns: 340px 1fr;
    text-align: left;
  }

  .hero-copy {
    text-align: left;
  }

  .desc {
    margin-left: 0;
  }

  .price-row {
    justify-content: flex-start;
  }

  .hero-cover {
    justify-self: start;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .field-row {
    grid-template-columns: 1fr;
  }

  .site-header {
    padding: 1rem;
  }
}
