/*
 * Outilia — holding page
 * Figma: OUT — Holding Page (Desktop 1:2, Mobile 1:16)
 */

/*
 * Legal Disclaimer for Web licence
 *
 * Licence to use self-hosted webfonts for displaying dynamic text on specified website domains. Our package includes WOFF and WOFF2 font formats.
 *
 * Should the license page views limit be exceeded the license holder will be required to contact Lineto.com for an upgrade.
 *
 * It is strictly prohibited to rename the font and to download or use these fonts in any other media.
 *
 * These Web fonts are licensed exclusively for the use on the following domain(s) and their subdomains:
 *
 * outilia.com.au (monthly pageviews: <50K)
 *
 */

@font-face {
  font-family: "Unica77LLWeb";
  src: url("fonts/Unica77LLWeb-Regular.woff2") format("woff2"),
       url("fonts/Unica77LLWeb-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Unica77LLWeb";
  src: url("fonts/Unica77LLWeb-Medium.woff2") format("woff2"),
       url("fonts/Unica77LLWeb-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --sand: #cfc6b9;
  --ink: #000;
  --image-bg: #b8b3aa;

  /* Mobile (393 × 852 frame) */
  --gutter: 20px;
  --pad-top: 24px;
  --logo-gap: 24px;
  --note-gap: 23px;
  --tagline-size: 22px;
  --note-size: 14px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: "Unica77LLWeb", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  /* Unica 77 hhea/typo metrics: 963 + 237 on 1000 upm */
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
p {
  margin: 0;
  font: inherit;
}

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

/* ---------- Layout: mobile first (stacked) ---------- */

.hold {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.hold__content {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  padding:
    max(var(--pad-top), env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    var(--note-gap)
    max(var(--gutter), env(safe-area-inset-left));
}

.hold__logo {
  width: 100%;
  height: auto;
}

.hold__lower {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding-top: var(--logo-gap);
}

.hold__tagline {
  font-size: var(--tagline-size);
}

.hold__note {
  font-size: var(--note-size);
}

.hold__media {
  position: relative;
  overflow: hidden;
  background: var(--image-bg);
  flex: none;
  aspect-ratio: 393 / 401;
  max-height: 60vh;
  max-height: 60svh;
  width: 100%;
}

.hold__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: left center;
}

/* ---------- Layout: split (desktop, landscape tablet & phone) ---------- */

@media (min-width: 600px) and (min-aspect-ratio: 1/1) {
  :root {
    /* Desktop (1440 × 900 frame), scaling up on larger screens */
    --gutter: clamp(22px, 1.528vw, 40px);
    --pad-y: clamp(24px, 1.667vw, 44px);
    --logo-gap: clamp(12px, 1.072vw, 24px);
    --tagline-size: clamp(22px, 1.528vw, 32px);
    --note-size: clamp(14px, 0.972vw, 20px);
  }

  .hold {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
  }

  /* Equal top/bottom rows keep the wordmark centred on the viewport,
     with the tagline hanging below it and the note pinned to the foot. */
  .hold__content {
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    min-height: 0;
    padding:
      var(--pad-y)
      var(--gutter)
      max(var(--pad-y), env(safe-area-inset-bottom))
      max(var(--gutter), env(safe-area-inset-left));
  }

  .hold__brand {
    grid-row: 2;
  }

  .hold__logo {
    width: 28.185vw; /* 405.86 / 1440 */
  }

  .hold__lower {
    grid-row: 3;
    gap: 16px;
  }

  .hold__media {
    aspect-ratio: auto;
    max-height: none;
    height: 100%;
  }
}

/* ---------- Entrance (progressive enhancement, see main.js) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(10px);
    transition:
      opacity 0.9s var(--ease),
      transform 0.9s var(--ease);
  }

  .js .hold__tagline.reveal { transition-delay: 0.12s; }
  .js .hold__note.reveal { transition-delay: 0.24s; }

  .js.is-ready .reveal {
    opacity: 1;
    transform: none;
  }

  .js .hold__image {
    opacity: 0;
    transition: opacity 1.1s var(--ease);
  }

  .js .hold__image.is-loaded {
    opacity: 1;
  }
}
