/*
Theme Name: Mila Royale
Theme URI: https://milaroyale.com
Author: Mila Royale
Description: A bespoke single-page theme for the Mila Royale advisory practice. Built to the "Private Office" design direction: cool stone ground, Spectral serif prose, marginal sans labels, and a slowly rotating guilloche engraving.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mila-royale
*/

/* ---------------------------------------------------------------
   Self-hosted faces. No external font requests: nothing about a
   visitor to this page is disclosed to a third party.
---------------------------------------------------------------- */

@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/spectral-300.woff2") format("woff2");
}

@font-face {
  font-family: "Spectral";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/spectral-400.woff2") format("woff2");
}

@font-face {
  font-family: "Spectral";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/spectral-300-italic.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/plexsans-500.woff2") format("woff2");
}

/* ---------------------------------------------------------------
   Tokens — the "Private Office" direction.
   Light is the base; dark is redefined for both the system
   preference and an explicit stamp, so all three viewer states
   resolve as a complete set.
---------------------------------------------------------------- */

:root {
  --ground:      #EFF0EC;
  --surface:     #F7F8F5;
  --ink:         #12161A;
  --ink-soft:    #4E565E;
  --ink-faint:   #7C848B;
  --rule:        #D3D6CF;
  --rule-faint:  #E2E4DE;
  --accent:      #2E4653;
  --accent-soft: #56707E;

  --serif: "Spectral", "Iowan Old Style", Palatino, Georgia, serif;
  --sans:  "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --measure: 34rem;
  --label-col: 9.5rem;
  --gutter: 3rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:      #0E1114;
    --surface:     #14181C;
    --ink:         #E6E8E4;
    --ink-soft:    #9AA2A8;
    --ink-faint:   #6E767C;
    --rule:        #262B30;
    --rule-faint:  #1C2126;
    --accent:      #8FAEBC;
    --accent-soft: #B0C6D1;
  }
}

:root[data-theme="dark"] {
  --ground:      #0E1114;
  --surface:     #14181C;
  --ink:         #E6E8E4;
  --ink-soft:    #9AA2A8;
  --ink-faint:   #6E767C;
  --rule:        #262B30;
  --rule-faint:  #1C2126;
  --accent:      #8FAEBC;
  --accent-soft: #B0C6D1;
}

/* ---------------------------------------------------------------
   Reset. :where() keeps specificity at zero so any component
   rule below wins without a fight.
---------------------------------------------------------------- */

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

:where(body, h1, h2, h3, p, ul, ol, li, figure, blockquote, dl, dd) {
  margin: 0;
  padding: 0;
}

:where(ul, ol) { list-style: none; }

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

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; }

::selection { background: var(--accent); color: var(--ground); }

/* ---------------------------------------------------------------
   Guilloche canvas — fixed behind the page, masked so it
   dissolves before it reaches the prose.
---------------------------------------------------------------- */

#guilloche {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(125% 95% at 76% 10%, #000 0%, #000 34%, rgba(0,0,0,0.35) 62%, transparent 82%);
  mask-image: radial-gradient(125% 95% at 76% 10%, #000 0%, #000 34%, rgba(0,0,0,0.35) 62%, transparent 82%);
}

.page {
  position: relative;
  z-index: 1;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4.5rem);
}

/* ---------------------------------------------------------------
   Section grid: marginal label beside the prose.
---------------------------------------------------------------- */

.band {
  display: grid;
  grid-template-columns: var(--label-col) minmax(0, 1fr);
  gap: 0 var(--gutter);
  padding: clamp(3.25rem, 7vw, 5.5rem) 0;
  border-top: 1px solid var(--rule-faint);
}

.band__label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.145em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.6;
  padding-top: 0.45rem;
}

.band__body { max-width: var(--measure); }
.band__body > * + * { margin-top: 1.35rem; }
.band__body p { color: var(--ink-soft); }

@media (max-width: 46rem) {
  .band { grid-template-columns: 1fr; gap: 1.5rem 0; }
  .band__label { padding-top: 0; }
}

/* ---------------------------------------------------------------
   Hero — a title page.
---------------------------------------------------------------- */

.hero {
  min-height: min(86vh, 46rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2.25rem, 5vw, 3.5rem) 0 clamp(3.5rem, 8vw, 6rem);
}

.wordmark {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink);
}

.hero__statement { max-width: 44rem; }

h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.15rem, 5.4vw, 3.45rem);
  line-height: 1.14;
  letter-spacing: -0.018em;
  text-wrap: balance;
  color: var(--ink);
}

.hero__sub {
  margin-top: 1.85rem;
  max-width: 30rem;
  line-height: 1.7;
  color: var(--ink-soft);
}

.hero__meta {
  margin-top: 2.75rem;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.145em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------------------------------------------------------------
   Prose
---------------------------------------------------------------- */

.lede {
  font-size: clamp(1.1875rem, 2.3vw, 1.4375rem);
  line-height: 1.62;
  font-weight: 300;
  letter-spacing: -0.006em;
}

.band__body p.lede { color: var(--ink); }

.turn {
  font-style: italic;
  font-weight: 300;
}

.band__body p.turn { color: var(--ink); }

.facets {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  margin-top: 2.75rem;
}

.facet { display: flex; flex-direction: column; gap: 0.5rem; }

.facet__name {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
}

.changes { display: flex; flex-direction: column; }

.changes li {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule-faint);
  color: var(--ink-soft);
  line-height: 1.6;
}

.changes li:first-child { padding-top: 0; }
.changes li:last-child { border-bottom: 0; padding-bottom: 0; }

.credential {
  padding: 1.6rem 0 1.6rem 1.5rem;
  border-left: 1px solid var(--accent);
  font-style: italic;
  font-weight: 300;
  font-size: 1.125rem;
  line-height: 1.55;
}

.band__body p.credential { color: var(--ink); }

.legal-name {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.145em;
  text-transform: uppercase;
}

.band__body p.legal-name { color: var(--ink-faint); }

/* ---------------------------------------------------------------
   Testimonials
---------------------------------------------------------------- */

.voices { display: flex; flex-direction: column; gap: 2.75rem; }

blockquote { display: flex; flex-direction: column; gap: 0.9rem; }

blockquote p {
  font-weight: 300;
  line-height: 1.7;
}

.band__body blockquote p { color: var(--ink); }

.attrib {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.125em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.attrib strong { color: var(--ink-soft); font-weight: 500; }

/* ---------------------------------------------------------------
   Correspondence
---------------------------------------------------------------- */

.enquiry {
  margin-top: 2.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  max-width: 26rem;
}

.field { display: flex; flex-direction: column; gap: 0.6rem; }

.field label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.145em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.field input {
  font-family: var(--serif);
  font-size: 1.0625rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0;
  border-radius: 0;
  transition: border-color 160ms ease;
}

.field input:hover { border-bottom-color: var(--ink-faint); }
.field input:focus { outline: none; border-bottom-color: var(--accent); }
.field input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.enquiry button {
  align-self: flex-start;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.185em;
  text-transform: uppercase;
  color: var(--ground);
  background: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.85rem 2.1rem;
  cursor: pointer;
  border-radius: 0;
  transition: background-color 160ms ease, border-color 160ms ease, transform 90ms ease;
}

.enquiry button:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.enquiry button:active { transform: translateY(1px); }
.enquiry button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.confidence {
  font-size: 0.9375rem;
  font-style: italic;
  font-weight: 300;
}

.band__body p.confidence { color: var(--ink-faint); }

.notice {
  border-left: 1px solid var(--accent);
  padding: 0.9rem 0 0.9rem 1.25rem;
  font-size: 1rem;
  line-height: 1.6;
}

.band__body p.notice { color: var(--ink); }

.notice--error { border-left-color: var(--ink-faint); }

.band__body a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--accent);
}

.band__body a:hover { text-decoration-color: var(--ink); }
.band__body a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------------------------------------------------------------
   Footer
---------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule-faint);
  padding: 2.5rem 0 3.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.125em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.site-footer a { color: var(--ink-faint); text-decoration: none; }
.site-footer a:hover { color: var(--ink-soft); }
.site-footer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1.75rem; }

/* ---------------------------------------------------------------
   Interior pages (privacy notice and anything else)
---------------------------------------------------------------- */

.interior { padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3rem); }
.interior__body { max-width: var(--measure); }
.interior__body > * + * { margin-top: 1.35rem; }
.interior__body p, .interior__body li { color: var(--ink-soft); }

.interior__body h2 {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.145em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 2.75rem;
}

.interior__body ul { display: flex; flex-direction: column; gap: 0.65rem; }

.interior__body li {
  padding-left: 1.1rem;
  position: relative;
  line-height: 1.65;
}

.interior__body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 0.45rem;
  height: 1px;
  background: var(--accent);
}

.interior__body a { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--rule); }
.interior__body a:hover { text-decoration-color: var(--accent); }

.back-link {
  display: inline-block;
  margin-top: 3rem;
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.145em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
}

.back-link:hover { color: var(--ink-soft); }

/* ---------------------------------------------------------------
   Entrance. Reveals degrade to visible when JS never runs.
---------------------------------------------------------------- */

.js .rise {
  opacity: 0;
  transform: translateY(0.7rem);
  animation: rise 900ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.js .hero__statement .rise:nth-child(1) { animation-delay: 180ms; }
.js .hero__statement .rise:nth-child(2) { animation-delay: 320ms; }
.js .hero__statement .rise:nth-child(3) { animation-delay: 440ms; }

@keyframes rise { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .js .rise { animation: none; opacity: 1; transform: none; }
  * { transition-duration: 1ms !important; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--accent);
  color: var(--ground);
  font-family: var(--sans);
  font-size: 0.75rem;
  padding: 0.75rem 1.25rem;
}

.skip-link:focus { left: 0; }
