/* Aurum Haven brand system: tokens, base styles and shared components.
   How to use it is documented in CLAUDE.md. Colours never appear outside :root. */

:root {
  /* Colour */
  --color-terracotta: #c85d3a;
  --color-sage: #8dae8b;
  --color-blush: #fff7f1;
  --color-sand: #f4e9e1;
  --color-parchment: #f8f6f2;
  --color-offwhite: #f4f4f4;
  --color-charcoal: #2d2d2d;
  --color-grey: #868686;
  --color-white: #ffffff;
  --color-overlay: rgb(0 0 0 / 50%);

  /* Type */
  --font-sans: Manrope, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --text-hero: 54px;
  --leading-hero: 60px;
  --text-title: 32px;
  --leading-title: 44px;
  --text-lead: 24px;
  --leading-lead: 30px;
  --text-tab: 20px;
  --leading-tab: 44px;
  --text-body: 14px;
  --leading-body: 20px;
  --text-prose: 16px;
  --leading-prose: 26px;
  --text-small: 12px;
  --tracking-button: 2px;

  /* Shape and space */
  --radius: 20px;
  --radius-small: 12px;
  --radius-pill: 100px;
  --inset: 15px;
  --gutter: 200px;
  --section-space: 160px;
  --card-pad: 60px;
  --header-pad-x: 80px;
}

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

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

body {
  position: relative;
  display: flow-root;
  margin: 0;
  background-color: var(--color-blush);
  color: var(--color-charcoal);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}

h1, h2, h3, h4, p, ul {
  margin: 0;
}

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

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

[id] {
  scroll-margin-top: 24px;
}

:focus-visible {
  outline: 2px solid var(--color-terracotta);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--inset);
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--color-charcoal);
  color: var(--color-parchment);
}

.skip-link:focus {
  top: var(--inset);
}

/* Type */
.title {
  font-size: var(--text-title);
  line-height: var(--leading-title);
  font-weight: 700;
}

.lead {
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
  font-weight: 700;
}

.lead--medium {
  font-weight: 500;
}

.bullet-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
  padding-left: 40px;
}

/* Buttons */
.button {
  display: inline-block;
  padding: 12px 25px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--text-small);
  line-height: 20px;
  letter-spacing: var(--tracking-button);
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.button--primary {
  background-color: var(--color-terracotta);
  color: var(--color-parchment);
}

.button--primary:hover {
  background-color: var(--color-sage);
  color: var(--color-white);
}

.button--secondary {
  border-color: var(--color-offwhite);
  background-color: transparent;
  color: var(--color-offwhite);
}

.button--secondary:hover {
  background-color: var(--color-offwhite);
  color: var(--color-charcoal);
}

.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Header and navigation (sits over the first dark panel on every page) */
.site-header {
  position: absolute;
  top: var(--inset);
  left: var(--inset);
  right: var(--inset);
  z-index: 10;
  padding: 40px var(--header-pad-x) 0;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__logo {
  flex-shrink: 0;
}

.site-header__logo img {
  width: 153px;
}

.nav-toggle {
  display: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav__list {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: block;
  padding: 5px 10px;
  border-radius: 4px;
  color: var(--color-parchment);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.25px;
  text-decoration: none;
}

.site-nav__link:hover,
.site-nav__link[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Card */
.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: var(--card-pad);
  border-radius: var(--radius);
  background-color: var(--color-sand);
}

.card .lead {
  margin-bottom: 10px;
}

/* Dark image call-to-action banner. Add a modifier in pages.css for the image. */
.cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  min-height: 300px;
  padding: var(--card-pad);
  border-radius: var(--radius);
  background-color: var(--color-charcoal);
  background-position: 50% 100%;
  background-size: cover;
}

.cta-banner__text {
  width: 70%;
  color: var(--color-parchment);
}

/* Tabs (layout matches the mock-up's services list) */
.tabs {
  display: flex;
  gap: 30px;
  padding-top: 40px;
}

.tabs__list {
  display: none;
}

.js .tabs__list {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.tabs__tab {
  width: 100%;
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-grey);
  font-family: var(--font-sans);
  font-size: var(--text-tab);
  font-weight: 700;
  line-height: var(--leading-tab);
  text-align: left;
  cursor: pointer;
}

.tabs__tab::after {
  content: "";
  display: block;
  width: 80%;
  height: 1px;
  background-color: var(--color-grey);
}

.tabs__tab:hover,
.tabs__tab[aria-selected="true"] {
  color: var(--color-charcoal);
}

.tabs__tab[aria-selected="true"]::after {
  background-color: var(--color-charcoal);
}

.tabs__panels {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 30px;
}

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

.tabs__body {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 40px;
  border-radius: var(--radius) var(--radius) 0 0;
  background-color: var(--color-sand);
}

.tabs__panel-title {
  font-size: var(--text-lead);
  line-height: var(--leading-lead);
}

.js .tabs__panel-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tabs__intro {
  padding-bottom: 10px;
}

.tabs__note {
  font-size: var(--text-small);
}

.tabs__media {
  overflow: hidden;
  border-radius: var(--radius);
}

.tabs__image {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* Desktop: tuck the image under the panel so its rounded corners don't leave a gap. */
@media (min-width: 992px) {
  .tabs__body {
    padding-bottom: 70px; /* 40px clear of the image after the 30px tuck */
  }

  .tabs__media {
    margin-top: -30px;
  }
}

/* Subtle scroll parallax. js/site.js adds .is-parallax and sets --parallax-y;
   the image is scaled up slightly so it never shows an edge inside its frame. */
.is-parallax img {
  transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1.1);
  will-change: transform;
}

/* Background photos (data-parallax="background"): a taller copy of the element's
   background moves behind the content. Without JS the plain background shows. */
[data-parallax="background"].is-parallax {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

[data-parallax="background"].is-parallax::before {
  content: "";
  position: absolute;
  inset: -10% 0;
  z-index: -1;
  background: inherit;
  border-radius: 0;
  transform: translate3d(0, var(--parallax-y, 0px), 0);
  will-change: transform;
}

/* Read more toggle */
.read-more {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--color-charcoal);
  font-family: var(--font-sans);
  font-size: var(--text-small);
  font-weight: 700;
  line-height: 20px;
  cursor: pointer;
}

.read-more img {
  transition: transform 0.2s;
}

.read-more[aria-expanded="true"] img {
  transform: rotate(180deg);
}

/* Footer */
.site-footer {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin: 0 var(--gutter) 40px;
  padding: 50px;
  border-radius: var(--radius);
  background-color: var(--color-terracotta);
  color: var(--color-offwhite);
}

.site-footer :focus-visible {
  outline-color: var(--color-offwhite);
}

.site-footer__pitch {
  margin-top: 20px;
}

.site-footer__email {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  font-size: var(--text-small);
  line-height: 12px;
  text-decoration: none;
}

.site-footer__email:hover,
.site-footer__links a:hover {
  text-decoration: underline;
}

.site-footer__rule {
  width: 100%;
  height: 1px;
  margin: 0;
  border: 0;
  background-color: var(--color-offwhite);
}

.site-footer__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.site-footer__small,
.site-footer__links {
  font-size: var(--text-small);
  line-height: 12px;
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  text-decoration: none;
}

/* Responsive tokens: components scale by reading these, not by their own media queries. */
@media (max-width: 1439px) {
  :root {
    --gutter: 120px;
  }
}

@media (max-width: 1199px) {
  :root {
    --gutter: 64px;
    --card-pad: 32px;
    --header-pad-x: 48px;
  }
}

@media (max-width: 991px) {
  :root {
    --gutter: 32px;
    --header-pad-x: 32px;
    --text-hero: 40px;
    --leading-hero: 46px;
  }

  .site-header__bar,
  .site-nav,
  .site-nav__list {
    flex-wrap: wrap;
  }

  .tabs {
    flex-direction: column;
  }

  .js .tabs__list,
  .js .tabs__panels {
    width: 100%;
  }
}

@media (max-width: 767px) {
  :root {
    --gutter: 16px;
    --header-pad-x: 16px;
    --section-space: 80px;
    --card-pad: 24px;
    --text-hero: 32px;
    --leading-hero: 38px;
    --text-title: 26px;
    --leading-title: 32px;
    --text-lead: 20px;
    --leading-lead: 26px;
  }

  .site-header {
    padding-top: 24px;
  }

  .site-header__logo img {
    width: 120px;
  }

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
  }

  .cta-banner__text {
    width: 100%;
  }

  .js .tabs__list {
    flex-direction: row;
    gap: 20px;
    overflow-x: auto;
    padding-right: 48px;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, var(--color-charcoal) calc(100% - 48px), transparent);
    mask-image: linear-gradient(to right, var(--color-charcoal) calc(100% - 48px), transparent);
  }

  .tabs__tab {
    flex: none;
    width: auto;
    margin-top: 0;
    font-size: 16px;
    line-height: 40px;
    white-space: nowrap;
  }

  .tabs__tab::after {
    width: 100%;
  }

  .tabs__body {
    padding: 24px;
  }

  .bullet-list {
    padding-left: 20px;
  }

  .site-footer {
    padding: 32px 24px;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer__small,
  .site-footer__links {
    line-height: 18px;
  }
}

/* Mobile navigation (below 992px). Without JS the links simply wrap under the logo. */
@media (max-width: 991px) {
  html:not(.js) .hero {
    padding-top: 300px;
  }

  .js .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--color-offwhite);
    border-radius: 50%;
    background: transparent;
    color: var(--color-offwhite);
    cursor: pointer;
  }

  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background-color: currentColor;
    transition: transform 0.2s, background-color 0.2s;
  }

  .nav-toggle__bars {
    position: relative;
  }

  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .nav-toggle__bars::before {
    top: -6px;
  }

  .nav-toggle__bars::after {
    top: 6px;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bars {
    background-color: transparent;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
    transform: translateY(6px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
    transform: translateY(-6px) rotate(-45deg);
  }

  .js .site-nav {
    position: absolute;
    top: calc(100% + 12px);
    left: var(--header-pad-x);
    right: var(--header-pad-x);
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 16px;
    padding: 24px;
    border-radius: var(--radius);
    background-color: var(--color-charcoal);
    box-shadow: 0 8px 50px var(--color-overlay);
  }

  .js .site-nav:not(.is-open) {
    display: none;
  }

  .js .site-nav__list {
    flex-direction: column;
  }

  .js .site-nav__link {
    padding: 12px 8px;
    font-size: 16px;
  }
}

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-weight: 700;
}

.field__optional {
  font-weight: 400;
}

.field__input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-charcoal);
  border-radius: var(--radius-small);
  background-color: var(--color-parchment);
  color: var(--color-charcoal);
  font-family: var(--font-sans);
  font-size: var(--text-prose);
  line-height: 24px;
}

.field__input:focus-visible {
  outline-offset: 1px;
}

.field__input[aria-invalid="true"] {
  border-width: 2px;
  border-color: var(--color-terracotta);
}

textarea.field__input {
  min-height: 160px;
  resize: vertical;
}

select.field__input {
  padding-right: 44px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%232d2d2d' stroke-width='1.5'/%3E%3C/svg%3E");
  background-position: right 16px center;
  background-repeat: no-repeat;
}

.field__error {
  padding-left: 10px;
  border-left: 3px solid var(--color-terracotta);
  font-weight: 700;
}

.field--check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 12px;
  row-gap: 6px;
}

.field--check input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--color-terracotta);
}

.field--check .field__error {
  grid-column: 1 / -1;
}

.form-status,
.draft-notice {
  padding: 16px 20px;
  border-left: 3px solid var(--color-terracotta);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background-color: var(--color-sand);
}

.form-status a {
  font-weight: 700;
}

.form__submit {
  align-self: flex-start;
}

.form-success {
  display: none;
}

.form-success:target,
.form-success.is-visible {
  display: flex;
}

@media (max-width: 767px) {
  .form__submit {
    align-self: stretch;
  }
}
