/* ============================================================
   FRK NILE TRANSPORT — design system
   reference-exact: white page, ultramarine accent, Inter.
   Content lives on white sheets; the splat ocean shows between them.
   ============================================================ */

:root{
  --bg:        #f3f6fb;
  --ink:       #101828;
  --ink-dim:   #475467;
  --mut:       #667085;
  --blue:      #366ff5;
  --blue-deep: #2456d6;
  --blue-soft: #eaf0fe;
  --line:      #e4e9f2;
  --line-soft: #edf1f7;
  --card:      #ffffff;
  --shadow:    0 18px 44px rgba(16,40,90,.08), 0 2px 8px rgba(16,40,90,.04);
  --font-d:    "Inter", system-ui, sans-serif;
  --font-m:    "IBM Plex Mono", ui-monospace, monospace;
  --ease:      cubic-bezier(.22,1,.36,1);
  --pad:       clamp(1.25rem, 4vw, 4rem);
}

*{ margin:0; padding:0; box-sizing:border-box; }
html{ scroll-behavior:auto; }
html, body{ background:var(--bg); }
body{
  color:var(--ink);
  font-family:var(--font-d);
  font-weight:400;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
body.is-smooth{ overflow-x:hidden; }
::selection{ background:var(--blue); color:#fff; }

a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }
.mono{ font-family:var(--font-m); font-size:.72rem; letter-spacing:.08em; }
.accent{ color:var(--blue); }

.smooth{ position:relative; z-index:2; will-change:transform; }
body.is-smooth .smooth{ position:fixed; inset:0 auto auto 0; width:100%; }

/* ============================== stage / canvases */
.stage{ position:fixed; inset:0; z-index:0; background:var(--bg); }
.stage__gl, .stage__fx{ position:absolute; inset:0; width:100%; height:100%; display:block; }
.stage__fx{ pointer-events:none; opacity:.65; }
.stage__vignette{
  position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(180deg, rgba(243,246,251,.9) 0%, rgba(243,246,251,0) 14%);
}

/* ============================== loader */
.loader{
  position:fixed; inset:0; z-index:60; background:var(--bg);
  display:grid; place-items:center;
  transition:opacity .9s var(--ease), visibility .9s;
}
.loader.is-done{ opacity:0; visibility:hidden; }
.loader__inner{ width:min(420px, 78vw); }
.loader__brand{
  font-weight:700; letter-spacing:.34em; font-size:.95rem; margin-bottom:1.4rem;
}
.loader__brand span{ color:var(--blue); padding:0 .35em; }
.loader__bar{ height:2px; background:var(--line); overflow:hidden; border-radius:2px; }
.loader__bar i{
  display:block; height:100%; width:0%;
  background:linear-gradient(90deg, var(--blue-deep), var(--blue));
  transition:width .25s linear;
}
.loader__meta{
  display:flex; justify-content:space-between; margin-top:.8rem;
  font-family:var(--font-m); font-size:.68rem; letter-spacing:.14em;
  color:var(--mut); text-transform:uppercase;
}
.loader__meta #loaderPct{ color:var(--blue); }
.loader__coords{
  position:absolute; bottom:1.5rem; left:0; right:0; text-align:center;
  font-family:var(--font-m); font-size:.62rem; letter-spacing:.2em; color:var(--mut);
}

/* ============================== cursor */
.cursor{ position:fixed; inset:0; z-index:70; pointer-events:none; display:none; }
@media (hover:hover) and (pointer:fine){ .cursor{ display:block; } }
.cursor__dot, .cursor__ring{ position:absolute; top:0; left:0; border-radius:50%; will-change:transform; }
.cursor__dot{ width:5px; height:5px; background:var(--blue); margin:-2.5px; }
.cursor__ring{
  width:36px; height:36px; margin:-18px;
  border:1.5px solid rgba(54,111,245,.4);
  display:grid; place-items:center;
  font-size:.8rem; color:var(--blue);
  transition:width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease),
             background .3s, border-color .3s;
}
.cursor.is-hover .cursor__ring{
  width:60px; height:60px; margin:-30px;
  background:rgba(54,111,245,.07); border-color:var(--blue);
}
body.has-cursor, body.has-cursor a, body.has-cursor button{ cursor:none; }

/* ============================== header */
.header{
  position:fixed; z-index:40; top:0; left:0; right:0;
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding:.9rem var(--pad);
  transition:background .5s, box-shadow .5s;
}
.header.is-scrolled{
  background:rgba(255,255,255,.85);
  backdrop-filter:blur(14px);
  box-shadow:0 1px 0 var(--line-soft);
}
.header__brand{ display:flex; align-items:center; gap:.6rem; }
.header__mark{ width:25px; height:25px; color:var(--blue); }
.header__word{ font-weight:700; letter-spacing:.16em; font-size:.8rem; display:flex; flex-direction:column; }
.header__word em{
  font-style:normal; font-weight:400; font-family:var(--font-m);
  font-size:.5rem; letter-spacing:.3em; color:var(--mut); margin-top:.15rem;
}
.header__nav{ display:flex; gap:1.8rem; }
.header__nav a{
  font-size:.88rem; font-weight:500; color:var(--ink-dim);
  padding:.3rem 0; transition:color .25s;
}
.header__nav a:hover{ color:var(--ink); }
.header__right{ display:flex; align-items:center; gap:1.2rem; }
.header__clock{ font-family:var(--font-m); font-size:.64rem; letter-spacing:.14em; color:var(--mut); }
@media (max-width:900px){ .header__nav, .header__clock{ display:none; } }

/* ============================== buttons — reference pills */
.btn{
  position:relative; display:inline-flex; align-items:center; gap:.65rem;
  padding:.78rem 1.4rem; border-radius:999px;
  font-size:.9rem; font-weight:500; letter-spacing:-.005em;
  transition:transform .35s var(--ease), background .3s, color .3s, box-shadow .3s;
  will-change:transform;
}
.btn--solid{
  background:var(--blue); color:#fff;
  box-shadow:0 1px 2px rgba(16,40,90,.2), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn--solid:hover{ background:var(--blue-deep); }
.btn--ghost{ background:#e8edf5; color:var(--ink); }
.btn--ghost:hover{ background:#dfe6f1; }
.btn--lg{ padding:.95rem 1.7rem; font-size:.96rem; }
.btn__orb{
  display:grid; place-items:center; width:1.6em; height:1.6em; border-radius:50%;
  background:#fff; color:var(--blue); font-size:.78em;
  transition:transform .35s var(--ease);
}
.btn:hover .btn__orb{ transform:rotate(45deg); }

/* ============================== HUD */
.hud{
  position:fixed; z-index:40; right:calc(var(--pad) * .45); top:50%;
  transform:translateY(-50%);
  display:flex; flex-direction:column; align-items:center; gap:1rem;
}
.hud__line{ width:2px; height:24vh; background:var(--line); position:relative; overflow:hidden; border-radius:2px; }
.hud__line i{
  position:absolute; top:0; left:0; width:100%; height:0%;
  background:linear-gradient(180deg, var(--blue-deep), var(--blue));
}
.hud__label{
  writing-mode:vertical-rl; font-family:var(--font-m); font-size:.58rem;
  letter-spacing:.26em; color:var(--mut); text-transform:uppercase; white-space:nowrap;
}
@media (max-width:900px){ .hud{ display:none; } }

/* ============================== sheets — white panels over the sea */
.sheet{
  position:relative;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:var(--shadow);
  max-width:1380px;
  width:calc(100% - 2 * var(--pad));
  margin:16vh auto;
  padding:clamp(2.6rem, 5vw, 5rem);
}

.section__head{ margin-bottom:clamp(2.2rem, 5vh, 4rem); }
.section__index{
  display:inline-block; color:var(--blue); text-transform:uppercase;
  background:var(--blue-soft); border-radius:999px; padding:.4rem .95rem;
  margin-bottom:1.4rem;
}
.section__title{
  font-size:clamp(2rem, 4.6vw, 3.9rem); line-height:1.1; font-weight:550;
  letter-spacing:-.03em; text-wrap:balance;
}
.section__note{ margin-top:1.2rem; color:var(--mut); max-width:40ch; }

/* split-text */
[data-split] .w{ display:inline-block; overflow:hidden; vertical-align:top; }
[data-split] .w > i{
  display:inline-block; font-style:inherit; transform:translateY(115%) rotate(3deg);
  transition:transform 1.1s var(--ease);
}
[data-split].is-in .w > i{ transform:translateY(0) rotate(0deg); }

/* reveal */
.reveal{ opacity:0; transform:translateY(2rem); transition:opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-in{ opacity:1; transform:none; }

/* ============================== hero — reference layout */
.hero{
  min-height:100vh;
  display:flex; flex-direction:column; align-items:center;
  padding:19vh var(--pad) 0;
  text-align:center;
}
.hero__inner{
  max-width:1000px; display:flex; flex-direction:column; align-items:center;
}
.hero__kicker{
  display:inline-flex; align-items:center; gap:.55rem;
  font-size:.82rem; font-weight:500; color:var(--ink-dim);
  background:#fff; border:1px solid var(--line); border-radius:999px;
  padding:.45rem 1rem; margin-bottom:1.9rem;
  box-shadow:0 1px 3px rgba(16,40,90,.06);
}
.pulse{ width:7px; height:7px; border-radius:50%; background:var(--blue); animation:pulse 2s infinite; }
@keyframes pulse{ 0%,100%{ box-shadow:0 0 0 0 rgba(54,111,245,.4);} 55%{ box-shadow:0 0 0 8px rgba(54,111,245,0);} }
.hero__title{
  font-size:clamp(2.3rem, 5vw, 4.1rem); line-height:1.12; font-weight:550;
  letter-spacing:-.032em;
}
.hero__title .line{ display:block; }
.hero__title .line--accent{ color:var(--blue); }
.hero__sub{
  margin-top:1.6rem; max-width:56ch; color:var(--mut);
  font-size:clamp(.95rem, 1.2vw, 1.06rem); line-height:1.7;
}
.hero__cta{ margin-top:2.2rem; display:flex; gap:.8rem; flex-wrap:wrap; justify-content:center; }

/* ============================== marquee */
.marquee{
  overflow:hidden; white-space:nowrap; padding:1rem 0;
  border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft);
  background:rgba(255,255,255,.85); backdrop-filter:blur(6px);
}
.marquee__track{
  display:inline-block; will-change:transform;
  font-size:clamp(.9rem, 1.6vw, 1.2rem); font-weight:500; letter-spacing:.01em;
  color:var(--ink-dim);
}
.marquee__track span:nth-child(odd){ color:var(--blue); }

/* ============================== about */
.about__grid{ display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:clamp(2rem, 4vw, 5rem); }
.about__lead{
  font-size:clamp(1.1rem, 1.6vw, 1.45rem); line-height:1.62; color:var(--ink-dim);
  font-weight:450; text-wrap:pretty;
}
.about__lead em{ color:var(--blue); font-style:normal; font-weight:550; }
.about__facts{ display:grid; grid-template-columns:1fr 1fr; gap:.9rem; }
.fact{
  background:#f8fafd; border:1px solid var(--line-soft); border-radius:18px;
  padding:1.5rem 1.4rem;
}
.fact__num{ display:block; font-size:clamp(1.7rem, 2.6vw, 2.3rem); color:var(--blue); letter-spacing:0; }
.fact__cap{ display:block; margin-top:.5rem; font-size:.8rem; color:var(--mut); line-height:1.5; }
.about__strip{
  margin-top:clamp(2.4rem, 5vh, 4rem); display:flex; flex-wrap:wrap; gap:.7rem;
}
.about__strip .mono{
  border:1px dashed var(--line); border-radius:999px; padding:.5rem 1rem; color:var(--ink-dim);
}
@media (max-width:900px){ .about__grid{ grid-template-columns:1fr; } }

/* ============================== services */
.svc{ border-top:1px solid var(--line); }
.svc__item{
  position:relative; display:grid;
  grid-template-columns:4rem minmax(0,1.1fr) minmax(0,1.4fr) 7rem;
  gap:1.4rem; align-items:baseline;
  padding:1.8rem .4rem; border-bottom:1px solid var(--line);
  transition:padding .45s var(--ease);
}
.svc__item::before{
  content:""; position:absolute; inset:0; z-index:0; border-radius:14px;
  background:var(--blue-soft);
  opacity:0; transition:opacity .4s;
}
.svc__item > *{ position:relative; z-index:1; }
.svc__item:hover{ padding-left:1.4rem; }
.svc__item:hover::before{ opacity:.6; }
.svc__no{ color:var(--mut); transition:color .3s; }
.svc__item:hover .svc__no{ color:var(--blue); }
.svc__name{
  font-size:clamp(1.15rem, 2vw, 1.6rem); font-weight:550; letter-spacing:-.02em;
  transition:transform .45s var(--ease), color .3s;
}
.svc__item:hover .svc__name{ transform:translateX(.35rem); color:var(--blue); }
.svc__desc{ color:var(--mut); font-size:.92rem; line-height:1.65; max-width:52ch; }
.svc__tag{
  justify-self:end; color:var(--blue-deep); background:var(--blue-soft);
  border-radius:999px; padding:.35rem .8rem; white-space:nowrap;
}
@media (max-width:900px){
  .svc__item{ grid-template-columns:3rem 1fr; }
  .svc__desc{ grid-column:2; }
  .svc__tag{ grid-column:2; justify-self:start; }
}

/* ============================== fleet */
.fleet__cards{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:1rem; }
.fcard{
  position:relative; overflow:hidden;
  border:1px solid var(--line-soft); border-radius:20px;
  background:#f8fafd;
  padding:1.7rem; min-height:260px; display:flex; flex-direction:column; gap:1rem;
  transition:transform .5s var(--ease), border-color .5s, box-shadow .5s, background .5s;
}
.fcard:hover{
  transform:translateY(-.4rem); border-color:rgba(54,111,245,.35); background:#fff;
  box-shadow:0 18px 40px rgba(16,40,90,.1);
}
.fcard header{ display:flex; justify-content:space-between; align-items:center; color:var(--mut); }
.fcard__glyph{ font-style:normal; font-size:1.25rem; color:var(--blue); }
.fcard h3{ font-size:1.3rem; font-weight:600; letter-spacing:-.02em; }
.fcard p{ color:var(--mut); font-size:.92rem; line-height:1.65; flex:1; }
.fcard footer{ color:var(--ink-dim); border-top:1px solid var(--line); padding-top:1rem; }
@media (max-width:900px){ .fleet__cards{ grid-template-columns:1fr; } }

/* ============================== coverage */
.coverage__wrap{
  display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);
  gap:clamp(2rem, 4vw, 4rem); align-items:center;
}
.covmap{ width:100%; height:auto; background:#f8fafd; border:1px solid var(--line-soft); border-radius:20px; }
.coverage__list li{
  display:grid; grid-template-columns:2.8rem 1fr auto; gap:1rem; align-items:baseline;
  padding:1rem .2rem; border-bottom:1px solid var(--line-soft);
  font-size:1rem; font-weight:500;
}
.coverage__list li:last-child{ border-bottom:none; }
.coverage__list li .mono{ color:var(--blue); }
.coverage__list li em{ font-style:normal; font-family:var(--font-m); font-size:.58rem; letter-spacing:.12em; color:var(--mut); text-transform:uppercase; text-align:right; }
@media (max-width:900px){ .coverage__wrap{ grid-template-columns:1fr; } }

/* covmap internals (SVG built in JS) */
.covmap .cm-route{ fill:none; stroke:var(--blue); stroke-width:1.5; opacity:.9; }
.covmap .cm-route-glow{ fill:none; stroke:rgba(54,111,245,.14); stroke-width:5; filter:blur(2px); }
.covmap .cm-grid{ stroke:rgba(16,24,40,.05); stroke-width:1; }
.covmap .cm-node{ fill:var(--blue); }
.covmap .cm-node-ring{ fill:none; stroke:rgba(54,111,245,.4); }
.covmap .cm-label{
  font-family:var(--font-m); font-size:11px; letter-spacing:.14em; fill:var(--ink-dim);
  text-transform:uppercase;
}
.covmap .cm-label-sub{ font-size:8.5px; fill:var(--mut); }
.covmap .cm-hub{ fill:#ffffff; stroke:var(--blue); stroke-width:1.8; }

/* ============================== why */
.why__grid{
  display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:1rem;
}
.why__cell{
  background:#f8fafd; border:1px solid var(--line-soft); border-radius:18px;
  padding:1.8rem 1.5rem; min-height:180px;
  display:flex; flex-direction:column; gap:.65rem;
  transition:background .4s, border-color .4s;
}
.why__cell:hover{ background:var(--blue-soft); border-color:rgba(54,111,245,.25); }
.why__cell .mono{ color:var(--blue); }
.why__cell h3{ font-size:1.05rem; font-weight:600; letter-spacing:-.01em; }
.why__cell p{ color:var(--mut); font-size:.88rem; line-height:1.6; }
@media (max-width:900px){ .why__grid{ grid-template-columns:1fr; } }

/* ============================== contact */
.contact{ text-align:center; }
.contact__inner{ max-width:820px; margin:0 auto; padding:clamp(1rem, 3vh, 2rem) 0; }
.contact__title{
  font-size:clamp(2.4rem, 6.4vw, 5.2rem); line-height:1.08; font-weight:550; letter-spacing:-.035em;
}
.contact__phone{
  display:inline-block; margin-top:2.2rem;
  font-family:var(--font-m); font-size:clamp(1.15rem, 2.8vw, 2rem); letter-spacing:.04em;
  color:var(--ink); border-bottom:2px solid var(--line);
  padding-bottom:.35rem; transition:color .3s, border-color .3s;
}
.contact__phone:hover{ color:var(--blue); border-color:var(--blue); }
.contact__cta{ margin-top:2.2rem; display:flex; gap:.8rem; justify-content:center; flex-wrap:wrap; }
.contact__note{ margin-top:1.8rem; color:var(--mut); }

/* ============================== footer */
.footer{
  position:relative; z-index:2;
  border-top:1px solid var(--line-soft);
  padding:1.5rem var(--pad) 1.8rem;
  display:flex; flex-wrap:wrap; gap:1rem; align-items:center; justify-content:space-between;
  background:rgba(255,255,255,.9); backdrop-filter:blur(8px);
  margin-top:10vh;
}
.footer__brand{ font-weight:700; letter-spacing:.26em; font-size:.7rem; }
.footer__meta{ display:flex; gap:1.5rem; font-family:var(--font-m); font-size:.6rem; letter-spacing:.12em; color:var(--mut); flex-wrap:wrap; }
.footer__tech{ color:var(--mut); font-size:.56rem; }
.footer__tech span{ color:var(--blue); }

/* ============================== reduced motion / fallbacks */
@media (prefers-reduced-motion:reduce){
  .reveal, [data-split] .w > i{ transition:none !important; transform:none !important; opacity:1 !important; }
  .marquee__track{ animation:none !important; }
  .pulse{ animation:none !important; }
}
body.no-gl .stage{
  background:
    linear-gradient(180deg, #f6f9fd 0%, #eaf1fa 42%, #2a62d8 46%, #12409e 100%);
}
