@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ─── Variables ──────────────────────────────────────────────────────────── */
:root {
  --black:     #111111;
  --white:     #ffffff;
  --gray-100:  #f6f6f6;
  --gray-200:  #e8e8e8;
  --gray-400:  #9a9a9a;
  --gray-600:  #565656;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --ease:      200ms ease;
  --font:      'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  min-height: 100vh;
  line-height: 1.6;
}

/* ─── Checkered stripe ───────────────────────────────────────────────────── */
.checkered-stripe {
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--black) 0 8px,
    var(--white) 8px 16px
  );
  flex-shrink: 0;
}

/* ─── Language switcher ──────────────────────────────────────────────────── */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.lang-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: var(--gray-400);
  cursor: pointer;
  padding: 5px 7px;
  border-radius: var(--radius-sm);
  transition: color var(--ease), background var(--ease);
  line-height: 1;
}

.lang-btn:hover  { color: var(--black); }
.lang-btn.active { color: var(--black); background: var(--gray-100); }

.lang-sep {
  color: var(--gray-200);
  user-select: none;
  padding: 0 2px;
}

/* ─── Shared buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: 0.975rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity var(--ease), transform var(--ease), background var(--ease);
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { transform: scale(0.97); }

.btn--solid {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
  box-shadow: 0 2px 0 rgba(0,0,0,0.35);
}
.btn--solid:hover { opacity: 0.80; transform: translateY(-1px); box-shadow: 0 4px 0 rgba(0,0,0,0.30); }
.btn--solid:active { transform: translateY(1px); box-shadow: none; opacity: 1; }

.btn--outline {
  background: var(--white);
  color: var(--black);
  border-color: var(--black);
}
.btn--outline:hover { background: var(--gray-100); }

.btn--full { width: 100%; }

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: currentColor;
}

/* ─── Index page ─────────────────────────────────────────────────────────── */
.index-layout {
  min-height: calc(100vh - 8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.index-bar {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px;
}

.link-bio-card {
  width: 100%;
  max-width: 480px;
  padding: 4px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  width: 100%;
  max-width: 260px;
  height: auto;
  margin-bottom: 28px;
}

.profile-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gray-200);
  margin-bottom: 14px;
}

.bio-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.bio-tagline {
  font-size: 0.875rem;
  color: var(--gray-600);
  text-align: center;
  margin-bottom: 32px;
}

.bio-links {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

/* ─── Sub-page layout ────────────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--gray-200);
  gap: 16px;
}

.header-logo {
  height: 32px;
  width: auto;
  display: block;
}

.back-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-600);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}
.back-link:hover { color: var(--black); }

.header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.page-body {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  width: 100%;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 36px;
  line-height: 1.2;
}

/* ─── Price calculator ───────────────────────────────────────────────────── */
.calc-stack {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.field-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gray-600);
  margin-bottom: 10px;
}

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

.km-input {
  width: 120px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  border: 2px solid var(--black);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--black);
  text-align: right;
  -moz-appearance: textfield;
  appearance: textfield;
  transition: box-shadow var(--ease);
}
.km-input::-webkit-outer-spin-button,
.km-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.km-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.10);
}

.km-unit {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-600);
}

.km-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 3px;
  background: var(--gray-200);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin-top: 16px;
  display: block;
}
.km-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--black);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.km-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--black);
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.result-box {
  background: var(--gray-100);
  border: 2px solid var(--black);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  box-shadow: 0 2px 0 var(--black);
}

.result-box-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.result-display {
  min-height: 3.4rem;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.result-amount {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--black);
}

.result-currency {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gray-600);
  line-height: 1;
}

.result-empty {
  font-size: 3rem;
  font-weight: 300;
  color: var(--gray-200);
  line-height: 1;
  letter-spacing: -0.02em;
}

.rate-note {
  font-size: 0.78rem;
  color: var(--gray-600);
  margin-top: 10px;
}

/* ─── About page ─────────────────────────────────────────────────────────── */
.about-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--gray-200);
}

.about-photo {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-200);
  flex-shrink: 0;
}

.about-person-name {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.about-sections {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.section-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gray-600);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gray-200);
}

.contact-name {
  font-size: 1rem;
  font-weight: 700;
}

.contact-address {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
}

.contact-link {
  color: var(--black);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity var(--ease);
  display: inline-block;
}
.contact-link:hover { opacity: 0.55; }

.detail-row {
  display: flex;
  gap: 12px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.detail-key {
  font-weight: 600;
  color: var(--gray-600);
  min-width: 116px;
  flex-shrink: 0;
}

.detail-val {
  color: var(--black);
  overflow-wrap: break-word;
  word-break: break-all;
}

.cert-verify {
  display: block;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--black);
  text-decoration: underline;
  text-underline-offset: 3px;
  line-height: 1.55;
  transition: opacity var(--ease);
  overflow-wrap: break-word;
}
.cert-verify:hover { opacity: 0.55; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
/* ─── Date / time card ── matches addr-card style ───────────────────────── */
.datetime-card {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 0 var(--black);
  display: flex;
  overflow: hidden;
}

.dt-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 14px 10px;
}

.dt-sep {
  width: 1px;
  background: var(--gray-200);
  margin: 14px 0;
  flex-shrink: 0;
}

/* Icon sits inside the label, same as field-label row */
.dt-label {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
}

.dt-icon {
  width: 11px;
  height: 11px;
  color: var(--gray-600);
  flex-shrink: 0;
}

/* Input matches addr-input exactly */
.dt-input {
  width: 100%;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--black);
  transition: background var(--ease), box-shadow var(--ease);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  min-width: 0;
}
.dt-input:focus {
  outline: none;
  background: var(--white);
  box-shadow: inset 0 0 0 2px var(--black);
}
.dt-input::-webkit-calendar-picker-indicator {
  opacity: 0.4;
  cursor: pointer;
}

/* ─── Address card ───────────────────────────────────────────────────────── */
.addr-card {
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius-lg);
  overflow: visible;
  box-shadow: 0 2px 0 var(--black);
  display: flex;
  gap: 0;
}

/* Left track: hollow circle → line → filled circle */
.addr-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 0 28px 18px;
  flex-shrink: 0;
  gap: 0;
}

.track-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.track-dot--from {
  border: 2px solid var(--black);
  background: var(--white);
  margin-top: 22px; /* align with input mid-line (~44px input, label 32px) */
}

.track-line {
  flex: 1;
  width: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--black) 0 4px,
    transparent 4px 8px
  );
  min-height: 20px;
  margin: 6px 0;
}

.track-dot--to {
  background: var(--black);
  margin-bottom: 22px;
}

/* Fields column */
.addr-fields {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.addr-field {
  display: flex;
  flex-direction: column;
  padding: 14px 14px 14px 10px;
  flex: 1;
}

.addr-sep {
  height: 1px;
  background: var(--gray-200);
  margin: 0 14px 0 10px;
}

/* Input */
.addr-wrap {
  position: relative;
}

.addr-input {
  width: 100%;
  padding: 9px 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  color: var(--black);
  transition: background var(--ease), box-shadow var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.addr-input:focus {
  outline: none;
  background: var(--white);
  box-shadow: inset 0 0 0 2px var(--black);
}
.addr-input::placeholder { color: var(--gray-400); font-weight: 400; }

/* ─── Autocomplete dropdown ───────────────────────────────────────────────── */
.addr-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: -10px;
  right: -14px;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius-md);
  z-index: 200;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 4px 0 var(--black), 0 8px 24px rgba(0, 0, 0, 0.10);
  /* entrance animation */
  animation: dropIn 150ms ease both;
  overscroll-behavior: contain;
}

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Custom scrollbar for dropdown */
.addr-dropdown::-webkit-scrollbar         { width: 4px; }
.addr-dropdown::-webkit-scrollbar-track   { background: transparent; }
.addr-dropdown::-webkit-scrollbar-thumb   { background: var(--gray-200); border-radius: 2px; }

.addr-dropdown li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  font-size: 0.82rem;
  line-height: 1.5;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-200);
  transition: background var(--ease);
  color: var(--black);
}
.addr-dropdown li:last-child { border-bottom: none; }
.addr-dropdown li:hover      { background: var(--gray-100); }

/* Location pin icon before each suggestion */
.addr-dropdown li::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 2px solid var(--gray-400);
  margin-top: 5px;
  transition: border-color var(--ease);
}
.addr-dropdown li:hover::before { border-color: var(--black); }

/* ─── Map ────────────────────────────────────────────────────────────────── */
.map-wrap {
  border: 2px solid var(--black);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 0 var(--black);
  overflow: hidden;
  height: 0;
  max-height: 0;
  transition: max-height 400ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity    300ms ease;
  opacity: 0;
  pointer-events: none;
}

.map-wrap.visible {
  height: 300px;
  max-height: 300px;
  opacity: 1;
  pointer-events: auto;
}

#route-map {
  width: 100%;
  height: 300px;
}

/* Override Leaflet attribution to match design */
.leaflet-container .leaflet-control-attribution {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.85);
  padding: 2px 6px;
}

/* Custom marker dots */
.map-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid var(--black);
}
.map-dot--from { background: var(--white); }
.map-dot--to   { background: var(--black); }

@media (min-width: 600px) {
  .map-wrap.visible { height: 350px; max-height: 350px; }
  #route-map        { height: 350px; }
}

/* Result breakdown line */
.result-breakdown {
  font-size: 0.8rem;
  color: var(--gray-600);
  margin-top: 8px;
  line-height: 1.5;
}

/* Inline error message */
.calc-error {
  font-size: 0.82rem;
  color: var(--black);
  background: var(--gray-100);
  border-left: 3px solid var(--black);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  line-height: 1.5;
}

/* Disabled button */
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ─── Payment box ───────────────────────────────────────────────────────── */
.payment-box {
  border: 2px solid var(--black);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 0 var(--black);
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.payment-box-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gray-600);
}

/* Top row: Cash chip + NFC badge */
.pay-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pay-nfc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gray-600);
  letter-spacing: 0.02em;
}

.pay-nfc .pay-icon {
  opacity: 0.65;
}

/* Card brand chips grid */
.pay-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* Base chip */
.pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border: 1.5px solid var(--black);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
  color: var(--black);
  background: var(--white);
}

/* Solid (filled) chip variant for Cash */
.pay-chip--accent {
  background: var(--black);
  color: var(--white);
}

/* Small icon inside a chip */
.pay-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* Brand text styling */
.pay-brand--visa {
  font-style: italic;
  font-weight: 900;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
}

.pay-brand--amex {
  font-weight: 800;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
}

/* ─── Privacy page ───────────────────────────────────────────────────────── */
.privacy-intro {
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--gray-200);
}

.privacy-body {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.privacy-body p + p {
  margin-top: 10px;
}

.privacy-body ul {
  padding-left: 1.4em;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.privacy-body strong {
  color: var(--black);
  font-weight: 600;
}

.privacy-updated {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--gray-400);
}

/* ─── Page footer (privacy link) ─────────────────────────────────────────── */
.page-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.page-footer-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-400);
  text-decoration: none;
  transition: color var(--ease);
}
.page-footer-link:hover { color: var(--black); }

.footer-sep {
  color: var(--gray-200);
  font-size: 0.82rem;
  user-select: none;
  padding: 0 4px;
}

/* ─── Index footer (privacy link) ────────────────────────────────────────── */
.index-footer {
  width: 100%;
  max-width: 480px;
  padding: 0 24px 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

/* ─── Cookie notice ──────────────────────────────────────────────────────── */
#cookie-notice {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
  width: 280px;
  background: var(--white);
  border: 2px solid var(--black);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 0 var(--black), 0 8px 24px rgba(0,0,0,0.10);
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

#cookie-notice.cn-show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#cookie-notice.cn-hide {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.cn-text {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--gray-600);
  margin: 0;
}

.cn-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cn-policy {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-400);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--gray-200);
  transition: color var(--ease);
  white-space: nowrap;
}
.cn-policy:hover { color: var(--black); }

.cn-ok {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  background: var(--black);
  border: none;
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--ease);
  line-height: 1;
}
.cn-ok:hover { opacity: 0.75; }

@media (max-width: 480px) {
  #cookie-notice {
    bottom: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

@media (max-width: 480px) {
  .link-bio-card    { padding: 4px 20px 52px; }
  .logo             { max-width: 210px; }
  .page-title       { font-size: 1.4rem; margin-bottom: 28px; }
  .result-amount    { font-size: 2.25rem; }
  .result-currency  { font-size: 1.1rem; }
  .result-empty     { font-size: 2.25rem; }
  .about-hero       { flex-direction: column; text-align: center; }
  .detail-row       { flex-direction: column; gap: 2px; }
  .detail-key       { min-width: unset; }
  .site-header      { padding: 12px 16px; }
  .page-body        { padding: 28px 20px 64px; }
}

@media (min-width: 600px) {
  .link-bio-card { padding-top: 20px; }
}
