/* Grapho&Co base: fonts, reset and shared components.
   trait.css sets the tokens and the layout. */

@font-face {
  font-family: "Grapho Script";
  src: url("../fonts/grapho-script.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  /* Type scale (Bringhurst): 14 16 18 21 24 36 48 72 */
  --step--1: 0.875rem;
  --step-0: 1.125rem;
  --step-1: 1.3125rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.2rem + 2.2vw, 2.25rem);
  --step-4: clamp(2.25rem, 1.5rem + 3vw, 3rem);
  --step-5: clamp(3rem, 1.8rem + 5vw, 4.5rem);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 2rem;
  --space-4: 4rem;
  --space-5: 6rem;

  --font-script: "Grapho Script", cursive;
  --page-max: 76rem;
  --dur-quick: 160ms;
  --ease-pen: cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--step-0) / var(--leading) var(--font-text);
}
a {
  color: var(--primary);
  text-decoration-color: var(--link-line);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}
a:hover {
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 2px;
}
p,
ul,
dl {
  margin: 0 0 var(--space-2);
}
strong {
  font-weight: 700;
}

.skip {
  position: absolute;
  left: var(--space-2);
  top: -4rem;
  z-index: 10;
  padding: var(--space-1) var(--space-2);
  background: var(--primary);
  color: var(--on-primary);
}
.skip:focus {
  top: var(--space-2);
}

.page {
  position: relative;
  max-width: var(--page-max);
  margin-inline: auto;
}

/* ------------------------------------------------------------- navigation */

/* Sticky menu, one line at every width: the links scroll sideways on phones. */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--bg);
  font-size: 0.9375rem;
  transition: box-shadow var(--dur-quick);
}
.top__links {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  white-space: nowrap;
  scrollbar-width: none;
}
.top__links a {
  color: var(--muted);
  text-decoration: none;
}
.top__links a:hover {
  color: var(--primary);
}
/* The booking button joins the menu once the hero's one has scrolled away (nav.js). */
/* Hidden, it takes no room, so the links keep the whole line. */
.top .top__cta {
  flex: none;
  max-width: 0;
  margin-left: calc(-1 * var(--space-3));
  padding: 0.45rem 0;
  overflow: hidden;
  font-size: var(--step--1);
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: max-width 240ms var(--ease-pen), padding 240ms var(--ease-pen), margin 240ms var(--ease-pen), opacity 240ms, visibility 240ms, background-color var(--dur-quick);
}
.top[data-scrolled] {
  box-shadow: 0 1px 0 var(--rule);
}
.top[data-scrolled] .top__cta {
  max-width: 14rem;
  margin-left: 0;
  padding-inline: 1rem;
  opacity: 1;
  visibility: visible;
}
[id] {
  scroll-margin-top: 5rem; /* anchors land below the sticky menu */
}
/* ------------------------------------------------------------- hero */

.hero__title {
  margin: 0;
}
.hero__logo {
  display: block;
  width: min(100%, 44rem);
  height: auto;
}
.hero__logo g {
  stroke: var(--primary);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
}
.button {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  text-decoration: none;
  transition: background-color var(--dur-quick);
}
.button:hover {
  background: var(--text);
}

/* ------------------------------------------------------------- sections */

.co {
  margin: 0;
  font-weight: 400;
}
.body h3 {
  margin: var(--space-3) 0 var(--space-1);
  font: 700 var(--step-1) / 1.3 var(--font-display);
  color: var(--text);
}
.body ul {
  padding-left: 1.1em;
}
.body li {
  margin-bottom: var(--space-1);
  padding-left: 0.2em;
}
.body li::marker {
  color: var(--marker);
}
.source {
  color: var(--muted);
  font-size: var(--step--1);
  white-space: nowrap;
}
.note {
  color: var(--muted);
  font-size: var(--step--1);
  line-height: 1.45;
}
.note p {
  margin-bottom: var(--space-2);
}

details {
  margin-top: var(--space-2);
  border-block: 1px solid var(--rule);
}
summary {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: var(--space-2);
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "+";
  font: 400 var(--step-2) / 1 var(--font-text);
  transition: transform var(--dur-quick) var(--ease-pen);
}
details[open] summary::after {
  transform: rotate(45deg);
}

.contact-lines {
  font-size: var(--step-1);
}
.contact-lines dt {
  color: var(--muted);
  font-size: var(--step--1);
}
.contact-lines dd {
  margin: 0 0 var(--space-2);
}
.places {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--space-3);
  margin-block: var(--space-3);
}
.place {
  font-style: normal;
}
.place strong {
  display: block;
  color: var(--primary);
  font-size: var(--step-1);
}
.place p {
  margin-bottom: var(--space-1);
}

/* ------------------------------------------------------------- footer */

.footer {
  color: var(--muted);
  font-size: var(--step--1);
}
/* The logo as a mask, so it takes the primary colour. */
.footer__logo {
  display: block;
  width: 9rem;
  aspect-ratio: 5697 / 1208;
  margin-bottom: var(--space-2);
  background: var(--primary);
  mask: url("../logo/grapho-co-small.svg") center / contain no-repeat;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
