/* ==========================================================================
   Viera Studios — pre-launch site
   Palette and art direction are sampled directly from the supplied logo
   (white script on a #97C5DA plate) and the two campaign photographs.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */

:root {
  /* Surfaces and ink */
  --paper: #f7f3ed;        /* warm linen, from the shirting */
  --paper-deep: #efe7dc;   /* sun-bleached stone */
  --ink: #14233a;          /* navy, from the sun hat */
  --ink-muted: #4b5a70;
  --blue: #97c5da;         /* the logo plate, exactly */
  --accent: #c4115d;       /* bougainvillea */
  --white: #fff;

  --rule: rgb(20 35 58 / 0.14);
  --rule-strong: rgb(20 35 58 / 0.3);
  --rule-light: rgb(255 255 255 / 0.28);

  /* Type */
  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype",
    Palatino, Georgia, "Times New Roman", serif;
  --font-sans: "Jost", "Futura", "Century Gothic", "Avenir Next", "Segoe UI",
    system-ui, sans-serif;

  --fs-display: clamp(2.6rem, 1.3rem + 5.4vw, 5.75rem);
  --fs-title: clamp(2.1rem, 1.35rem + 3.2vw, 4.25rem);
  --fs-heading: clamp(1.6rem, 1.2rem + 1.9vw, 2.75rem);
  --fs-lead: clamp(1.18rem, 1.02rem + 0.72vw, 1.7rem);
  --fs-body: clamp(1rem, 0.97rem + 0.16vw, 1.075rem);
  --fs-small: 0.875rem;
  --fs-label: 0.6875rem;

  /* Rhythm */
  --gutter: clamp(1.375rem, 5vw, 5rem);
  --shell: 1320px;
  --section-space: clamp(4.5rem, 10vw, 9.5rem);
  --masthead-h: 4.5rem;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --focus: var(--accent);

  color-scheme: light;
}

@media (min-width: 60em) {
  :root { --masthead-h: 5.5rem; }
}

/* --------------------------------------------------------------------------
   Reset and base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, figure, blockquote, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }

/* Cropped frames size their own box. The <picture> wrapper has to fill that
   height or the image inside it collapses to its natural ratio. */
.hero__figure picture,
.editorial__frame picture,
.feature__frame picture,
.contact__frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection {
  background: var(--blue);
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  z-index: 100;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.75rem 1.25rem;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.2s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline-color: var(--blue);
}

.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.shell--narrow { --shell: 960px; }

/* Small tracked caps used for section labels and captions. */
.label {
  display: block;
  margin: 0;
  color: var(--ink-muted);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.24em;
  line-height: 1.6;
  text-transform: uppercase;
}

.label--rule {
  display: flex;
  align-items: center;
  gap: 1.125rem;
}

.label--rule::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  max-width: 7rem;
  background: var(--rule-strong);
}

.display,
.title,
.heading {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.display { font-size: var(--fs-display); }
.title { font-size: var(--fs-title); }
.heading { font-size: var(--fs-heading); line-height: 1.12; }

.lead {
  max-width: 34ch;
  font-family: var(--font-display);
  font-size: var(--fs-lead);
  font-weight: 300;
  line-height: 1.48;
}

.prose p {
  max-width: 62ch;
  color: var(--ink-muted);
}

.prose p + p { margin-top: 1.4em; }

/* Understated editorial link: the rule grows in from the left on hover. */
.link {
  position: relative;
  display: inline-block;
  padding-bottom: 0.3em;
  color: var(--ink);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.35s var(--ease);
}

.link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
  transform-origin: left;
  transition: transform 0.45s var(--ease), opacity 0.35s var(--ease);
}

.link:hover { color: var(--accent); }
.link:hover::after { opacity: 1; transform: scaleX(1.06); }

/* On the brand-blue surfaces the bougainvillea accent drops below an
   accessible contrast ratio, so those links deepen their rule instead. */
.hero__panel,
.tile { --focus: var(--ink); }

.hero__panel .link:hover,
.tile .link:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.masthead {
  --focus: var(--ink);
  position: sticky;
  z-index: 50;
  top: 0;
  background-color: #97c5da;
  background-color: var(--blue);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--ease);
}

[data-scrolled] .masthead { border-bottom-color: rgb(20 35 58 / 0.12); }

html[data-nav-open] { overflow: hidden; }

.masthead__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--masthead-h);
}

/* The wordmark is white on the same powder-blue as the bar. */
.masthead__mark {
  display: block;
  padding: 0.6rem 0.85rem;
  line-height: 0;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.masthead__mark img { width: clamp(7rem, 5rem + 4.5vw, 9.25rem); }

/* On the home page the hero already carries a full-scale lockup, so the
   masthead mark holds back until the hero has been scrolled past. */
.has-js .page-home .masthead__mark {
  opacity: 0;
  transform: translateY(-0.4rem);
  pointer-events: none;
}

.has-js[data-scrolled] .page-home .masthead__mark {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.75rem);
}

.nav__link {
  position: relative;
  display: block;
  padding: 0.35rem 0;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.35s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}

.nav__link:hover { color: var(--accent); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav__link[aria-current="page"] { color: var(--ink); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* Menu button — mobile only */
.nav__toggle {
  display: none;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;
  padding: 0.6rem 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: inherit;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav__toggle-icon {
  position: relative;
  width: 1.375rem;
  height: 0.5rem;
}

.nav__toggle-icon::before,
.nav__toggle-icon::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 1px;
  background: currentColor;
  transition: transform 0.35s var(--ease);
}

.nav__toggle-icon::before { top: 0; }
.nav__toggle-icon::after { bottom: 0; }

.nav__toggle[aria-expanded="true"] .nav__toggle-icon::before {
  transform: translateY(0.25rem) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-icon::after {
  transform: translateY(-0.25rem) rotate(-45deg);
}

@media (max-width: 47.99em) {
  .nav__toggle { display: flex; }

  .nav__panel {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    z-index: 2;
    visibility: hidden;
    padding: 0.5rem 0 2.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    opacity: 0;
    transform: translateY(-0.75rem);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease),
      visibility 0.35s;
  }

  [data-nav-open] .nav__panel {
    visibility: visible;
    opacity: 1;
    transform: none;
  }

  .nav__panel .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: min(100% - (var(--gutter) * 2), var(--shell));
    margin-inline: auto;
  }

  .nav__panel .nav__link {
    padding: 1.05rem 0;
    border-bottom: 1px solid var(--rule);
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 300;
    letter-spacing: 0;
    text-transform: none;
  }

  .nav__panel .nav__link::after { display: none; }

  .nav__panel .nav__link[aria-current="page"] { color: var(--accent); }
}

@media (min-width: 48em) {
  .nav__panel { display: block !important; }
}

/* --------------------------------------------------------------------------
   Home — hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-rows: auto minmax(38svh, 1fr);
  min-height: calc(100svh - var(--masthead-h));
  position: relative;
  z-index: 0;
}

.hero__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding: clamp(2.75rem, 7vw, 5rem) var(--gutter);
  background: var(--blue);
}

/* The supplied lockup, kept at its own proportions and never stretched. */
.hero__lockup { margin: 0; }

.hero__lockup img {
  width: clamp(13.75rem, 30vw, 26rem);
  height: auto;
}

.hero__message {
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.1rem + 1.9vw, 2.6rem);
  font-weight: 300;
  line-height: 1.2;
  text-wrap: balance;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 2.25rem;
}

.hero__figure {
  position: relative;
  overflow: hidden;
  min-height: 38svh;
}

.hero__figure picture,
.hero__figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__figure img {
  /* Bias toward the crown of the hat so it is not cropped on wide screens. */
  object-fit: cover;
  object-position: 58% 8%;
}

@media (min-width: 56em) {
  .hero {
    grid-template-rows: none;
    grid-template-columns: minmax(0, 46fr) minmax(0, 54fr);
    height: calc(100svh - var(--masthead-h));
  }

  .hero__panel {
    padding-inline: clamp(2.5rem, 5vw, 5.5rem);
  }

  .hero__figure img { object-position: 62% 10%; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding-block: var(--section-space); }
.section--tight { padding-block: clamp(3.25rem, 7vw, 6rem); }

.section--stone { background: var(--paper-deep); }

.statement {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
}

.statement__head,
.statement__body {
  display: grid;
  align-content: start;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

@media (min-width: 56em) {
  .statement { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .statement__body { padding-top: 0.5rem; }
}

@media (min-width: 72em) {
  .statement { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); }
}

/* --------------------------------------------------------------------------
   Editorial composition
   -------------------------------------------------------------------------- */

.editorial {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

.editorial__figure { margin: 0; }

.editorial__frame {
  overflow: hidden;
  background: var(--paper-deep);
}

.editorial__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editorial__caption {
  display: flex;
  gap: 1rem;
  margin-top: 1.125rem;
  color: var(--ink-muted);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.editorial__caption span:first-child { color: var(--accent); }

/* A brand-blue tile stands in for a third photograph and keeps the
   composition from becoming a plain image grid. */
.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(2rem, 4vw, 3rem);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: var(--blue);
}

.tile__text {
  max-width: 24ch;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.05rem + 1.2vw, 2.1rem);
  font-weight: 300;
  line-height: 1.24;
}

/* 6/7 matches the supplied photography, so the portrait frames never crop
   into the figure. */
.editorial__portrait .editorial__frame { aspect-ratio: 6 / 7; }
.editorial__detail .editorial__frame { aspect-ratio: 4 / 5; }

/* Closer portraits: keep the hat brim and face inside the crop. */
.editorial__detail img { object-position: 48% 12%; }

@media (min-width: 56em) {
  .editorial {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: start;
  }

  .editorial__portrait { grid-column: 1 / span 6; }

  .editorial__aside {
    display: grid;
    gap: clamp(2rem, 4vw, 3rem);
    grid-column: 8 / span 5;
    /* Drops the right-hand column against the portrait for an offset set. */
    margin-top: clamp(3rem, 8vw, 7rem);
  }
}

/* --------------------------------------------------------------------------
   Page header (About, Contact)
   -------------------------------------------------------------------------- */

.page-header {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
  padding-top: clamp(3rem, 8vw, 6.5rem);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

.page-header__title { max-width: 16ch; }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.feature {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.feature__frame {
  overflow: hidden;
  aspect-ratio: 6 / 7;
  background: var(--paper-deep);
}

.feature__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 12%;
}

.feature__frame--sky img { object-position: 42% 12%; }

.about-close {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.25rem);
}

@media (min-width: 56em) {
  .feature { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
  .feature--reverse .feature__figure { order: 2; }
}

.pullquote {
  display: grid;
  gap: 1.5rem;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.pullquote blockquote p {
  max-width: 24ch;
  font-family: var(--font-display);
  font-size: var(--fs-heading);
  font-weight: 300;
  font-style: italic;
  line-height: 1.22;
  text-wrap: balance;
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact__body { display: grid; gap: clamp(2.25rem, 4vw, 3.25rem); }

/* The address is the page's single most important element. */
.contact__address {
  display: inline-block;
  max-width: 100%;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 0.9rem + 3.6vw, 3.75rem);
  font-weight: 300;
  line-height: 1.1;
  text-decoration: none;
  overflow-wrap: break-word;
  transition: color 0.4s var(--ease);
}

.contact__address span {
  display: inline-block;
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 0.08em;
  transition: border-color 0.4s var(--ease);
}

.contact__address:hover { color: var(--accent); }
.contact__address:hover span { border-bottom-color: currentColor; }

.enquiries {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule);
}

.enquiries li { border-bottom: 1px solid var(--rule); }

.enquiries a {
  display: grid;
  gap: 0.15rem 2rem;
  padding: 1.35rem 0;
  text-decoration: none;
  transition: color 0.35s var(--ease);
}

.enquiries a:hover { color: var(--accent); }

.enquiries__term {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.enquiries__note {
  color: var(--ink-muted);
  font-size: var(--fs-small);
  transition: color 0.35s var(--ease);
}

.enquiries a:hover .enquiries__note { color: inherit; }

@media (min-width: 42em) {
  .enquiries a {
    grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
    align-items: baseline;
  }
}

.contact__figure { margin: 0; }

.contact__frame {
  overflow: hidden;
  aspect-ratio: 445 / 714;
  background: var(--paper-deep);
}

.contact__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 42% 10%;
}

@media (min-width: 56em) {
  .contact { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .contact__figure { margin-top: clamp(1rem, 3vw, 2.5rem); }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  --focus: var(--blue);
  padding-block: clamp(3rem, 7vw, 5rem);
  background: var(--ink);
  color: var(--paper);
}

.footer__top {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(2.25rem, 5vw, 3rem);
  border-bottom: 1px solid var(--rule-light);
}

.footer__mark img { width: clamp(9rem, 18vw, 12.5rem); }

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 2.5rem;
}

.footer__links a {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.35s var(--ease);
}

.footer__links a:hover { color: var(--blue); }

.footer__email {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.05rem + 1.1vw, 1.9rem);
  font-weight: 300;
  text-decoration: none;
  border-bottom: 1px solid var(--rule-light);
  padding-bottom: 0.1em;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.footer__email:hover { color: var(--blue); border-bottom-color: currentColor; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: clamp(1.5rem, 3vw, 2rem);
  color: rgb(247 243 237 / 0.72);
  font-size: var(--fs-small);
}

@media (min-width: 48em) {
  .footer__top {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .footer__contact {
    display: grid;
    justify-items: end;
    gap: 1.25rem;
  }
}

/* --------------------------------------------------------------------------
   Motion — every effect below is opt-out by preference
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  /* Text only — photography stays visible so the page never looks unloaded. */
  .has-js [data-reveal] {
    opacity: 0;
    transform: translateY(0.85rem);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  }

  .has-js [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
  }

  .has-js [data-reveal][data-reveal-delay="1"] { transition-delay: 0.1s; }
  .has-js [data-reveal][data-reveal-delay="2"] { transition-delay: 0.2s; }

  .editorial__frame img,
  .feature__frame img,
  .contact__frame img {
    transition: transform 1.2s var(--ease);
  }

  .editorial__figure:hover .editorial__frame img { transform: scale(1.03); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .masthead, .nav__toggle { position: static; }
  .footer { background: none; color: #000; }
  body { background: #fff; }
}
