/*
Theme Name: TheMorleys Holding
Theme URI: https://themorleys.com.au
Author: TheMorleys
Description: Single-page holding site for TheMorleys while the full site is reworked. A single photograph in a black-bordered frame with the wordmark centred over it, styled after the original opening page. Edit contact details and swap media in Appearance → Customize → Holding page. Switch back to the "TheMorleys" theme any time to restore the full site.
Version: 1.4.2
Requires at least: 6.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: themorleys-holding
*/

:root {
  --bg:       #000000;
  --fg:       #f3f1ec;
  --fg-dim:   #4d4b48;   /* tiny caps under the frame, like "click to enter" */
  --fg-link:  #8a8782;
  --font-ui:  system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* Frame: 3:2, centred, with a generous black border */
  --frame-w:  calc(min(72vw, calc((100svh - 220px) * 3 / 2)) * .8);
  --frame-ratio: 3 / 2;
  --logo-w:   calc(min(72vw, calc((100svh - 220px) * 16 / 9)) * .8 * .225);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.holding {
  position: relative;
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
}

/* ---------- Framed media ---------- */
.frame {
  position: relative;
  width: var(--frame-w);
  aspect-ratio: var(--frame-ratio);
  overflow: hidden;
  background: #0b0b0b;
  animation: fade 1.6s ease both;
}
.frame img.frame__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.frame::after {               /* gentle centre shade so the wordmark holds */
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(closest-side, rgba(0,0,0,.28), rgba(0,0,0,0)) center / 80% 70% no-repeat;
  pointer-events: none;
}

/* ---------- Wordmark ---------- */
.holding__mark {
  position: absolute;
  left: 50%; top: 50%;
  width: var(--logo-w);
  transform: translate(-50%, -50%);
  z-index: 2;
  line-height: 0;
  animation: rise 1.6s .25s cubic-bezier(.2,.7,.2,1) both;
}
.holding__mark img {
  width: 100%; height: auto;
  filter: drop-shadow(0 2px 24px rgba(0,0,0,.3));
}

/* ---------- Footer line ---------- */
.holding__foot {
  position: absolute;
  left: 0; right: 0;
  bottom: max(clamp(20px, 7svh, 72px), env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 32px;
  padding: 0 20px;
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--fg-dim);
  animation: fade 1.6s .5s ease both;
}
.holding__foot a { color: var(--fg-link); text-decoration: none; transition: color .3s; }
.holding__foot a:hover, .holding__foot a:focus-visible { color: var(--fg); outline: none; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@keyframes rise { from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Tablets and phones (narrower than a laptop): the frame keeps the
   height it has at 1024px wide and crops in from the sides instead of
   shrinking. */
@media (max-width: 1023px) {
  :root {
    --frame-h: min(393px, calc((100svh - 220px) * .8));
    --frame-w: min(calc(var(--frame-h) * 3 / 2), calc(100vw - 48px));
    --logo-w:  clamp(90px, 16vw, 133px);
  }
  .frame { height: var(--frame-h); aspect-ratio: auto; }
  .frame img.frame__img { object-position: var(--crop-x, 50%) 50%; }
  .holding { padding-bottom: 40px; }
  .holding__foot { letter-spacing: .24em; gap: 6px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
