@font-face {
  font-family: 'ITC Blair';
  src: url('itc-blair-light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

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

/* Formal stationery: one centred composition inside a hairline frame.
   Name and tagline along the top edge, statement in the centre, enquiries along the bottom edge. */
:root {
  --font-stack: 'ITC Blair', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --color-primary: #000000;
  --color-muted: #555555;
  --color-dim: #888888;
  --color-frame: rgba(0, 0, 0, 0.16);
  --color-bg: #ffffff;
  --inset: clamp(12px, 2.2vw, 28px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-silk: cubic-bezier(0.77, 0, 0.175, 1);
  color-scheme: light;
}

html, body {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--color-bg);
  color: var(--color-primary);
  font-family: var(--font-stack);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 1px solid var(--color-primary); outline-offset: 6px; }

/* ---------- Keyframes ---------- */

@keyframes smogReveal {
  0%   { opacity: 0; filter: blur(12px); }
  100% { opacity: 1; filter: blur(0px); }
}

@keyframes drawSignature {
  0%   { clip-path: inset(0 100% 0 0); -webkit-clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0 0 0);    -webkit-clip-path: inset(0 0 0 0); }
}

@keyframes dotPulse {
  0%   { opacity: 0; }
  50%  { opacity: 0.6; }
  100% { opacity: 0; }
}

@keyframes ruleDraw {
  0%   { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

@keyframes frameIn {
  0%   { opacity: 0; transform: scale(1.012); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes charRise {
  0%   { transform: translateY(105%); opacity: 0; filter: blur(8px); }
  60%  { opacity: 1; }
  100% { transform: translateY(0); opacity: 1; filter: blur(0); }
}

/* ---------- Dot field (the original background, centred behind the statement) ---------- */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: radial-gradient(#b3b3b3 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 42% 48% at 50% 50%, black 0%, transparent 100%);
  mask-image: radial-gradient(ellipse 42% 48% at 50% 50%, black 0%, transparent 100%);
  opacity: 0;
  animation: dotPulse 6s ease-in-out 0.8s infinite;
}

/* ---------- Hairline frame ---------- */

body::after {
  content: '';
  position: fixed;
  inset: var(--inset);
  z-index: 2;
  pointer-events: none;
  border: 1px solid var(--color-frame);
  animation: frameIn 1.6s var(--ease) 0.05s both;
}

/* ---------- Sheet ---------- */

.sheet {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100dvh;
  width: 100%;
  padding: calc(var(--inset) + clamp(1.1rem, 3vw, 2.4rem));
}

.brand-header, .center-statement, .contact-footer { min-width: 0; width: 100%; }

/* ---------- Top edge: name and tagline ---------- */

.brand-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  animation: smogReveal 1.2s var(--ease) 0.2s both;
}

.brand-title {
  font-size: clamp(0.72rem, 3.6vw, 1.05rem);
  letter-spacing: clamp(0.08em, 2vw, 0.18em);
  text-transform: uppercase;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-subline {
  font-size: clamp(0.45rem, 1.5vw, 0.7rem);
  letter-spacing: clamp(0.35em, 2vw, 0.85em);
  text-transform: uppercase;
  color: var(--color-muted);
  line-height: 1;
  white-space: nowrap;
}

/* ---------- Centre: the statement ---------- */

.center-statement {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(1rem, 3vh, 2rem) 0;
}

.statement-title {
  font-size: clamp(1.1rem, min(4.6vw, 7.6vh), 3.8rem);
  font-weight: 300;
  letter-spacing: 0.12em;
  line-height: 1.22;
  text-transform: uppercase;
  word-break: keep-all;
  padding-left: 0.12em; /* balances the trailing letter-spacing so the lines sit truly centred */
  animation: smogReveal 1.1s var(--ease) 0.4s both;
}

/* letter-by-letter rise, applied once motion.js has split the headline */
.statement-title.is-split { animation: none; }
.statement-title .word {
  display: inline-block;
  overflow: hidden;
  padding: 0.06em 0.02em 0.1em;
  margin: -0.06em -0.02em -0.1em;
  vertical-align: top;
}
.statement-title .char {
  display: inline-block;
  animation: charRise 1.4s var(--ease) both;
  animation-delay: calc(0.5s + var(--i) * 0.04s);
}

.statement-rule {
  display: block;
  width: clamp(40px, 5vw, 64px);
  height: 1px;
  margin: clamp(1.4rem, 4.2vh, 2.6rem) 0 clamp(1.2rem, 3.4vh, 2.2rem);
  background: var(--color-primary);
  transform-origin: center;
  animation: ruleDraw 1.2s var(--ease-silk) 1.6s both;
}

.statement-copy {
  max-width: 40ch;
  font-size: clamp(0.85rem, 3.5vw, 1.05rem);
  line-height: 1.8;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 0.8rem;
  text-wrap: balance;
  animation: smogReveal 1.2s var(--ease) 1.9s both;
}

.statement-meta {
  max-width: 60ch;
  font-size: clamp(0.78rem, 3vw, 0.88rem);
  line-height: 1.8;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  animation: smogReveal 1.2s var(--ease) 2.1s both;
}

.signature-wrapper {
  width: clamp(110px, 11vw, 150px);
  margin-top: clamp(1.2rem, 3.6vh, 2.2rem);
}

.signature-wiped {
  display: block;
  width: 100%;
  height: auto;
  clip-path: inset(0 100% 0 0);
  -webkit-clip-path: inset(0 100% 0 0);
  animation: drawSignature 2s cubic-bezier(0.45, 0.05, 0.25, 1) 2.5s forwards;
}

/* ---------- Bottom edge: enquiries ---------- */

.contact-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 0.5rem 2rem;
  animation: smogReveal 1.2s var(--ease) 2.3s both;
}

.contact-label {
  justify-self: start;
  font-size: clamp(0.58rem, 2vw, 0.65rem);
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--color-dim);
}

.contact-link {
  position: relative;
  justify-self: center;
  width: fit-content;
  max-width: 100%;
  font-size: clamp(0.75rem, 3.5vw, 0.92rem);
  letter-spacing: 0.06em;
  color: var(--color-primary);
  white-space: nowrap;
  user-select: text;
  -webkit-user-select: text;
}

.contact-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background-color: var(--color-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.7s var(--ease);
}

.contact-link:hover::after { transform: scaleX(1); transform-origin: left; }

.contact-location {
  justify-self: end;
  font-size: clamp(0.75rem, 2.5vw, 0.85rem);
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

/* ---------- Small screens ---------- */

@media (max-width: 680px) {
  .brand-header { flex-direction: column; align-items: center; gap: 0.6rem; }
  .contact-footer { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 0.35rem; }
  .contact-label, .contact-link, .contact-location { justify-self: center; }
}

@media (max-width: 480px) {
  .statement-title { font-size: clamp(1rem, 5.4vw, 1.5rem); letter-spacing: 0.1em; }
  body::before {
    -webkit-mask-image: radial-gradient(ellipse 60% 40% at 50% 50%, black 0%, transparent 100%);
    mask-image: radial-gradient(ellipse 60% 40% at 50% 50%, black 0%, transparent 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .signature-wiped { clip-path: none; -webkit-clip-path: none; }
  body::before { opacity: 0.35; }
}
