/* ==========================================================================
   imtrade.sg - holding page
   Self-contained: the main stylesheet is not loaded here.
   ========================================================================== */

:root {
  --ink-deep:      #08151D;
  --brand:         #132A3A;
  --accent:        #E0A03C;
  --paper:         #F7F5F1;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue",
          Helvetica, Arial, "Noto Sans", sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.holding {
  margin: 0;
  min-height: 100svh;
  background: var(--ink-deep);
  color: rgba(255, 255, 255, .78);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

/* ----------------------------------------------------------- background --- */

/*
 * Photograph and wash are one element, one paint: the gradients sit in the same
 * background stack as the image. Layering a translucent element over an
 * object-fit <img> inside this fixed container dropped the image entirely.
 *
 * Layer order runs top to bottom, so the image is listed last.
 */
.holding__media {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: var(--ink-deep);
  background-image:
    linear-gradient(180deg,
      rgba(8, 21, 29, .86) 0%,
      rgba(8, 21, 29, .60) 34%,
      rgba(9, 24, 33, .64) 62%,
      rgba(8, 21, 29, .88) 100%),
    radial-gradient(64% 58% at 50% 46%, rgba(8, 21, 29, .52) 0%, rgba(8, 21, 29, 0) 78%),
    radial-gradient(78% 70% at 50% 6%, rgba(224, 160, 60, .16) 0%, rgba(224, 160, 60, 0) 74%),
    url("/assets/img/photos/port-keppel-lg.jpg");
  background-repeat: no-repeat;
  background-position: center 45%;
  background-size: cover;
}

/* WebP where it is understood, with the JPEG above as the fallback. */
@supports (background-image: image-set(url("/assets/img/photos/port-keppel-lg.webp") type("image/webp"))) {
  .holding__media {
    background-image:
      linear-gradient(180deg,
        rgba(8, 21, 29, .86) 0%,
        rgba(8, 21, 29, .60) 34%,
        rgba(9, 24, 33, .64) 62%,
        rgba(8, 21, 29, .88) 100%),
      radial-gradient(64% 58% at 50% 46%, rgba(8, 21, 29, .52) 0%, rgba(8, 21, 29, 0) 78%),
      radial-gradient(78% 70% at 50% 6%, rgba(224, 160, 60, .16) 0%, rgba(224, 160, 60, 0) 74%),
      image-set(
        url("/assets/img/photos/port-keppel-lg.webp") type("image/webp"),
        url("/assets/img/photos/port-keppel-lg.jpg")  type("image/jpeg"));
  }
}
/* --------------------------------------------------------------- layout --- */

.holding__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100svh;
  padding: clamp(26px, 4.5vw, 58px) clamp(22px, 6vw, 88px)
           calc(clamp(26px, 4.5vw, 58px) + env(safe-area-inset-bottom, 0px));
  gap: clamp(30px, 5vw, 56px);
}

.holding__brand { padding-top: env(safe-area-inset-top, 0px); }

.holding__logo {
  width: clamp(196px, 21vw, 268px);
  height: auto;
}

.holding__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: min(760px, 100%);
  animation: rise .9s var(--ease) both;
}

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

.holding__eyebrow {
  margin: 0 0 clamp(18px, 2.4vw, 26px);
  max-width: 52ch;
  font-size: clamp(11.5px, 1.05vw, 13px);
  font-weight: 700;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--accent);
}

.holding__title {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(44px, 6.6vw, 96px);
  line-height: .98;
  letter-spacing: -.038em;
  font-weight: 700;
  color: #fff;
  text-wrap: balance;
}

.holding__lede {
  margin: clamp(22px, 2.6vw, 32px) 0 0;
  max-width: 46ch;
  font-size: clamp(16.5px, 1.4vw, 19.5px);
  line-height: 1.6;
  color: rgba(255, 255, 255, .76);
}

.holding__status {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: clamp(26px, 3vw, 36px) 0 0;
  max-width: 54ch;
  font-size: 15px;
  color: rgba(255, 255, 255, .62);
}

.holding__pulse {
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(224, 160, 60, .55);
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(224, 160, 60, .5); }
  70%  { box-shadow: 0 0 0 12px rgba(224, 160, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(224, 160, 60, 0); }
}

/* -------------------------------------------------------------- contact --- */

.holding__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 3.4vw, 40px);
}

.holding__cta {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #2A1B06;
  font-size: 15.5px;
  font-weight: 640;
  text-decoration: none;
  transition: transform .2s var(--ease), background-color .2s var(--ease),
              border-color .2s var(--ease), color .2s var(--ease);
}
.holding__cta:hover { transform: translateY(-2px); background: #EDB055; }

.holding__cta--quiet {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .26);
  color: #fff;
}
.holding__cta--quiet:hover {
  background: rgba(255, 255, 255, .13);
  border-color: rgba(255, 255, 255, .5);
  color: #fff;
}

.holding__cta .icon {
  width: 18px; height: 18px;
  flex: none;
  /*
   * Flex centres the icon box on the line box, which lands it on the cap
   * height. Against a word carrying a descender that reads a touch high,
   * so nudge it onto the label's optical centre.
   */
  transform: translateY(1px);
}

/* ----------------------------------------------------------------- foot --- */

.holding__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 26px;
  padding-top: clamp(18px, 2.4vw, 26px);
  border-top: 1px solid rgba(255, 255, 255, .13);
  font-size: 13.5px;
  color: rgba(255, 255, 255, .5);
}
.holding__foot p { margin: 0; }
.holding__sep { padding: 0 8px; opacity: .55; }

/* --------------------------------------------------------------- motion --- */

@media (prefers-reduced-motion: reduce) {
  .holding__pulse,
  .holding__body { animation: none; }
}


/* ---------------------------------------------------------------- narrow -- */

/*
 * ch-based caps can exceed the viewport on a phone, and flex items refuse to
 * shrink past their min-content width. Cap everything against the container.
 */
.holding__inner > *,
.holding__body > * { min-width: 0; }

.holding__eyebrow { max-width: min(66ch, 100%); }
.holding__title   { max-width: min(15ch, 100%); }
.holding__lede    { max-width: min(56ch, 100%); }
.holding__status  { max-width: min(66ch, 100%); flex-wrap: wrap; }
.holding__foot    { max-width: 100%; }

@media (max-width: 560px) {
  .holding__inner { gap: 26px; }
  .holding__status { align-items: flex-start; }
  .holding__pulse { margin-top: .45em; }
  .holding__contact { flex-direction: column; align-items: stretch; }
  .holding__cta { justify-content: center; }
  .holding__foot { flex-direction: column; gap: 4px; }
}

/* ------------------------------------------------------------- centred ---- */

.holding__brand,
.holding__contact,
.holding__status { justify-content: center; }

.holding__eyebrow,
.holding__title,
.holding__lede,
.holding__status { margin-inline: auto; }

.holding__foot {
  width: 100%;
  justify-content: center;
  gap: 6px 18px;
  text-align: center;
}

@media (max-width: 560px) {
  .holding__contact { align-items: stretch; }
  .holding__status  { text-align: left; }
}
/* ---------------------------------------------------------- wide screens -- */

/*
 * On a large desktop the centred column was floating in the middle of a very
 * wide photograph. Scale the type and the measure up with the viewport so the
 * page fills its frame.
 */
@media (min-width: 1100px) {
  .holding__inner { padding-inline: clamp(40px, 4vw, 76px); }

  .holding__body  { max-width: min(1320px, 100%); }

  .holding__logo  { width: clamp(248px, 17vw, 340px); }

  .holding__eyebrow {
    font-size: clamp(13px, .95vw, 16px);
    letter-spacing: .22em;
  }

  .holding__title {
    max-width: min(17ch, 100%);
    font-size: clamp(92px, 7vw, 136px);
  }

  .holding__lede {
    max-width: 72ch;
    font-size: clamp(19px, 1.3vw, 24px);
  }

  .holding__status { font-size: clamp(15px, 1vw, 17.5px); }

  .holding__cta {
    padding: 17px 30px;
    font-size: clamp(16px, 1.05vw, 18px);
  }
  .holding__cta .icon { width: 20px; height: 20px; }

  .holding__foot { font-size: clamp(13.5px, .9vw, 15.5px); }
}

@media (min-width: 1700px) {
  .holding__body  { max-width: min(1560px, 100%); }
  .holding__title { max-width: min(18ch, 100%); }
  .holding__lede  { max-width: 80ch; }
}

/* ======================================================= Say Hello dialog == */

.hello {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100svh - 48px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--ink-deep);
  overflow: visible;
}
.hello::backdrop {
  background: rgba(6, 16, 23, .72);
  backdrop-filter: blur(3px);
}

/* Rendered open by the server when JavaScript is off: show it in the flow. */
.hello[open]:not(:modal) {
  margin: 28px auto;
  position: static;
}

.hello__panel {
  position: relative;
  max-height: calc(100svh - 48px);
  overflow-y: auto;
  padding: clamp(26px, 4vw, 40px);
  border-radius: 20px;
  background: #FFFFFF;
  box-shadow: 0 24px 70px rgba(6, 16, 23, .45);
  text-align: left;
}

.hello__close {
  position: absolute;
  top: 14px; right: 14px;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  padding: 0;
  border: 1px solid #E4E0D8;
  border-radius: 50%;
  background: #fff;
  color: #5A6B76;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.hello__close:hover { background: #F1EEE8; color: var(--ink-deep); }
.hello__close svg { width: 17px; height: 17px; }

.hello__title {
  margin: 0 0 10px;
  padding-right: 44px;
  font-size: clamp(23px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--ink-deep);
}
.hello__lede {
  margin: 0 0 24px;
  max-width: 46ch;
  font-size: 15.5px;
  color: #5A6B76;
}

.hello__alert {
  margin: 0 0 20px;
  padding: 12px 16px;
  border: 1px solid rgba(179, 38, 30, .32);
  border-radius: 12px;
  background: #FDF2F1;
  color: #7A1B15;
  font-size: 14.5px;
}

/* -- fields ---------------------------------------------------------------- */

.hello__form { display: grid; gap: 16px; }
.hello__row  { display: grid; gap: 16px; }
@media (min-width: 560px) { .hello__row { grid-template-columns: 1fr 1fr; } }

.hello__field { display: grid; gap: 6px; margin: 0; }
.hello__field label {
  font-size: 14px;
  font-weight: 640;
  color: var(--ink-deep);
}
.hello__field label span {
  font-weight: 400;
  color: #7F9099;
}

.hello__field input,
.hello__field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #D6D1C7;
  border-radius: 11px;
  background: #fff;
  color: var(--ink-deep);
  font: inherit;
  font-size: 16px;          /* 16px stops iOS zooming on focus */
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.hello__field textarea { min-height: 120px; resize: vertical; line-height: 1.55; }

.hello__field input:hover,
.hello__field textarea:hover { border-color: #7F9099; }
.hello__field input:focus,
.hello__field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(19, 42, 58, .13);
}

.hello__field.is-invalid input,
.hello__field.is-invalid textarea { border-color: #B3261E; }
.hello__error { font-size: 13.5px; font-weight: 560; color: #B3261E; }

/* The honeypot: present for bots, gone for people and screen readers. */
.hello__trap {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* -- actions --------------------------------------------------------------- */

.hello__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 4px;
}

.hello__submit {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-size: 15.5px;
  font-weight: 640;
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.hello__submit:hover { transform: translateY(-2px); background: #0B1A24; }
.hello__submit:disabled { opacity: .65; cursor: default; transform: none; }
.hello__submit .icon { width: 18px; height: 18px; }


/* -- confirmation ---------------------------------------------------------- */

.hello__done { text-align: left; }
.hello__badge {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--accent);
}
.hello__badge .icon { width: 24px; height: 24px; }
.hello__done p { margin: 0 0 24px; max-width: 48ch; font-size: 15.5px; color: #5A6B76; }
.hello__done a { color: var(--ink-deep); }

@media (prefers-reduced-motion: reduce) {
  .hello__submit:hover { transform: none; }
}
