/* ============================================================
   PISO WIFI SECTION 6 — shared design system
   Reference: a bulletin board next to the vendo machine, papers
   taped up, tickets with punched holes, hand painted sari sari
   store signage. Warm kraft paper, poster type, coin gold.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=Work+Sans:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --paper: #ede3c8;
  --paper-light: #fbf6e8;
  --ink: #211d15;
  --ink-soft: #5a5340;
  --coin: #e8a93a;
  --coin-dark: #b97f1c;
  --red: #c8412a;
  --blue: #2e6f9e;
  --green: #4c7a3d;
  --line: rgba(33, 29, 21, 0.18);
  --shadow: rgba(33, 29, 21, 0.22);

  --font-display: 'Archivo Black', 'Arial Black', sans-serif;
  --font-body: 'Work Sans', 'Segoe UI', sans-serif;
  --font-mono: 'Space Mono', 'Courier New', monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(33, 29, 21, 0.06) 1px, transparent 0);
  background-size: 18px 18px;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

a {
  color: inherit;
}

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

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 18px 64px;
}

/* ---------- masthead ---------- */
.masthead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 0 8px;
}

.masthead .coin-badge {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--coin);
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  transform: rotate(-6deg);
}

.masthead .title {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--ink-soft);
}

.masthead .title strong {
  display: block;
  font-size: 15px;
  color: var(--ink);
  letter-spacing: 0.04em;
}

/* ---------- back link (subpages) ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 18px 0 6px;
  padding: 8px 14px 8px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper-light);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--shadow);
}

.back-link:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow);
}

/* ---------- hero ---------- */
.hero {
  padding: 18px 0 8px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 9vw, 46px);
  line-height: 1.02;
  margin: 0 0 12px;
  color: var(--ink);
}

.hero p {
  margin: 0;
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 40ch;
}

.hero .tape {
  display: inline-block;
  background: var(--coin);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  transform: rotate(-2deg);
  margin-bottom: 10px;
  border: 1.5px solid var(--ink);
}

/* ---------- ticket cards ---------- */
.tickets {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 22px;
}

.ticket {
  position: relative;
}

.ticket a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 18px 20px;
  text-decoration: none;
  box-shadow: 5px 5px 0 var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.ticket:nth-child(1) a { transform: rotate(-1.1deg); }
.ticket:nth-child(2) a { transform: rotate(0.9deg); }
.ticket:nth-child(3) a { transform: rotate(-0.6deg); }
.ticket:nth-child(4) a { transform: rotate(1.2deg); }

.ticket a:active {
  transform: translate(3px, 3px) rotate(0deg) !important;
  box-shadow: 2px 2px 0 var(--shadow);
}

/* punched holes, left and right edge of the ticket stub */
.ticket a::before,
.ticket a::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  transform: translateY(-50%);
}

.ticket a::before { left: -11px; }
.ticket a::after { right: -11px; }

/* tear line separating icon zone from label zone */
.ticket .icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-right: 2px dashed var(--line);
  padding-right: 14px;
  display: grid;
  place-items: center;
}

.ticket .icon svg {
  width: 34px;
  height: 34px;
}

.ticket .label {
  font-weight: 700;
  font-size: 16.5px;
  line-height: 1.25;
  color: var(--ink);
}

.ticket .sub {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 3px;
}

.ticket .go {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 20px;
  color: var(--ink-soft);
}

/* ---------- ad slab (install your own internet) ---------- */
.slab {
  margin-top: 34px;
  padding: 24px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper-light);
  border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--shadow);
  transform: rotate(0.6deg);
}

.slab .tape {
  background: var(--red);
  color: var(--paper-light);
  border-color: var(--paper-light);
}

.slab h2 {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.15;
  margin: 0 0 8px;
}

.slab p {
  margin: 0 0 18px;
  color: rgba(251, 246, 232, 0.78);
  font-size: 14.5px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  background: var(--coin);
  color: var(--ink);
  border: 2px solid var(--paper-light);
  box-shadow: 3px 3px 0 rgba(251, 246, 232, 0.35);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(251, 246, 232, 0.35);
}

.btn-urgent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  text-decoration: none;
  background: var(--red);
  color: var(--paper-light);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--shadow);
  cursor: pointer;
  text-align: center;
}

.btn-urgent .sub {
  display: block;
  font-weight: 500;
  font-size: 12.5px;
  opacity: 0.9;
  margin-top: 3px;
}

.btn-urgent:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--shadow);
}

.link-plain {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  color: var(--blue);
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 100%;
}

footer.foot {
  margin-top: 40px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

/* ============================================================
   tutorial subpages
   ============================================================ */
.page-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 8vw, 36px);
  line-height: 1.08;
  margin: 10px 0 6px;
}

.page-intro {
  color: var(--ink-soft);
  font-size: 15.5px;
  max-width: 42ch;
  margin: 0 0 8px;
}

/* step list, used by the connect tutorial */
.steps {
  list-style: none;
  margin: 24px 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  gap: 16px;
}

.steps li {
  counter-increment: step;
  position: relative;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 16px 18px 16px 54px;
  box-shadow: 4px 4px 0 var(--shadow);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 16px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--coin);
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
}

.steps li strong {
  display: block;
  font-size: 15.5px;
  margin-bottom: 4px;
}

.steps li span {
  font-size: 14px;
  color: var(--ink-soft);
}

/* photo placeholder, swap for a real picture when ready */
.photo-slot {
  margin-top: 10px;
  border: 2px dashed var(--line);
  border-radius: 10px;
  background: rgba(251, 246, 232, 0.5);
  min-height: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-align: center;
  padding: 10px;
}

.photo-slot svg {
  width: 26px;
  height: 26px;
  opacity: 0.6;
}

/* ---------- carousel, used by the gcash tutorial ---------- */
.carousel {
  margin-top: 22px;
  position: relative;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 14px;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.slide {
  scroll-snap-align: center;
  flex: 0 0 100%;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 4px 4px 0 var(--shadow);
}

.slide .step-flag {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--blue);
  color: var(--paper-light);
  padding: 3px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.slide h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.slide p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 0;
  cursor: pointer;
}

.carousel-dots button[aria-current="true"] {
  background: var(--coin);
}

.carousel-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
}

.carousel-nav button {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--paper-light);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--shadow);
}

.carousel-nav button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow);
}

.carousel-nav button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ---------- location cards, used by coins and voucher tutorials ---------- */
.locations {
  list-style: none;
  margin: 22px 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.locations li {
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 4px 4px 0 var(--shadow);
}

.locations li strong {
  display: block;
  font-size: 15.5px;
  margin-bottom: 2px;
}

.locations li span {
  font-size: 13.5px;
  color: var(--ink-soft);
}

.note-box {
  margin-top: 26px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: rgba(46, 111, 158, 0.08);
  padding: 14px 16px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.note-box strong {
  color: var(--ink);
}

/* ============================================================
   internet installation: plans, faq, signup form
   ============================================================ */
.plans {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.plan-card {
  position: relative;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 4px 4px 0 var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}

.plan-card .mbps {
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--coin);
  border: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  line-height: 1;
}

.plan-card .mbps b {
  font-size: 20px;
}

.plan-card .mbps span {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.plan-card .info strong {
  display: block;
  font-size: 17px;
}

.plan-card .info .price {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--blue);
  font-size: 15px;
  margin-top: 2px;
}

.plan-card .info span.for {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 3px;
}

.fee-banner {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.fee-banner strong {
  color: var(--ink);
  font-family: var(--font-mono);
}

/* ---------- faq accordion ---------- */
.faq {
  margin-top: 30px;
}

.faq h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin: 0 0 14px;
}

.faq details {
  background: var(--paper-light);
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 2px 16px;
  margin-bottom: 12px;
  box-shadow: 4px 4px 0 var(--shadow);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 26px 14px 0;
  font-weight: 700;
  font-size: 15px;
  position: relative;
}

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

.faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 12px;
  font-family: var(--font-display);
  font-size: 20px;
}

.faq details[open] summary::after {
  content: '\2212';
}

.faq .answer {
  padding: 0 0 16px;
  font-size: 14px;
  color: var(--ink-soft);
}

.faq .answer.todo {
  border: 2px dashed var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ---------- signup form ---------- */
.field {
  margin-top: 18px;
}

.field label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}

.field input[type="text"],
.field input[type="tel"],
.field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper-light);
  color: var(--ink);
}

.field .hint {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--ink-soft);
}

.map-box {
  margin-top: 8px;
  height: 260px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 4px 4px 0 var(--shadow);
}

.map-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.locate-btn {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13.5px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--paper-light);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--shadow);
}

.locate-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow);
}

.pin-status {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.pin-status.ok {
  color: var(--green);
}

.submit-btn {
  margin-top: 26px;
  width: 100%;
  justify-content: center;
  font-size: 16px;
  padding: 15px 22px;
}

.form-error {
  margin-top: 14px;
  border: 2px solid var(--red);
  background: rgba(200, 65, 42, 0.08);
  color: var(--red);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  display: none;
}

.form-error.show {
  display: block;
}

/* ---------- landmark pins on the map ---------- */
.landmark-pin {
  background: none;
  border: none;
}

.landmark-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--red);
  border: 2px solid var(--paper-light);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
}

.landmark-badge svg {
  width: 15px;
  height: 15px;
  transform: rotate(45deg);
}

.leaflet-tooltip.landmark-label {
  background: var(--paper-light);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  padding: 3px 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10.5px;
  line-height: 1.25;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--shadow);
  white-space: normal;
  max-width: 140px;
  text-align: center;
}

.leaflet-tooltip.landmark-label::before {
  display: none;
}

/* ---------- embedded subscriber portal ---------- */
.portal-frame {
  margin-top: 22px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 5px 5px 0 var(--shadow);
  background: var(--paper-light);
}

.portal-frame .portal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 2px solid var(--ink);
  background: var(--coin);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.portal-frame .portal-bar .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  opacity: 0.45;
  margin-right: 1px;
}

.portal-frame iframe {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
  background: #0f1418;
}

/* ---------- due date tracker ---------- */
.due-tracker {
  margin-top: 18px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--paper-light);
  box-shadow: 4px 4px 0 var(--shadow);
}

.due-tracker label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 8px;
}

.due-tracker input[type="date"] {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}

.due-result:empty {
  margin-top: 0;
}

.due-result {
  margin-top: 14px;
}

.due-card {
  border-radius: 12px;
  padding: 14px 16px;
  border: 2px solid var(--ink);
}

.due-card .days {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1;
}

.due-card .flag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}

.due-card .due-date-line {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
}

.due-card .due-date-numeric {
  font-family: var(--font-mono);
  font-weight: 400;
  opacity: 0.75;
}

.due-card .msg {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.5;
}

.due-card.ok {
  background: rgba(76, 122, 61, 0.12);
  border-color: var(--green);
}

.due-card.soon {
  background: rgba(232, 169, 58, 0.2);
  border-color: var(--coin-dark);
}

.due-card.over {
  background: rgba(200, 65, 42, 0.12);
  border-color: var(--red);
}

/* ---------- real step screenshots, solid border unlike the dashed photo-slot ---------- */
.step-photo {
  margin-top: 10px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 3px 3px 0 var(--shadow);
}

.step-photo img {
  display: block;
  width: 100%;
}

/* ---------- popup modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 17, 10, 0.6);
  display: none;
  align-items: flex-start;
  justify-content: center;
  z-index: 100;
  padding: 24px 16px;
  overflow-y: auto;
}

.modal-backdrop.show {
  display: flex;
}

.modal-card {
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 16px;
  max-width: 480px;
  width: 100%;
  box-shadow: 6px 6px 0 var(--shadow);
  margin: auto;
}

.modal-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 4px;
}

.modal-card-head h2 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.15;
  margin: 0;
}

.modal-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper-light);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--shadow);
}

.modal-close:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--shadow);
}

.modal-card-body {
  padding: 8px 20px 22px;
}
