/* ==========================================================================
   KYNORIA Shipping and Logistics — Coming Soon
   Custom layer on top of Tailwind. Brand colours are the logo's own:
   deep navy #0B2341 / #081B33, ocean blue #2E7CAC, sky #7CB7DC.
   ========================================================================== */

:root {
  --navy:        #0B2341;
  --deep-navy:   #081B33;
  --ocean:       #2E7CAC;
  --sky:         #7CB7DC;
  --white:       #FFFFFF;
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--deep-navy);
  color: var(--white);
  overflow-x: hidden;
}

h1, h2, .font-display {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Full-bleed background ────────────────────────────────────────────────
   Fixed layer so the photo never scrolls or letterboxes on any viewport.   */
.bg-layer {
  position: fixed;
  inset: 0;
  background-image: url('assets/bg-maritime.webp');
  background-size: cover;
  background-position: center 45%;
  background-repeat: no-repeat;
  transform: scale(1.04);
  animation: slow-drift 34s ease-in-out infinite alternate;
  z-index: -3;
}

/* Navy wash: keeps the photo readable and locks the palette to the brand. */
.bg-wash {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 44%, rgba(11, 35, 65, 0.30) 0%, rgba(8, 27, 51, 0.74) 60%, rgba(8, 27, 51, 0.93) 100%),
    linear-gradient(180deg, rgba(8, 27, 51, 0.78) 0%, rgba(11, 35, 65, 0.34) 34%, rgba(8, 27, 51, 0.86) 100%);
  z-index: -2;
}

/* Fine grain — stops the large gradient from banding on wide screens. */
.bg-grain {
  position: fixed;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

@keyframes slow-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to   { transform: scale(1.10) translate3d(0, -1.4%, 0); }
}

/* Keeps copy legible where the photo runs bright behind it. */
main h1,
main h2,
main p {
  text-shadow: 0 2px 22px rgba(8, 27, 51, 0.85);
}

/* ── Logo lockup ──────────────────────────────────────────────────────────
   The mark keeps its original navy/blue artwork, so it sits on a light
   frosted plate rather than being recoloured for the dark background.      */
.logo-plate {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.97) 0%, rgba(240, 247, 252, 0.93) 100%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 22px;
  box-shadow:
    0 28px 70px -22px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(124, 183, 220, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.logo-emblem { animation: float 7s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ── Countdown ────────────────────────────────────────────────────────────*/
.count-box {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.04) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow:
    0 18px 44px -20px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.35s ease, transform 0.35s ease;
}

.count-box:hover {
  border-color: rgba(124, 183, 220, 0.5);
  transform: translateY(-3px);
}

.count-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 18px rgba(46, 124, 172, 0.45);
}

/* Tick pulse on every second change. */
.count-value.tick { animation: tick 0.5s ease-out; }

@keyframes tick {
  0%   { transform: translateY(-4px); opacity: 0.55; }
  100% { transform: translateY(0);    opacity: 1; }
}


/* ── Service pills ────────────────────────────────────────────────────────*/
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.42em 0.85em;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.pill::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sky);
  flex: none;
  opacity: 0.85;
}

.pill:hover {
  background: rgba(124, 183, 220, 0.16);
  border-color: rgba(124, 183, 220, 0.45);
  color: #FFFFFF;
  transform: translateY(-2px);
}

@media (min-width: 640px) {
  .pill { font-size: 0.72rem; padding: 0.42em 0.9em; }
}

/* ── Divider with the brand's blue at its centre ──────────────────────────*/
.rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 183, 220, 0.75), transparent);
}

/* ── Bottom wave ──────────────────────────────────────────────────────────*/
.wave {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 200%;
  height: 90px;
  opacity: 0.28;
  pointer-events: none;
  animation: wave-slide 22s linear infinite;
}

.wave--back { opacity: 0.16; height: 110px; animation-duration: 33s; }

@keyframes wave-slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Entrance ─────────────────────────────────────────────────────────────*/
.rise {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

.d1 { animation-delay: 0.05s; }
.d2 { animation-delay: 0.20s; }
.d3 { animation-delay: 0.35s; }
.d4 { animation-delay: 0.50s; }
.d5 { animation-delay: 0.65s; }
.d6 { animation-delay: 0.80s; }
.d7 { animation-delay: 0.95s; }

/* ── Short viewports: tighten rather than scroll ──────────────────────────
   The yacht-services list is the tallest block, so it gives up the most.   */
@media (max-height: 960px) {
  .logo-plate img         { height: 2.6rem; }
  .logo-plate img + img   { height: 2.2rem; }
  .pill                   { font-size: 0.66rem; padding: 0.32em 0.72em; }
  .count-box              { padding-top: 0.6rem; padding-bottom: 0.6rem; }
}

@media (max-height: 820px) {
  .logo-plate             { padding: 0.9rem 2rem; }
  .logo-plate img         { height: 2.2rem; }
  .logo-plate img + img   { height: 1.9rem; }
  .pill                   { font-size: 0.62rem; padding: 0.28em 0.66em; }
  main                    { padding-top: 1rem; padding-bottom: 1rem; }
  main > *                { margin-top: 0.6rem; }
  main > p:nth-of-type(2) { font-size: 0.76rem; line-height: 1.5; }
  main .rule              { margin-top: 0.6rem; margin-bottom: 0.6rem; }
  .count-box              { padding-top: 0.45rem; padding-bottom: 0.45rem; }
  .count-value            { font-size: 1.6rem; }
}

@media (max-height: 720px) {
  .wave { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .rise { opacity: 1; transform: none; }
}
