/* =========================================================
   Lost & Found — Rio Grande Night Club
   Dark, high-contrast, touch-first.
   Every text color below is checked against WCAG AA on the
   surface it sits on; the lightest muted tone is 6.5:1.
   ========================================================= */

:root{
  /* surfaces */
  --bg:#05070A;
  --bg-2:#080B10;
  --surface:#0D1117;
  --surface-2:#111823;
  --surface-3:#161F2C;
  --line:#1F2937;
  --line-2:#2D3A4B;

  /* text — ratios on --surface */
  --text:#F4F8FD;        /* 17.8:1 */
  --muted:#AFBDCE;       /*  9.9:1 */
  --muted-2:#8A99AC;     /*  6.5:1 */

  /* accent */
  --accent:#6BB4FF;      /*  8.7:1 */
  --accent-soft:#9FD1FF; /* 11.8:1 */
  --on-accent:#04111F;   /*  8.7:1 on accent */
  --accent-dim:rgba(107,180,255,.16);
  --glow:rgba(107,180,255,.42);

  --danger:#FF8A8A;      /*  8.3:1 */
  --ok:#4ADE80;          /* 10.9:1 */
  --warn:#FBBF24;        /* 11.3:1 */

  --r:16px;
  --r-lg:26px;
  --r-pill:999px;
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;
  --ease:cubic-bezier(.22,.9,.28,1);
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{ -webkit-text-size-adjust:100%; }

body{
  margin:0;
  min-height:100dvh;
  background:var(--bg);
  color:var(--text);
  font-family:var(--font);
  font-size:17px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  padding:
    env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow-x:hidden;
}

body::before{
  content:"";
  position:fixed; inset:0; pointer-events:none; z-index:0;
  background:
    radial-gradient(760px 420px at 50% -6%, rgba(107,180,255,.17), transparent 68%),
    radial-gradient(520px 320px at 88% 104%, rgba(107,180,255,.08), transparent 70%);
  opacity:0;
  animation:ambient 1.6s var(--ease) .1s forwards;
}
@keyframes ambient{to{opacity:1}}

.wrap{
  position:relative; z-index:1;
  width:100%; max-width:840px; margin:0 auto;
  padding:22px 18px 72px;
}

/* ---------------- Language switch ---------------- */
.langbar{
  display:flex; justify-content:flex-end; margin:0 0 12px;
  opacity:0; animation:riseIn .7s var(--ease) .06s forwards;
}
.seg{
  display:inline-flex; gap:4px; padding:4px;
  background:var(--surface-2);
  border:1px solid var(--line-2);
  border-radius:var(--r-pill);
}
.seg-btn{
  appearance:none; border:0; cursor:pointer;
  font:inherit; font-size:15px; font-weight:600;
  color:var(--muted); background:transparent;
  padding:0 20px; min-height:44px;
  border-radius:var(--r-pill);
  transition:color .18s var(--ease), background .18s var(--ease), box-shadow .18s;
}
.seg-btn:active{ transform:scale(.97); }
.seg-btn.is-on{
  color:var(--on-accent); background:var(--accent);
  box-shadow:0 6px 18px -6px var(--glow);
}
.seg-btn:focus-visible{ outline:none; box-shadow:0 0 0 3px rgba(107,180,255,.35); }

/* ---------------- Header ---------------- */
.head{ text-align:center; margin-bottom:26px; }

.logo{
  width:104px; height:104px; margin:0 auto 16px;
  display:block; border-radius:24px; object-fit:cover;
  box-shadow:0 0 0 1px var(--line), 0 18px 50px -14px var(--glow);
  opacity:0; animation:logoIn 1s var(--ease) .12s forwards;
}
@keyframes logoIn{
  from{opacity:0; transform:translateY(10px) scale(.86); filter:blur(8px)}
  to  {opacity:1; transform:none; filter:none}
}

.venue{
  font-size:12px; letter-spacing:.2em; text-transform:uppercase;
  color:var(--accent-soft); font-weight:700; margin:0 0 8px;
}
h1{
  font-size:clamp(29px,5.4vw,40px); line-height:1.12;
  letter-spacing:-.025em; font-weight:700; margin:0 0 10px;
}
.sub{ color:var(--muted); font-size:16.5px; margin:0; line-height:1.45; }

.venue,h1,.sub{ opacity:0; animation:riseIn .8s var(--ease) forwards; }
.venue{animation-delay:.26s} h1{animation-delay:.32s} .sub{animation-delay:.38s}

@keyframes riseIn{
  from{opacity:0; transform:translateY(14px)}
  to  {opacity:1; transform:none}
}

/* ---------------- Card / sections ---------------- */
.card{
  background:linear-gradient(180deg,var(--surface),var(--bg-2));
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  padding:10px 20px 26px;
  box-shadow:0 26px 70px -32px rgba(0,0,0,.95);
  opacity:0; animation:riseIn .85s var(--ease) .44s forwards;
}

.sect{ padding:26px 0 4px; border-top:1px solid var(--line); }
.sect:first-child{ border-top:0; }

.sect-h{
  display:flex; align-items:center; gap:11px;
  font-size:13px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--muted-2); font-weight:700; margin:0 0 20px;
}
.sect-h .n{
  flex:0 0 auto; width:27px; height:27px; border-radius:9px;
  display:grid; place-items:center;
  background:var(--accent-dim); color:var(--accent-soft);
  font-size:13px; letter-spacing:0; font-weight:700;
}

/* ---------------- Fields ---------------- */
.field{ margin-bottom:20px; }
.row{ display:grid; gap:18px; }

label{
  display:block; font-size:15.5px; font-weight:600;
  color:var(--text); margin-bottom:9px; letter-spacing:-.006em;
}
label .opt{ color:var(--muted-2); font-weight:500; }
label .req{ color:var(--accent); }

input[type=text],input[type=tel],input[type=email],select,textarea,.dp-field{
  width:100%;
  min-height:58px;
  padding:15px 16px;
  font:inherit; font-size:17px;      /* 16px+ stops iOS zoom-on-focus */
  color:var(--text);
  background:var(--surface-2);
  border:1px solid var(--line-2);
  border-radius:var(--r);
  outline:none;
  transition:border-color .18s, box-shadow .18s, background .18s;
  appearance:none;
}
textarea{ min-height:136px; resize:vertical; line-height:1.55; }

input::placeholder,textarea::placeholder{ color:var(--muted-2); opacity:1; }

input:focus,select:focus,textarea:focus,.dp-field:focus-visible{
  border-color:var(--accent);
  background:var(--surface-3);
  box-shadow:0 0 0 4px rgba(107,180,255,.20);
}

select{
  background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='9' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23AFBDCE' stroke-width='1.9' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 16px center;
  padding-right:44px;
}

input[type=tel]{ font-variant-numeric:tabular-nums; letter-spacing:.01em; }

.err{ border-color:var(--danger)!important; box-shadow:0 0 0 4px rgba(255,138,138,.16)!important; }
.err-msg{ display:none; color:var(--danger); font-size:14px; margin-top:8px; font-weight:500; }
.field.invalid .err-msg{ display:block; animation:riseIn .3s var(--ease) forwards; }

/* ---------------- Date field ---------------- */
.dp-field{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  text-align:left; cursor:pointer; font-weight:500;
}
.dp-field .cal{ flex:0 0 auto; width:21px; height:21px; opacity:.85; }
.dp-field.is-open{ border-color:var(--accent); box-shadow:0 0 0 4px rgba(107,180,255,.20); }

/* ---------------- Calendar ---------------- */
.dp-veil{
  position:fixed; inset:0; z-index:90;
  background:rgba(3,5,8,.72);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  display:grid; place-items:center;
  padding:20px;
  animation:veilIn .22s var(--ease) forwards;
}
@keyframes veilIn{ from{opacity:0} to{opacity:1} }

.dp{
  width:100%; max-width:380px;
  background:var(--surface);
  border:1px solid var(--line-2);
  border-radius:24px;
  padding:20px 20px 18px;
  box-shadow:0 40px 90px -30px rgba(0,0,0,.95);
  animation:dpIn .3s var(--ease) forwards;
}
@keyframes dpIn{
  from{opacity:0; transform:translateY(16px) scale(.96)}
  to  {opacity:1; transform:none}
}

.dp-top{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:18px;
}
.dp-mon{ font-size:19px; font-weight:700; letter-spacing:-.02em; }
.dp-nav{ display:flex; gap:8px; }
.dp-arrow{
  width:44px; height:44px; border-radius:50%;
  display:grid; place-items:center; cursor:pointer;
  background:var(--surface-2); border:1px solid var(--line-2);
  color:var(--text); font-size:20px; line-height:1;
  transition:background .16s, transform .16s var(--ease);
}
.dp-arrow:active{ transform:scale(.92); }
.dp-arrow:hover{ background:var(--surface-3); }

.dp-dow{
  display:grid; grid-template-columns:repeat(7,1fr); gap:4px;
  margin-bottom:6px;
}
.dp-dow span{
  text-align:center; font-size:12.5px; font-weight:700;
  color:var(--muted-2); text-transform:uppercase; letter-spacing:.05em;
  padding:6px 0;
}

.dp-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
.dp-day{
  aspect-ratio:1/1; min-height:44px;
  display:grid; place-items:center;
  border:0; background:transparent; cursor:pointer;
  font:inherit; font-size:16px; font-weight:560;
  color:var(--text); border-radius:13px;
  transition:background .15s, color .15s, transform .15s var(--ease);
}
.dp-day:hover:not(:disabled){ background:var(--surface-3); }
.dp-day:active{ transform:scale(.9); }
.dp-day.pad{ color:var(--muted-2); opacity:.45; }
.dp-day.today{ box-shadow:inset 0 0 0 1.5px var(--line-2); font-weight:700; }
.dp-day.sel{
  background:var(--accent); color:var(--on-accent); font-weight:700;
  box-shadow:0 6px 18px -6px var(--glow);
}
.dp-day:disabled{ opacity:.25; cursor:default; }

.dp-quick{
  display:flex; gap:9px; margin-top:16px;
  padding-top:16px; border-top:1px solid var(--line);
}
.dp-chip{
  flex:1; min-height:48px; border-radius:14px; cursor:pointer;
  background:var(--surface-2); border:1px solid var(--line-2);
  color:var(--text); font:inherit; font-size:15.5px; font-weight:600;
  transition:background .16s, transform .14s var(--ease);
}
.dp-chip:active{ transform:scale(.97); }
.dp-chip:hover{ background:var(--surface-3); }

/* ---------------- Chips ---------------- */
.chips{ display:flex; flex-wrap:wrap; gap:10px; }
.chip{ position:relative; }
.chip input{ position:absolute; opacity:0; width:0; height:0; }
.chip span{
  display:flex; align-items:center;
  padding:12px 17px; min-height:52px;
  font-size:16px; font-weight:560; color:var(--muted);
  background:var(--surface-2);
  border:1px solid var(--line-2);
  border-radius:14px;
  cursor:pointer; user-select:none;
  transition:all .17s var(--ease);
}
.chip span:active{ transform:scale(.96); }
.chip input:checked + span{
  color:var(--on-accent); background:var(--accent);
  border-color:var(--accent);
  box-shadow:0 7px 22px -7px var(--glow);
}
.chip input:focus-visible + span{ box-shadow:0 0 0 4px rgba(107,180,255,.3); }

.chip input[type=checkbox]:checked + span::before{
  content:"";
  width:14px; height:14px; margin-right:9px; flex:0 0 auto;
  background:no-repeat center/14px 14px
    url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M4.5 12.5 10 18 20 6' stroke='%2304111F' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------------- Priority toggle ---------------- */
.toggle{
  display:flex; align-items:center; gap:15px;
  padding:17px 18px;
  background:var(--surface-2);
  border:1px solid var(--line-2);
  border-radius:var(--r);
  cursor:pointer;
  transition:all .18s var(--ease);
}
.toggle:has(input:checked){
  border-color:rgba(251,191,36,.55);
  background:rgba(251,191,36,.09);
}
.toggle input{ position:absolute; opacity:0; }
.sw{
  flex:0 0 auto; width:52px; height:31px; border-radius:99px;
  background:var(--line-2); position:relative; transition:background .2s var(--ease);
}
.sw::after{
  content:""; position:absolute; top:3px; left:3px;
  width:25px; height:25px; border-radius:50%;
  background:#fff; transition:transform .22s var(--ease);
}
.toggle input:checked ~ .sw{ background:var(--warn); }
.toggle input:checked ~ .sw::after{ transform:translateX(21px); }
.toggle .tl{ font-size:16px; font-weight:650; }
.toggle .td{ font-size:14px; color:var(--muted); line-height:1.4; }

/* ---------------- Buttons ---------------- */
.actions{ padding-top:26px; border-top:1px solid var(--line); margin-top:6px; }
.btn{
  width:100%; min-height:64px;
  display:flex; align-items:center; justify-content:center; gap:11px;
  font:inherit; font-size:18px; font-weight:700; letter-spacing:-.012em;
  color:var(--on-accent); background:var(--accent);
  border:0; border-radius:var(--r-pill);
  cursor:pointer;
  box-shadow:0 14px 36px -12px var(--glow);
  transition:transform .16s var(--ease), box-shadow .2s, opacity .2s;
}
.btn:active{ transform:scale(.985); }
.btn[disabled]{ opacity:.65; cursor:default; }
.btn.ghost{
  background:var(--surface-2); color:var(--text);
  border:1px solid var(--line-2); box-shadow:none;
}
.btn.ghost:active{ background:var(--surface-3); }
.spin{
  width:18px; height:18px; border-radius:50%;
  border:2px solid rgba(4,17,31,.3); border-top-color:var(--on-accent);
  animation:spin .7s linear infinite; display:none;
}
@keyframes spin{to{transform:rotate(360deg)}}
.btn.loading .spin{ display:block; }

.note{ text-align:center; color:var(--muted); font-size:14.5px; margin:16px 0 0; line-height:1.5; }

/* ---------------- Success ---------------- */
#done{ display:none; text-align:center; padding:18px 4px 8px; }
#done.show{ display:block; animation:riseIn .5s var(--ease) forwards; }

.tick{
  width:82px; height:82px; margin:6px auto 22px;
  border-radius:50%; display:grid; place-items:center;
  background:rgba(74,222,128,.14); border:1px solid rgba(74,222,128,.4);
  animation:pop .55s var(--ease) forwards;
}
@keyframes pop{ from{transform:scale(.6);opacity:0} to{transform:none;opacity:1} }
.tick svg{ width:38px; height:38px; }
.tick path{
  stroke-dasharray:32; stroke-dashoffset:32;
  animation:draw .5s var(--ease) .22s forwards;
}
@keyframes draw{ to{stroke-dashoffset:0} }

#done h2{ font-size:27px; margin:0 0 10px; letter-spacing:-.024em; font-weight:700; }
#done p{ color:var(--muted); margin:0 0 24px; font-size:16.5px; line-height:1.5; }

.case{
  display:inline-block; padding:18px 30px; margin-bottom:26px;
  background:var(--surface-2); border:1px dashed var(--line-2);
  border-radius:var(--r);
}
.case .k{
  font-size:12px; letter-spacing:.18em; text-transform:uppercase;
  color:var(--muted-2); margin-bottom:7px; font-weight:700;
}
.case .v{
  font-size:29px; font-weight:700; letter-spacing:.02em; color:var(--accent-soft);
  font-variant-numeric:tabular-nums;
}

/* ---------------- Offline banner ---------------- */
.offline{
  display:none; margin:0 0 20px; padding:15px 18px;
  background:rgba(251,191,36,.12); border:1px solid rgba(251,191,36,.45);
  border-radius:var(--r); color:#FFDD8F; font-size:15px; line-height:1.5;
}
.offline.show{ display:block; animation:riseIn .4s var(--ease) forwards; }

/* ---------------- Footer ---------------- */
.foot{
  text-align:center; color:var(--muted-2); font-size:12.5px;
  margin-top:30px; letter-spacing:.06em; font-weight:600;
  opacity:0; animation:riseIn .8s var(--ease) .6s forwards;
}

/* ---------------- Responsive ---------------- */
@media (min-width:640px){
  .wrap{ padding:40px 30px 76px; }
  .card{ padding:12px 30px 30px; }
  .row.two{ grid-template-columns:1fr 1fr; }
  .row.three{ grid-template-columns:1fr 1fr 1fr; }
  .logo{ width:118px; height:118px; }
  .langbar{ margin-bottom:6px; }
}
@media (min-width:1024px){
  .wrap{ padding:52px 30px 84px; max-width:880px; }
}
@media (display-mode:standalone){
  .wrap{ padding-top:32px; }
}

/* Phones: keep everything comfortably large */
@media (max-width:420px){
  .wrap{ padding:18px 16px 64px; }
  .card{ padding:8px 17px 24px; }
  .chip span{ padding:12px 15px; font-size:15.5px; }
  .dp{ padding:18px 16px 16px; }
  .dp-day{ min-height:42px; font-size:15.5px; border-radius:12px; }
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.001ms!important;
    animation-delay:0ms!important;
    transition-duration:.001ms!important;
  }
  body::before,.logo,.venue,h1,.sub,.card,.foot,.langbar{ opacity:1!important; }
}
