/* Toyota of Pullman — public service-coupon landing page.
   Mobile-first. No external requests; system font stack only. */

:root {
  --red: #eb0a1e;
  --red-dark: #c00812;
  --ink: #1a1a1a;
  --ink-soft: #55565a;
  --ink-faint: #8a8b8f;
  --paper: #ffffff;
  --bg: #f2f3f5;
  --line: #d8dade;
  --dash: #b9040f;
  --radius: 16px;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

/* Enforce the hidden attribute even on elements that set their own display
   (e.g. .actions / .coupon__meta use display:flex, which would otherwise
   override the UA [hidden] rule and leak through before the JS toggles). */
[hidden] { display: none !important; }

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

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 30rem;
  margin: 0 auto;
  padding: clamp(0.75rem, 4vw, 2rem) clamp(0.75rem, 4vw, 1.25rem)
           calc(clamp(0.75rem, 4vw, 2rem) + env(safe-area-inset-bottom, 0));
}

/* ---------------------------------------------------------------- coupon card -- */

.coupon {
  position: relative;
  background: var(--paper);
  border: 2px dashed var(--dash);
  border-radius: var(--radius);
  padding: clamp(1.1rem, 5vw, 1.75rem);
  box-shadow: 0 10px 30px rgba(20, 20, 25, 0.08);
}

/* notch accents on the sides, like a real torn coupon */
.coupon::before,
.coupon::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  background: var(--bg);
  border: 2px dashed var(--dash);
  border-radius: 50%;
  transform: translateY(-50%);
}
.coupon::before { left: -13px; }
.coupon::after { right: -13px; }

.coupon__brand {
  text-align: center;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}
.wordmark--center { display: flex; margin: 0 auto 0.5rem; }

.wordmark__toyota {
  font-size: clamp(1.5rem, 8vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--red);
}
.wordmark__pullman {
  font-size: clamp(0.7rem, 3.4vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.34em;
  color: var(--ink);
  margin-top: 0.28rem;
  padding-left: 0.34em; /* balance the tracking */
}

.coupon__kind {
  margin-top: 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.coupon__body { padding: 1.1rem 0 0.4rem; text-align: center; }

.coupon__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 6.5vw, 1.7rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.coupon__desc {
  margin: 0 auto 0.9rem;
  max-width: 24rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------------- offer -- */

.offer { margin: 1rem 0 0.4rem; }

.offer__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
}
.offer__strike {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink-faint);
  text-decoration: line-through;
}
.offer__amount {
  font-size: clamp(2.6rem, 14vw, 3.4rem);
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.02em;
}

.offer__headline { display: flex; flex-direction: column; align-items: center; }
.offer__big {
  font-size: clamp(2.4rem, 13vw, 3.2rem);
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.01em;
  line-height: 1;
}
.offer__label {
  margin-top: 0.4rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ----------------------------------------------------------------------- code -- */

.code {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.1rem;
  padding: 0.5rem 0.9rem;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  background: #fafafb;
}
.code__label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.code__value {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
}

/* ----------------------------------------------------------------------- meta -- */

.coupon__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  text-align: center;
}
.meta__expiry {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
}
.meta__serial {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.coupon__fine {
  margin: 0.85rem 0 0;
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--ink-faint);
  text-align: center;
}

.coupon__footer {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line);
  text-align: center;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* -------------------------------------------------------------------- actions -- */

.actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.btn {
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.05s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn__ico { width: 1.2em; height: 1.2em; flex: none; }

.btn--primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 6px 16px rgba(235, 10, 30, 0.28);
}
.btn--primary:hover { background: var(--red-dark); }

.btn--ghost {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--ink-faint); }

.hint {
  margin: 1rem 0 0.25rem;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.visit {
  margin: 0.6rem 0 0;
  text-align: center;
  font-size: 0.85rem;
}
.visit a { color: var(--red); font-weight: 700; text-decoration: none; }
.visit a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------- fallback -- */

.fallback {
  background: var(--paper);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 7vw, 2.25rem);
  text-align: center;
  box-shadow: 0 10px 30px rgba(20, 20, 25, 0.08);
}
.fallback__title {
  margin: 0.6rem 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 800;
}
.fallback__text {
  margin: 0 auto 1.4rem;
  max-width: 26rem;
  color: var(--ink-soft);
}
.fallback__actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0;
}

/* --------------------------------------------------------------- small screens -- */

@media (max-width: 360px) {
  .actions { flex-direction: column; }
}

/* ------------------------------------------------------------------- desktop -- */

@media (min-width: 640px) {
  .page { padding-top: 2.75rem; }
  .coupon { padding: 2rem 2.25rem; }
}

/* --------------------------------------------------------------------- print -- */

@media print {
  :root { --bg: #fff; }
  body { background: #fff; }
  .page { max-width: none; padding: 0; }
  .no-print { display: none !important; }

  .coupon {
    border: 2px dashed #000;
    border-radius: 12px;
    box-shadow: none;
    color: #000;
    page-break-inside: avoid;
    margin: 0.4in;
  }
  .coupon::before, .coupon::after { display: none; }

  .wordmark__toyota,
  .offer__amount,
  .offer__big { color: #000 !important; }

  .coupon__desc,
  .offer__label,
  .offer__strike,
  .meta__serial,
  .coupon__fine,
  .coupon__footer,
  .coupon__kind { color: #000 !important; }

  .code { background: #fff; }
}
