/*
Theme Name: Cassagrove
Theme URI: https://cassagrove.com
Description: Cassagrove - UK trade sourcing and export. Trade-document design language: ruled structure, tabular figures, one accent, no decorative gradients. Child of Kadence.
Author: Kael Tripton Ltd
Template: kadence
Version: 2.0
Text Domain: cassagrove
*/

/* ==========================================================================
   Cassagrove — design system
   --------------------------------------------------------------------------
   Reference: shipping paperwork and trade manifests, not SaaS marketing.
   Ruled structure, tabular figures, one accent, no decorative gradients.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  --ink:        #0E1519;
  --ink-2:      #4B5760;
  --ink-3:      #7C878F;
  --paper:      #FFFFFF;
  --mist:       #F3F5F6;
  --steel:      #17456B;
  --steel-2:    #0F3151;
  --signal:     #B4531C;   /* used once, for live data only */
  --rule:       #D5DBDF;
  --rule-dark:  #0E1519;

  --measure:    66ch;
  --shell:      min(92vw, 74rem);
  --gap:        clamp(3rem, 7vw, 6rem);
}

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

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

body {
  margin: 0;
  font-family: 'Public Sans', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.shell { width: var(--shell); margin-inline: auto; }

h1, h2, h3, h4 { letter-spacing: -0.02em; text-wrap: balance; margin: 0; }

a { color: var(--steel); text-underline-offset: .18em; }

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

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(8px);
}

.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; padding: 1.05rem 0;
}

.wordmark {
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.035em;
  color: var(--ink); text-decoration: none; line-height: 1;
}
.wordmark span { color: var(--steel); }

.nav { display: flex; align-items: center; gap: 1.9rem; }
.nav a {
  font-size: .95rem; font-weight: 500; color: var(--ink);
  text-decoration: none; padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--rule); }
.nav a[aria-current="page"] { border-bottom-color: var(--steel); }

.nav .btn { border-bottom: 0; }

@media (max-width: 800px) {
  .masthead__inner { flex-wrap: wrap; gap: .75rem; }
  .nav { gap: 1.1rem; width: 100%; overflow-x: auto; padding-bottom: .25rem; }
  .nav a { font-size: .875rem; white-space: nowrap; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--steel); color: #fff;
  font-weight: 600; font-size: 1rem;
  padding: .85rem 1.75rem; border-radius: 2px;
  text-decoration: none; border: 0; cursor: pointer;
  transition: background .14s ease;
}
.btn:hover { background: var(--steel-2); }

.btn--ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--rule);
}
.btn--ghost:hover { background: var(--mist); }

.btn--light {
  background: #fff; color: var(--ink);
}
.btn--light:hover { background: #eef1f3; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero { position: relative; background: var(--ink); overflow: hidden; }

.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(96deg, rgba(14,21,25,.95) 0%, rgba(14,21,25,.78) 42%, rgba(14,21,25,.28) 100%);
}

.hero__inner { position: relative; z-index: 2; padding: clamp(4rem, 11vw, 8.5rem) 0; }

.hero__eyebrow {
  font-size: .78rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: #8FB8D8; margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: .7rem;
}
.hero__eyebrow::after {
  content: ""; height: 1px; width: 3.5rem; background: rgba(143,184,216,.5);
}

.hero h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.9rem);
  font-weight: 800; line-height: 1.04; color: #fff;
  max-width: 20ch; margin-bottom: 1.4rem;
}

.hero__sub {
  font-size: clamp(1.05rem, 1.9vw, 1.3rem);
  color: rgba(255,255,255,.82); max-width: 46ch;
  margin: 0 0 2.2rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* --------------------------------------------------------------------------
   Manifest strip — the one bold element. Reads like a document header:
   the four facts a buyer checks before they bother reading anything else.
   -------------------------------------------------------------------------- */

.manifest {
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.14);
}

.manifest__grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
}

.manifest__cell {
  padding: 1.5rem 1.6rem 1.6rem 0;
  border-right: 1px solid rgba(255,255,255,.14);
}
.manifest__cell:last-child { border-right: 0; }
.manifest__cell:not(:first-child) { padding-left: 1.6rem; }

.manifest__label {
  font-size: .7rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #7E9CB4; margin-bottom: .45rem;
}
.manifest__value {
  font-size: 1.02rem; font-weight: 600; color: #fff;
  font-variant-numeric: tabular-nums; line-height: 1.35;
}
.manifest__note { font-size: .8rem; color: rgba(255,255,255,.5); margin-top: .2rem; }

@media (max-width: 860px) {
  .manifest__grid { grid-template-columns: 1fr 1fr; }
  .manifest__cell:nth-child(2n) { border-right: 0; }
  .manifest__cell:nth-child(-n+2) { border-bottom: 1px solid rgba(255,255,255,.14); }
}
@media (max-width: 460px) {
  .manifest__grid { grid-template-columns: 1fr; }
  .manifest__cell { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.14); padding-left: 0 !important; }
  .manifest__cell:last-child { border-bottom: 0; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: var(--gap) 0; }
.section--mist { background: var(--mist); }
.section--ruled { border-top: 1px solid var(--rule); }

.section__head { margin-bottom: 2.75rem; max-width: 52ch; }

.section__kicker {
  font-size: .72rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--steel); margin-bottom: .85rem;
}

.section h2 {
  font-size: clamp(1.7rem, 3.1vw, 2.35rem);
  font-weight: 750; line-height: 1.14; margin-bottom: .85rem;
}

.section__lede { font-size: 1.13rem; color: var(--ink-2); margin: 0; }

.prose p { max-width: var(--measure); margin: 0 0 1.15rem; }
.prose p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Numbered process — genuinely a sequence, so numbering is earned
   -------------------------------------------------------------------------- */

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }

.step {
  padding: 1.9rem 1.75rem 2rem 0;
  border-top: 2px solid var(--rule-dark);
}
.step:not(:first-child) { padding-left: 1.75rem; border-left: 1px solid var(--rule); }

.step__no {
  font-size: .76rem; font-weight: 700; color: var(--steel);
  font-variant-numeric: tabular-nums; letter-spacing: .1em;
  margin-bottom: .8rem;
}
.step h3 { font-size: 1.08rem; font-weight: 650; margin-bottom: .5rem; }
.step p { font-size: .95rem; color: var(--ink-2); margin: 0; }

@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(odd) { padding-left: 0; border-left: 0; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .step { padding-left: 0 !important; border-left: 0 !important; }
}

/* --------------------------------------------------------------------------
   Split: text beside image, asymmetric
   -------------------------------------------------------------------------- */

.split {
  display: grid; grid-template-columns: 1fr 1.15fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.split--flip .split__media { order: -1; }

.split__media img { border-radius: 2px; aspect-ratio: 16/10; object-fit: cover; width: 100%; }

.split h2 { margin-bottom: 1rem; }

@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
}

/* --------------------------------------------------------------------------
   Reason list — ruled rows rather than cards
   -------------------------------------------------------------------------- */

.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 0 3.5rem; }

.reason {
  padding: 1.6rem 0;
  border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: auto 1fr; gap: 1.1rem;
}
.reason__mark {
  width: 1.9rem; height: 1.9rem; flex: none;
  border: 1px solid var(--steel); border-radius: 50%;
  display: grid; place-items: center;
  color: var(--steel); font-size: .8rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.reason h3 { font-size: 1.05rem; font-weight: 650; margin-bottom: .3rem; }
.reason p { font-size: .95rem; color: var(--ink-2); margin: 0; max-width: 44ch; }

@media (max-width: 760px) { .reasons { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Categories
   -------------------------------------------------------------------------- */

.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem,1fr)); gap: 0 3rem; }

.cat { padding: 1.75rem 0; border-top: 1px solid var(--rule); }
.cat h3 { font-size: 1.08rem; font-weight: 650; margin-bottom: .4rem; }
.cat p { font-size: .95rem; color: var(--ink-2); margin: 0; }
.cat__count {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: .7rem;
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Terms table
   -------------------------------------------------------------------------- */

.terms {
  width: 100%; border-collapse: collapse;
  border-top: 2px solid var(--rule-dark);
  border-bottom: 2px solid var(--rule-dark);
  font-size: .98rem;
}
.terms th, .terms td {
  text-align: left; vertical-align: top;
  padding: .95rem 1rem .95rem 0;
  border-bottom: 1px solid var(--rule);
}
.terms tr:last-child td { border-bottom: 0; }
.terms th {
  width: 15rem; font-weight: 650; white-space: nowrap; padding-right: 2.5rem;
}
.terms td { color: var(--ink-2); }

@media (max-width: 620px) {
  .terms th, .terms td { display: block; width: auto; white-space: normal; }
  .terms th { border-bottom: 0; padding-bottom: .15rem; }
  .terms td { padding-top: 0; }
}

/* --------------------------------------------------------------------------
   Callout band
   -------------------------------------------------------------------------- */

.band {
  background: var(--ink); color: #fff;
  padding: clamp(2.75rem, 6vw, 4.5rem) 0;
}
.band__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2.5rem; flex-wrap: wrap;
}
.band h2 { color: #fff; font-size: clamp(1.5rem, 2.8vw, 2.05rem); max-width: 24ch; }
.band p { color: rgba(255,255,255,.72); margin: .7rem 0 0; max-width: 46ch; }

/* --------------------------------------------------------------------------
   Form
   -------------------------------------------------------------------------- */

.formwrap { display: grid; grid-template-columns: 1.25fr .85fr; gap: clamp(2rem,5vw,4.5rem); }
@media (max-width: 880px) { .formwrap { grid-template-columns: 1fr; } }

.field { margin-bottom: 1.15rem; }
.field label {
  display: block; font-size: .9rem; font-weight: 650; margin-bottom: .35rem;
}
.field .hint { font-weight: 400; color: var(--ink-3); font-size: .82rem; }

.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: .72rem .85rem; border: 1px solid var(--rule); border-radius: 2px;
  background: #fff; transition: border-color .12s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid rgba(23,69,107,.16); outline-offset: 0;
  border-color: var(--steel);
}
.field textarea { resize: vertical; min-height: 9rem; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.15rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.aside {
  border-top: 2px solid var(--rule-dark); padding-top: 1.5rem;
}
.aside h3 { font-size: .95rem; font-weight: 700; margin-bottom: .8rem; }
.aside dl { margin: 0 0 1.75rem; font-size: .93rem; }
.aside dt { font-weight: 650; margin-top: .8rem; }
.aside dd { margin: 0; color: var(--ink-2); }

/* --------------------------------------------------------------------------
   Figure
   -------------------------------------------------------------------------- */

.figure { margin: var(--gap) 0; }
.figure img { border-radius: 2px; }
.figure figcaption {
  font-size: .84rem; color: var(--ink-2);
  margin-top: .65rem; padding-top: .55rem;
  border-top: 1px solid var(--rule); max-width: 56ch;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.foot {
  border-top: 2px solid var(--rule-dark);
  margin-top: var(--gap);
  padding: 3rem 0 3.5rem;
  font-size: .9rem; color: var(--ink-2);
}

.foot__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 860px) { .foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot__grid { grid-template-columns: 1fr; } }

.foot h4 {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink); margin-bottom: .85rem;
}
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin-bottom: .38rem; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--steel); text-decoration: underline; }

.foot__legal {
  border-top: 1px solid var(--rule);
  margin-top: 2.5rem; padding-top: 1.35rem;
  font-size: .82rem; color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   Utility / a11y
   -------------------------------------------------------------------------- */

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff; padding: .75rem 1.25rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--steel); outline-offset: 2px;
}

@media print {
  .masthead, .foot, .band, .hero__media, .btn { display: none !important; }
  body { font-size: 11pt; }
}

/* ==========================================================================
   WordPress integration
   ========================================================================== */

/* Shorter hero on inner pages. */
.hero__inner--short { padding-block: clamp(3rem, 7vw, 5.5rem) !important; }

/* Ghost button sitting on the dark hero. */
.btn--on-dark { color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.btn--on-dark:hover { background: rgba(255,255,255,.1); }

/* Pages whose first section is not a hero need breathing room under the
   sticky masthead. */
.section--top { padding-top: clamp(2.5rem, 6vw, 4rem); }

/* Block editor content rendered inside .prose / .entry-content */
.entry-content h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.85rem);
  font-weight: 700; line-height: 1.2;
  margin: 2.75rem 0 .85rem; padding-top: 1.15rem;
  border-top: 2px solid var(--rule-dark);
}
.entry-content h3 { font-size: 1.1rem; font-weight: 650; margin: 1.75rem 0 .4rem; }
.entry-content ul, .entry-content ol { max-width: var(--measure); padding-left: 1.2rem; }
.entry-content li { margin-bottom: .35rem; }
.entry-content img { border-radius: 2px; }
.entry-content hr,
.entry-content .wp-block-separator {
  border: 0; border-top: 1px solid var(--rule);
  margin: var(--gap) 0; opacity: 1;
}
.entry-content .wp-block-button__link,
.entry-content .wp-element-button {
  background: var(--steel) !important; color: #fff !important;
  border: 0 !important; border-radius: 2px !important;
  font-weight: 600 !important; padding: .85rem 1.75rem !important;
}
.entry-content table { border-collapse: collapse; width: 100%; font-size: .98rem; }
.entry-content table td, .entry-content table th {
  padding: .9rem 1rem .9rem 0; border-bottom: 1px solid var(--rule);
  text-align: left; vertical-align: top;
}

/* ==========================================================================
   Fluent Forms — rendered inside the contact layout
   ========================================================================== */

.formwrap__form { min-width: 0; }

.fluentform { max-width: none; }

.fluentform .ff-el-group { margin-bottom: 1.15rem !important; }

.fluentform .ff-el-input--label label {
  font-size: .9rem !important; font-weight: 650 !important;
  color: var(--ink) !important; margin-bottom: .35rem !important;
}

.fluentform input[type=text],
.fluentform input[type=email],
.fluentform input[type=tel],
.fluentform input[type=number],
.fluentform textarea,
.fluentform select {
  width: 100% !important;
  font: inherit !important; font-size: 1rem !important;
  color: var(--ink) !important; background: #fff !important;
  padding: .72rem .85rem !important;
  border: 1px solid var(--rule) !important; border-radius: 2px !important;
  box-shadow: none !important;
  transition: border-color .12s ease;
}

.fluentform input:focus,
.fluentform textarea:focus,
.fluentform select:focus {
  border-color: var(--steel) !important;
  outline: 3px solid rgba(23,69,107,.16) !important; outline-offset: 0 !important;
}

.fluentform textarea { min-height: 9rem !important; resize: vertical !important; }

.fluentform .ff-el-help-message {
  font-size: .82rem !important; color: var(--ink-3) !important;
}

.fluentform .ff-btn-submit {
  background: var(--steel) !important; color: #fff !important;
  border: 0 !important; border-radius: 2px !important;
  font-weight: 600 !important; font-size: 1rem !important;
  padding: .85rem 1.75rem !important; cursor: pointer;
  transition: background .14s ease;
}
.fluentform .ff-btn-submit:hover { background: var(--steel-2) !important; }

.fluentform .ff-message-success {
  border: 1px solid var(--rule); border-left: 3px solid var(--steel);
  background: var(--mist); padding: 1.25rem 1.4rem; border-radius: 2px;
}

/* Admin bar offset for the sticky masthead. */
body.admin-bar .masthead { top: 32px; }
@media (max-width: 782px) { body.admin-bar .masthead { top: 46px; } }
