/* ==========================================================================
   Foodhaven — site styles
   Design tokens live in :root. Brand green sampled from the original: #82C35B
   ========================================================================== */

@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('../fonts/schibsted-grotesk.woff2') format('woff2-variations'),
       url('../fonts/schibsted-grotesk.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Averia Serif Libre';
  src: url('../fonts/averia-serif-libre-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Averia Serif Libre';
  src: url('../fonts/averia-serif-libre-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --green:        #82C35B;
  --green-hover:  #72b249;
  --ink:          #000000;
  --paper:        #ffffff;
  --grey-field:   #f1f1f1;
  --grey-field-2: #e8e8e8;
  --muted:        #6b6b6b;
  --muted-dark:   #a5a5a5;
  --error:        #d1483b;

  --serif: 'Averia Serif Libre', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans:  'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --gutter:   clamp(20px, 6vw, 84px);
  --maxw:     1560px;
  --radius:   10px;
  --shell-pad: clamp(56px, 8vw, 130px);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.06; }
p { margin: 0; }
button { font: inherit; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 6px;
  text-decoration: none; transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(12px, .9vw, 14px);
  letter-spacing: .09em; text-transform: uppercase; text-decoration: none;
  padding: 1.15em 2.4em; border: 0; border-radius: 999px;
  cursor: pointer; transition: background-color .18s ease, transform .18s ease, color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--green { background: var(--green); color: var(--ink); }
.btn--green:hover { background: var(--green-hover); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #262626; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper);
  transition: box-shadow .2s ease;
}
.site-header[data-scrolled='true'] { box-shadow: 0 1px 0 rgba(0,0,0,.09), 0 8px 24px -18px rgba(0,0,0,.35); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: clamp(74px, 7vw, 104px);
}
.site-header__logo { display: inline-flex; align-items: center; }
.site-header__logo img,
.site-header__logo svg { height: clamp(26px, 2.3vw, 33px); width: auto; }

/* ---------- section dividers (the green chevrons) ---------- */
.divider { line-height: 0; }
.divider svg { width: 100%; height: clamp(34px, 6vw, 96px); display: block; }
.divider--to-dark { background: var(--paper); }

/* ---------- services ---------- */
.services {
  background: var(--ink); color: #fff;
  padding-block: clamp(48px, 7vw, 104px) var(--shell-pad);
}
.services__title {
  font-size: clamp(40px, 5.6vw, 80px);
  letter-spacing: -.015em;
  margin-bottom: clamp(36px, 5vw, 76px);
}
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 24px);
}
.card {
  background: var(--paper); color: var(--ink);
  display: flex; flex-direction: column;
  padding: clamp(22px, 2vw, 30px);
  min-height: clamp(240px, 24vw, 360px);
}
.card__icon { width: clamp(48px, 4.4vw, 72px); height: auto; color: var(--ink); }
.card__body { margin-top: clamp(28px, 4.4vw, 68px); }
.card__title {
  font-size: clamp(18px, 1.6vw, 26px);
  margin-bottom: .55em;
  letter-spacing: -.005em;
}
.card__text { color: #1c1c1c; }
.services__cta { margin-top: clamp(32px, 4vw, 60px); }

/* ---------- footer ---------- */
.footer {
  position: relative;
  color: #fff;
  background-color: #141414;
  overflow: hidden;
  isolation: isolate;
}
/* animated isometric cube field — the SVG carries its own keyframes */
.footer__pattern {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none; user-select: none;
}
.footer::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(105deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 45%, rgba(0,0,0,.5) 100%);
}
.divider--to-footer { position: relative; z-index: 2; }
.footer__inner { position: relative; z-index: 2; padding-block: clamp(52px, 7vw, 116px) clamp(28px, 3vw, 44px); }
.footer__title {
  font-size: clamp(34px, 4.6vw, 64px);
  letter-spacing: -.015em;
  margin-bottom: clamp(20px, 2.4vw, 34px);
}
.footer__contact { display: flex; flex-direction: column; gap: 2px; }
.footer__contact a { text-decoration: none; width: fit-content; }
.footer__contact a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer__legal { margin-top: clamp(48px, 7vw, 118px); color: #e6e6e6; font-size: .92em; }

/* ---------- contact page ---------- */
.contact { padding-block: clamp(28px, 3.5vw, 56px) var(--shell-pad); }
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 92px);
  align-items: start;
}
.contact__media { position: sticky; top: clamp(90px, 8vw, 124px); }
.contact__media img {
  width: 100%; height: clamp(380px, 74vh, 900px); object-fit: cover; border-radius: 2px; background: var(--grey-field);
}
.contact__intro { margin-bottom: clamp(24px, 3vw, 40px); }
.contact__intro h1 {
  font-size: clamp(28px, 3.4vw, 46px);
  letter-spacing: -.015em;
  margin-bottom: .35em;
}
.contact__intro p { color: var(--muted); max-width: 52ch; }

/* ---------- form ---------- */
.form { display: flex; flex-direction: column; gap: clamp(18px, 2vw, 26px); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label, .fieldset__legend {
  font-size: clamp(14px, 1vw, 16px); font-weight: 500; color: var(--ink); padding: 0;
}
.field__label .req, .fieldset__legend .req { color: var(--muted); font-weight: 400; }
.field__group { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.4vw, 20px); }
.field__hint { font-size: .86em; color: var(--muted); }

.input, .select, .textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--grey-field); border: 1px solid transparent;
  border-radius: var(--radius); padding: .85em 1em;
  transition: background-color .15s ease, border-color .15s ease;
}
.input::placeholder, .textarea::placeholder { color: #9a9a9a; }
.input:hover, .select:hover, .textarea:hover { background: var(--grey-field-2); }
.textarea { min-height: 150px; resize: vertical; background: #f7f7f7; border-color: #dcdcdc; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 9l7 7 7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1em center; background-size: 20px;
  padding-right: 3em; cursor: pointer;
}
.input[aria-invalid='true'], .select[aria-invalid='true'], .textarea[aria-invalid='true'] {
  border-color: var(--error); background: #fdf3f2;
}
.field__error { font-size: .86em; color: var(--error); min-height: 0; }
.field__error:empty { display: none; }

/* money input with a fixed £ prefix */
.input-money { display: inline-flex; align-items: center; background: var(--grey-field); border-radius: var(--radius); padding-left: 1em; max-width: 260px; }
.input-money span { color: var(--muted); }
.input-money .input { background: transparent; padding-left: .4em; }
.input-money:focus-within { outline: 3px solid var(--green); outline-offset: 2px; }
.input-money .input:focus-visible { outline: none; }

fieldset { border: 0; margin: 0; padding: 0; }
.choices { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.choice { display: flex; align-items: center; gap: 12px; cursor: pointer; width: fit-content; }
.choice input {
  appearance: none; margin: 0; flex: none;
  width: 20px; height: 20px; border: 1.5px solid #b6b6b6; border-radius: 5px;
  background: #fff; cursor: pointer; display: grid; place-content: center;
  transition: background-color .12s ease, border-color .12s ease;
}
.choice input::after {
  content: ''; width: 11px; height: 11px; transform: scale(0);
  transition: transform .12s ease-in-out;
  background: var(--ink);
  clip-path: polygon(14% 44%, 0 60%, 39% 100%, 100% 18%, 84% 3%, 38% 68%);
}
.choice input:checked { background: var(--green); border-color: var(--green); }
.choice input:checked::after { transform: scale(1); }
.choice:hover input:not(:checked) { border-color: #8a8a8a; }

.form__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.form__status { font-size: .95em; }
.form__status[data-state='error']   { color: var(--error); }
.form__status[data-state='success'] { color: #1d7a33; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-success {
  border: 1px solid var(--green); background: #f4faef;
  border-radius: var(--radius); padding: clamp(24px, 3vw, 40px);
}
.form-success h2 { font-size: clamp(22px, 2vw, 26px); margin-bottom: .4em; }
.form-success p { color: #333; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { min-height: 260px; }
}
@media (max-width: 900px) {
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
  .contact__media { position: static; order: -1; }
  .contact__media img { height: clamp(240px, 46vw, 420px); }
}
@media (max-width: 620px) {
  .services__grid { grid-template-columns: minmax(0, 1fr); }
  .card { min-height: 0; }
  .card__body { margin-top: clamp(28px, 9vw, 56px); }
  .field__group { grid-template-columns: minmax(0, 1fr); }
  .site-header__inner { gap: 12px; }
  .btn { padding: 1.05em 1.5em; letter-spacing: .06em; }
}
@media (max-width: 380px) {
  .btn { padding: 1em 1.15em; font-size: 11px; }
  .site-header__logo img, .site-header__logo svg { height: 24px; }
}
