/* ==========================================================================
   Stud1o — stylesheet
   Colours and type are set once in :root; everything else reads from them.
   ========================================================================== */

/* ---- Fonts (self-hosted, SIL Open Font Licence) ---- */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("../fonts/barlow-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---- Tokens ---- */
:root {
  --ink: #101012;        /* text, solid buttons, card outlines */
  --paper: #ffffff;      /* page background */
  --ice: #eff7f8;        /* tinted bands */
  --mist: #e8eff2;       /* tinted cards */
  --panel: #16171b;      /* dark contact panel */
  --muted: #5d6268;      /* secondary text */
  --hairline: #e4e7ea;   /* dividers */
  --on-dark-muted: #9a9fa6;

  --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Barlow", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(16px, 2.6vw, 40px);
  --max: none;           /* full width; set a px value here to cap the page width again */
  --radius: 18px;
  --radius-sm: 12px;
  --section: clamp(64px, 9vw, 128px);
  --header-h: 76px;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.contact-panel :focus-visible { outline-color: #fff; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 100px;
  font: 600 0.8125rem/1 var(--display); text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tight-top { padding-top: 0; }

/* ---- Type ---- */
.display {
  font-family: var(--display);
  font-weight: 650;
  font-stretch: 116%;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 1;
  text-wrap: balance;
}
.display--xl { font-size: clamp(1.875rem, 1.1rem + 3.2vw, 4rem); }
.display--lg { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem); }
.display--md { font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem); }
.display--sm { font-size: 1.125rem; line-height: 1.15; }

.label {
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
}
.lede { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem); line-height: 1.45; max-width: 62ch; }
.muted { color: var(--muted); }

/* The pill tag that sits above the hero headline */
.chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 14px 8px 12px; border-radius: 100px; background: var(--ice);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); opacity: 0.55; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 28px;
  border: 1px solid var(--ink); border-radius: 100px;
  background: var(--ink); color: #fff;
  font-family: var(--display); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; line-height: 1; text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:hover { background: #fff; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: transparent; color: #fff; }
.btn--small { min-height: 40px; padding: 0 20px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.logo { display: block; flex: none; }
.logo img { width: clamp(150px, 16vw, 220px); }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.nav__links a { text-decoration: none; padding: 8px 0; position: relative; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.2s ease;
}
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__toggle {
  display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--ink); border-radius: 50%;
  background: transparent; cursor: pointer; align-items: center; justify-content: center;
}
.nav__toggle span, .nav__toggle span::before {
  display: block; width: 16px; height: 1.5px; background: var(--ink); transition: transform 0.2s ease;
}
.nav__toggle span { position: relative; transform: translateY(-3px); }
.nav__toggle span::before { content: ""; position: absolute; top: 6px; left: 0; }
.nav__toggle[aria-expanded="true"] span { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(-90deg); }

@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .js .nav__toggle { display: inline-flex; }
  .nav { gap: 10px; }
  .js .nav__links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 4px var(--gutter) 16px; background: #fff; border-bottom: 1px solid var(--hairline);
    display: none;
  }
  .js .nav__links.is-open { display: flex; }
  .js .nav__links a { display: block; padding: 18px 0; border-bottom: 1px solid var(--hairline); font-size: 0.875rem; }
  .js .nav__links a::after { display: none; }
  .js .nav__links li:last-child a { border-bottom: 0; }
  /* Without JavaScript the links simply wrap under the logo */
  html:not(.js) .site-header .wrap { flex-wrap: wrap; padding-block: 12px; }
  html:not(.js) .nav { flex-wrap: wrap; }
}

/* ---- Hero ---- */
.hero { padding-top: clamp(14px, 1.6vw, 24px); }
.hero__media {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: #1b1c20;
  aspect-ratio: 16 / 6.2; min-height: 260px; max-height: 68vh;
}
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero__video {
  position: absolute; top: 50%; left: 50%; border: 0; pointer-events: none;
  /* cover the box with a 16:9 frame */
  width: max(100%, calc(var(--hero-h, 100vh) * 16 / 9)); aspect-ratio: 16 / 9;
  min-height: 100%; transform: translate(-50%, -50%);
  opacity: 0; transition: opacity 0.8s ease;
}
.hero__video.is-playing { opacity: 1; }
.hero__body { padding-top: clamp(22px, 2.6vw, 40px); }
.hero__body h1 { margin-top: 18px; max-width: 22em; }
.hero__foot {
  display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap;
  gap: 28px clamp(32px, 5vw, 96px); margin-top: clamp(24px, 2.8vw, 40px);
}
.facts { display: grid; grid-template-columns: repeat(4, auto); gap: 0 clamp(20px, 2.6vw, 44px); padding-top: 14px; border-top: 1px solid var(--ink); }
.facts dt { color: var(--muted); font-size: 0.875rem; line-height: 1.3; }
.facts dd { font-family: var(--display); font-weight: 600; font-size: 1.0625rem; line-height: 1.25; margin-top: 3px; white-space: nowrap; }
@media (max-width: 900px) {
  .hero__media { aspect-ratio: 4 / 3; max-height: 60vh; }
  .facts { flex: 1 1 100%; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
}

/* ---- Section headings ---- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; margin-bottom: clamp(24px, 3vw, 44px); }
.section-head p { max-width: 46ch; color: var(--muted); }

/* ---- Pricing cards ---- */
.rates { display: grid; gap: clamp(12px, 1.2vw, 18px); grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.rate {
  display: flex; flex-direction: column; padding: clamp(22px, 2.2vw, 34px);
  border: 1px solid var(--ink); border-radius: var(--radius); background: #fff;
}
.rate__price { font-family: var(--display); font-weight: 650; font-stretch: 116%; font-size: clamp(2.5rem, 2rem + 2vw, 3.75rem); line-height: 1; margin-top: 10px; letter-spacing: -0.01em; }
.rate__price small { font-family: var(--body); font-weight: 500; font-stretch: 100%; font-size: 1rem; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.rate__meta { margin: 20px 0 28px; }
.rate .btn { margin-top: auto; align-self: flex-start; }
.rate--tint { border-color: transparent; background: var(--mist); }
.rate--tint p { margin-top: 14px; }

.ticks li { position: relative; padding-left: 26px; }
.ticks li + li { margin-top: 6px; }
.ticks li::before {
  content: ""; position: absolute; left: 3px; top: 0.42em; width: 11px; height: 6px;
  border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg);
}

.included {
  display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 3fr); gap: 20px clamp(24px, 4vw, 64px);
  margin-top: clamp(12px, 1.2vw, 18px); padding: clamp(22px, 2.2vw, 34px);
  border-radius: var(--radius); background: var(--ice);
}
.included .ticks { columns: 3 220px; column-gap: 32px; }
.included .ticks li { break-inside: avoid; margin-top: 0; margin-bottom: 8px; }
@media (max-width: 760px) { .included { grid-template-columns: 1fr; } }

/* ---- The space (photo grid) ---- */
.space-grid { display: grid; grid-template-columns: repeat(20, 1fr); gap: clamp(8px, 0.9vw, 14px); }
.tile { position: relative; overflow: hidden; border-radius: var(--radius); background: #1b1c20; min-height: clamp(240px, 28vw, 760px); }
.tile:nth-child(1), .tile:nth-child(4) { grid-column: span 13; }
.tile:nth-child(2), .tile:nth-child(3) { grid-column: span 7; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tile:hover img { transform: scale(1.03); }
.tile::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0)); }
.tile figcaption { position: absolute; left: clamp(16px, 2vw, 30px); bottom: clamp(14px, 1.8vw, 26px); right: 16px; z-index: 1; color: #fff; }
@media (max-width: 760px) {
  .space-grid { grid-template-columns: 1fr; }
  .tile:nth-child(n) { grid-column: auto; min-height: 0; aspect-ratio: 4 / 3; }
}

/* ---- About band ---- */
.band { background: var(--ice); }
.band .wrap { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 3fr); gap: 24px clamp(24px, 4vw, 64px); }
.band__text { font-size: clamp(1.25rem, 1rem + 1.1vw, 1.875rem); line-height: 1.35; font-weight: 400; max-width: 34em; }
.band .btn { margin-top: clamp(24px, 3vw, 40px); }
@media (max-width: 760px) { .band .wrap { grid-template-columns: 1fr; } }

/* ---- FAQ ---- */
.faq { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.faq__list { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px 0; cursor: pointer; list-style: none;
  font-family: var(--display); font-weight: 600; font-size: 1.0625rem; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1.5px 100% no-repeat;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 44px 22px 0; max-width: 60ch; color: #2b2e33; }
.faq__photo { position: -webkit-sticky; position: sticky; top: calc(var(--header-h) + 24px); border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; max-height: 72vh; width: 100%; background: #1b1c20; }
.faq__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) {
  .faq { grid-template-columns: 1fr; }
  .faq__photo { position: relative; top: auto; order: -1; aspect-ratio: 16 / 9; }
}

/* ---- Contact panel + footer ---- */
.site-footer { padding: 0 var(--gutter) var(--gutter); max-width: var(--max); margin-inline: auto; }
.contact-panel { background: var(--panel); color: #fff; border-radius: var(--radius); padding: clamp(24px, 3vw, 48px); }
.contact-panel__top { display: flex; align-items: start; justify-content: space-between; gap: 24px; }
.contact-panel__title { text-decoration: none; }
.contact-panel__title svg { display: inline-block; width: 0.55em; height: 0.55em; margin-left: 0.15em; transition: transform 0.2s ease; }
.contact-panel__title:hover svg { transform: translate(3px, -3px); }
.social { display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 50%; transition: background-color 0.18s ease, color 0.18s ease; }
.social a:hover { background: #fff; color: var(--panel); }
.social svg { width: 18px; height: 18px; }
.contact-panel__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px clamp(24px, 4vw, 64px); margin-top: clamp(36px, 5vw, 72px); }
.contact-panel__grid .label { color: var(--on-dark-muted); margin-bottom: 8px; }
.contact-panel__big { font-family: var(--display); font-weight: 600; font-size: clamp(1.0625rem, 0.9rem + 0.7vw, 1.5rem); line-height: 1.2; text-decoration: none; overflow-wrap: anywhere; }
.contact-panel__big:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-panel address { font-style: normal; line-height: 1.5; }
.contact-panel__grid small { display: block; margin-top: 10px; color: var(--on-dark-muted); font-size: 0.875rem; }
.footer-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px 32px; margin-top: clamp(32px, 4vw, 56px); padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.footer-bar img { width: 160px; }
.footer-bar ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-bar a { font-size: 0.875rem; color: #d7dade; text-decoration: none; }
.footer-bar a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) { .contact-panel__grid { grid-template-columns: 1fr; } }

/* ---- Inner pages ---- */
.page-head { padding-top: clamp(40px, 6vw, 88px); padding-bottom: clamp(28px, 3.4vw, 48px); }
.page-head .lede { margin-top: 18px; color: #2b2e33; }

/* Contact page */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: clamp(22px, 2.6vw, 40px); border: 1px solid var(--ink); border-radius: var(--radius); }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-family: var(--display); font-weight: 600; font-size: 0.875rem; line-height: 1.3; }
.field label span { font-family: var(--body); font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #b9bfc5; border-radius: var(--radius-sm);
  background: #fff; font-size: 1rem; line-height: 1.4; appearance: none; -webkit-appearance: none;
}
.field select {
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 21px) 22px, calc(100% - 15px) 22px; background-size: 6px 6px; background-repeat: no-repeat;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field [aria-invalid="true"] { border-color: #b3261e; }
.btn[disabled] { opacity: 0.55; cursor: progress; }
#enquiry-status.is-success { color: #1d6b3a; font-weight: 500; }
#enquiry-status.is-error { color: #b3261e; font-weight: 500; }
.form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.form__foot p { flex: 1 1 260px; font-size: 0.9375rem; color: var(--muted); }
.details { border-top: 1px solid var(--ink); }
.details > div { padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.details dt { color: var(--muted); font-size: 0.875rem; margin-bottom: 4px; }
.details dd { font-family: var(--display); font-weight: 600; font-size: 1.1875rem; line-height: 1.3; overflow-wrap: anywhere; }
.details dd.plain { font-family: var(--body); font-weight: 400; font-size: 1.0625rem; line-height: 1.5; }
.details a { text-underline-offset: 4px; }
.details .btn { margin-top: 14px; }
@media (max-width: 900px) { .contact-layout { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* Legal pages */
.prose { max-width: 70ch; }
.prose h2 { font-family: var(--display); font-weight: 650; font-stretch: 110%; font-size: 1.25rem; line-height: 1.2; text-transform: uppercase; margin: 2.4em 0 0.7em; }
.prose h3 { font-family: var(--display); font-weight: 600; font-size: 1.0625rem; margin: 1.6em 0 0.4em; }
.prose p { margin-bottom: 1em; }
.prose ul { margin: 0 0 1.2em; padding-left: 1.2em; list-style: disc; }
.prose li { margin-bottom: 0.35em; }
.prose li p { margin: 0; }
.prose a { text-underline-offset: 3px; overflow-wrap: anywhere; }

/* 404 */
.notfound { min-height: 52vh; display: grid; align-content: center; justify-items: start; gap: 22px; }

/* ---- Motion preferences ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .tile:hover img { transform: none; }
}

@media print {
  .site-header, .hero__video, .nav__toggle { display: none !important; }
}
