/* FinCoNet 2026 — shared responsive layer for index.html, event.html and day.html.
   Loaded AFTER app.css so every page shares one background, header, banner, title and card style.
   --W is the width of the portrait artwork column: full width on phones/tablets in portrait,
   scaled to the viewport height on landscape/desktop screens so the artwork never needs a long scroll. */
:root{
 --W:min(100vw,866px);
 --ink:#072d67;--blue:#124983;--blue-d:#0d3160;--mut:#4c6b88;--line:#c4dcef;
 font-family:Lato,"Segoe UI",system-ui,-apple-system,Arial,sans-serif;color:var(--ink)
}
@media (orientation:landscape) and (min-width:700px){:root{--W:clamp(480px,56.25svh,866px)}}

*,*::before,*::after{box-sizing:border-box}
html{background:#f2f9fe;-webkit-text-size-adjust:100%}
body{
 margin:0;padding:0;position:relative;isolation:isolate;overflow-x:clip;
 display:flex;flex-direction:column;
 min-height:max(100svh,calc(var(--W)*1.7778));
 background:linear-gradient(#46a7f4,#f2f9fe calc(var(--W)*1.2801)),#f2f9fe;
 color:var(--ink);font:15px/1.5 Lato,"Segoe UI",system-ui,Arial,sans-serif
}
/* Artwork: sky + skyline on top, Bali scene at the bottom, flat haze colour in between (never stretched). */
body::before,body::after{
 content:"";position:absolute;inset:auto;left:50%;right:auto;width:var(--W);
 transform:translateX(-50%);z-index:-1;pointer-events:none;
 background:url("assets/finconet/background-2026.png") no-repeat;background-size:100% auto
}
body::before{top:0;bottom:auto;height:calc(var(--W)*1.2801);background-position:center top}
body::after{top:auto;bottom:0;height:calc(var(--W)*.4978);background-position:center bottom}
body.participant-site,body.event-home{padding-bottom:0;min-height:max(100svh,calc(var(--W)*1.7778));max-width:none;margin:0}
body.event-home{width:auto}

/* ---------- Header (logos + back) ---------- */
body header{
 width:min(calc(100% - 32px),calc(var(--W) - 32px),600px);margin:22px auto 0;
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px
}
body header>a:first-child{flex:none;display:block;width:100%;min-width:0}
body header img{display:block;width:min(100%,calc(var(--W)*.8));max-width:560px;height:auto;margin:0 auto}
body header .nav-back{align-self:flex-start;font-size:14px;padding:9px 16px 9px 12px;border:1px solid #9cc4e4;background:#ffffffcc;min-height:40px}
.brand-row{display:flex;justify-content:center}

/* ---------- Banner (same crop on every page) ---------- */
body .program-artwork{display:block;width:min(calc(100% - 24px),calc(var(--W)*.92),640px);max-width:none;margin:12px auto 0;position:relative}
body .program-banner{position:relative;width:100%;aspect-ratio:1152/285;overflow:hidden}
body .program-banner img{position:absolute;top:0;left:0;display:block;width:100%;max-width:none;height:auto;margin:0;transform:translateY(-13.3%)}

/* ---------- Welcome (index) ---------- */
main.event-content{
 width:100%;max-width:none;margin:0;padding:0 16px calc(var(--W)*.36);
 background:none;border:0;box-shadow:none;border-radius:0;backdrop-filter:none
}
.event-intro{text-align:center;margin:18px auto 20px;width:100%}
.welcome-heading{
 margin:0 0 4px;font:800 clamp(18px,calc(var(--W)*.04),30px)/1.2 Lato,Arial,sans-serif;
 letter-spacing:.06em;text-transform:uppercase;color:var(--ink);text-align:center
}
.event-intro .program-artwork{margin-top:0}
#guest-welcome{margin-top:10px}
#guest-name{
 margin:0 auto;max-width:min(100%,640px);color:#0b2f66;font-weight:800;line-height:1.3;
 text-align:center;overflow-wrap:break-word;word-break:normal;text-wrap:balance
}
.login-status{text-align:center;margin:8px 0 0}
.login-panel{width:min(100%,440px);margin:6px auto 0;background:#ffffffeb;border:1px solid #fff;border-radius:20px;padding:22px;box-shadow:0 10px 30px #133d7014}
.login-panel label{display:block;font-weight:700;margin-bottom:10px}
.login-panel input{font-size:16px;padding:13px 14px;border-radius:12px;min-height:48px}
.login-panel button{width:100%;margin-top:14px;min-height:48px;border-radius:12px}
#login-error{color:#a12525;margin:10px 0 0;font-size:14px}#login-error:empty{display:none}
.event-actions{display:grid;grid-template-columns:1fr;gap:clamp(12px,calc(var(--W)*.035),24px);width:min(92%,440px);max-width:none;margin:0 auto}
.event-actions a{display:block;min-height:44px;border-radius:999px;box-shadow:none;transition:transform .18s,filter .18s}
.event-actions img{display:block;width:100%;height:auto}
.event-actions a:hover{filter:brightness(1.06);transform:translateY(-2px)}
.name-word{display:inline-block;white-space:normal;max-width:100%}
.name-letter{display:inline-block;animation:name-reveal .23s ease-out both;animation-delay:var(--delay)}
@keyframes name-reveal{from{opacity:0;transform:translateY(.45em)}to{opacity:1;transform:translateY(0)}}

/* ---------- Sub pages: title + card ---------- */
body main:not(.event-content){
 width:min(calc(100% - 32px),calc(var(--W) - 32px),560px);margin:16px auto calc(var(--W)*.36);padding:24px 22px;
 background:#ffffffe8;border:1px solid #fff;border-radius:22px;box-shadow:0 10px 30px #133d7014;
 backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)
}
main:not(.event-content) h1{
 margin:0 0 20px;text-align:center;text-transform:uppercase;letter-spacing:.05em;font-weight:800;
 font-size:clamp(18px,calc(var(--W)*.042),26px);line-height:1.3;color:var(--ink)
}
main:not(.event-content) h1:empty{display:none}
main:not(.event-content) h1::after{content:"";display:block;width:76px;height:3px;border-radius:3px;margin:10px auto 0;background:linear-gradient(90deg,#e9922a,#0780bb)}
main:not(.event-content) h1 .pill{display:table;margin:10px auto 0;padding:4px 14px;font-size:.62em;letter-spacing:.08em;background:#e6f2fc;color:#095b99}
.sub{text-align:center}
.tiles{gap:12px}
.tile{height:68px}
.tile .n{width:22%}
.tile .t{font-size:clamp(16px,4.6vw,20px)}
.search-row input{font-size:16px}
.who h2{font-size:clamp(17px,5vw,21px)}
.qr canvas{width:min(100%,260px)!important;height:auto!important}

/* ---------- Credit ---------- */
.credit{margin-top:auto;padding:0 16px calc(14px + env(safe-area-inset-bottom,0px));text-align:center;position:relative;z-index:1}
.credit p{display:inline-block;margin:0;padding:5px 14px;border-radius:99px;background:#ffffffc7;color:#34577a;font-size:11px}

/* ---------- Small phones ---------- */
@media (max-width:380px){
 body header{width:calc(100% - 24px);margin-top:16px}
 body main:not(.event-content){width:calc(100% - 24px);padding:20px 14px;border-radius:18px}
 main.event-content{padding-left:12px;padding-right:12px}
 .tile{height:60px;gap:12px;padding-right:14px}.tile .go{width:30px;height:30px}
 .btns{flex-direction:column-reverse}.btns .ghost{flex:1}
 .pop-actions{flex-direction:column}
}
/* Short landscape phones: keep things compact */
@media (orientation:landscape) and (max-height:520px){
 body header{margin-top:12px}
}
@media (min-width:700px) and (orientation:portrait){
 body main:not(.event-content){padding:30px 28px}
 .tile{height:76px}
}
@media (prefers-reduced-motion:reduce){.name-letter{animation:none}.event-actions a{transition:none}}
[hidden]{display:none!important}

/* ---------- Day / voucher tiles: one grid, so the dark number block and the label never drift apart ----------
   Previously the dark block was a % of the tile's content box while the gradient split used a % of the whole tile
   (plus fixed px gap/padding), so the two only lined up at one screen width. Now the dark block is its own
   grid column with its own background and slanted edge, and every size scales with --W. */
.tiles{display:grid;gap:clamp(10px,calc(var(--W)*.03),16px);width:100%}
.tiles .tile,.tiles .tile:hover{
 --tile-h:clamp(58px,calc(var(--W)*.13),84px);
 display:grid;grid-template-columns:26% minmax(0,1fr) auto;align-items:stretch;column-gap:0;
 width:100%;height:auto;min-height:var(--tile-h);padding:0;margin:0;overflow:hidden;
 border:2px solid #0773b5;border-radius:clamp(16px,calc(var(--W)*.04),22px);
 background:linear-gradient(100deg,#6c9ed0,#66afe0);color:#fff;text-align:left;box-shadow:none
}
.tiles .tile:hover{filter:brightness(1.06)}
.tiles .tile .n{
 width:auto;height:auto;min-width:0;display:grid;place-items:center;padding:0 clamp(8px,2.4vw,14px) 0 0;
 background:linear-gradient(100deg,#073575,#0780bb);border-radius:0;
 clip-path:polygon(0 0,100% 0,calc(100% - clamp(8px,2.2vw,14px)) 100%,0 100%);
 font-size:clamp(18px,calc(var(--W)*.05),26px);font-weight:800;line-height:1
}
.tiles .tile .n svg{width:clamp(22px,calc(var(--W)*.06),30px);height:auto}
.tiles .tile .t{
 min-width:0;align-self:center;padding:10px clamp(10px,3vw,16px) 10px clamp(14px,4vw,22px);
 font-size:clamp(16px,calc(var(--W)*.048),22px);font-weight:800;line-height:1.2;overflow-wrap:anywhere
}
.tiles .tile .go{align-self:center;justify-self:end;margin-right:clamp(10px,3vw,18px);width:clamp(28px,calc(var(--W)*.07),36px);height:clamp(28px,calc(var(--W)*.07),36px)}
.tiles .tile .go svg{width:50%;height:50%}
@media (max-width:380px){
 .tiles .tile,.tiles .tile:hover{grid-template-columns:24% minmax(0,1fr) auto;min-height:56px;border-radius:16px}
 .tiles .tile .t{padding-left:12px}
}
