/* RoHouse Creative. Tokens first; the brand green is Pantone 7763 C (screen value to be confirmed, see brand/README.md). */
:root {
  --moss: #628556;      /* Pantone 7763 C, placeholder conversion */
  --fir: #1f2d22;
  --limewash: #e8ece3;
  --paper: #f7f8f4;
  --butter: #f0de9a;

  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --text: "Newsreader", Georgia, "Times New Roman", serif;

  --step-0: clamp(1.0625rem, 1.02rem + 0.2vw, 1.1875rem);
  --step-1: clamp(1.3rem, 1.2rem + 0.5vw, 1.6rem);
  --step-2: clamp(1.8rem, 1.5rem + 1.4vw, 2.6rem);
  --step-3: clamp(2.4rem, 1.7rem + 3.2vw, 4.4rem);

  --gutter: clamp(1rem, 4vw, 3rem);
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--fir);
  font: 400 var(--step-0)/1.65 var(--text);
}
img, svg { max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
:focus-visible { outline: 3px solid var(--fir); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible { outline-color: var(--butter); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: var(--step-3); font-weight: 800; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }

.wrap { width: min(100% - 2 * var(--gutter), 76rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: var(--fir); color: var(--limewash); padding: 0.6rem 1rem; z-index: 10; }
.skip:focus { left: var(--gutter); }

/* The wordmark is the traced logo, painted with a mask so it can take any colour. */
.wordmark {
  display: block;
  aspect-ratio: 3000 / 517;
  background-color: currentColor;
  -webkit-mask: url("/assets/rohouse-wordmark.svg") center / contain no-repeat;
          mask: url("/assets/rohouse-wordmark.svg") center / contain no-repeat;
}

/* Header */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.1rem; }
.bar .wordmark { width: 7.5rem; }
.bar nav { display: flex; gap: clamp(1rem, 3vw, 2rem); font-family: var(--display); font-weight: 500; }
.bar nav a { text-decoration: none; padding-block: 0.4rem; }
.bar nav a:hover { text-decoration: underline; }

/* Buttons */
.button {
  display: inline-block;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
  background: var(--fir); color: var(--limewash);
  padding: 0.85em 1.6em; border-radius: 999px; text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.button:hover { background: var(--moss); color: var(--fir); }
.on-dark .button { background: var(--butter); color: var(--fir); }
.on-dark .button:hover { background: var(--limewash); }

/* Hero: the wordmark fills the width on the brand green; the words sit on paper below it. */
.hero-band { background: var(--moss); color: var(--limewash); padding-block: clamp(2.5rem, 8vw, 6rem); }
.hero-band .wordmark { width: 100%; }
.hero-copy { padding-block: clamp(2rem, 5vw, 4rem); display: grid; gap: 1.5rem 4rem; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: end; }
.hero-copy h1 { margin: 0; max-width: 16ch; }
.hero-copy p { margin: 0 0 1.25rem; }

/* Services: each way of working is a tilted oval, the shape inside the logo's O. */
.ways { padding-block: clamp(3rem, 8vw, 6rem); }
.ways > .wrap > p { margin-bottom: 3rem; }
.ovals { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: start; }
.oval { position: relative; isolation: isolate; aspect-ratio: 4 / 5; padding: 0 clamp(2.5rem, 5.5vw, 4.5rem); display: flex; flex-direction: column; justify-content: center; }
.oval::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%;
  transform: rotate(-12deg);
  animation: tilt 1s cubic-bezier(.2, .7, .2, 1) both;
}
.oval:nth-child(1)::before { background: var(--butter); }
.oval:nth-child(2)::before { background: var(--limewash); border: 3px solid var(--moss); }
.oval:nth-child(3)::before { background: var(--fir); }
.oval:nth-child(3) { color: var(--limewash); }
.oval:nth-child(2) { margin-top: 3rem; }
.oval h3 { margin-bottom: 0.4em; }
.oval p { font-size: 1rem; line-height: 1.5; margin-bottom: 0.75rem; }
.oval .for { font-family: var(--display); font-weight: 600; font-size: 0.95rem; }
@keyframes tilt { from { transform: rotate(0deg) scale(0.94); } to { transform: rotate(-12deg) scale(1); } }

/* Process: a real sequence, so it is numbered. */
.process { background: var(--fir); color: var(--limewash); padding-block: clamp(3rem, 8vw, 6rem); }
.process ol { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; counter-reset: step; }
.process li { counter-increment: step; border-top: 2px solid var(--moss); padding-top: 1.25rem; }
.process li::before { content: counter(step); display: block; font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--butter); margin-bottom: 0.75rem; }
.process h3 { font-size: 1.2rem; margin-bottom: 0.35em; }
.process li p { font-size: 1rem; line-height: 1.55; margin: 0; }

/* Closing call */
.call { padding-block: clamp(3rem, 8vw, 6rem); display: grid; gap: 1.5rem; justify-items: start; }
.call h2 { max-width: 18ch; margin: 0; }

/* Footer */
.foot { background: var(--fir); color: var(--limewash); padding-block: 2.5rem; font-family: var(--display); font-weight: 500; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem 3rem; align-items: center; justify-content: space-between; }
.foot .wordmark { width: 9rem; color: var(--moss); }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* Plain pages (contact, 404) */
.plain { padding-block: clamp(3rem, 8vw, 6rem); }

@media (max-width: 52rem) {
  .hero-copy { grid-template-columns: 1fr; }
  .ovals { grid-template-columns: 1fr; gap: 1rem; }
  .oval:nth-child(2) { margin-top: 0; }
  .oval { max-width: 26rem; width: 100%; margin-inline: auto; }
  .process ol { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 34rem) {
  .bar nav a:not(.keep) { display: none; }
  .process ol { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .oval::before { animation: none; }
  .button { transition: none; }
}
