/* Keystone Investments Ltd — static site
   "Earthy Trade" design system: a warm, grounded palette drawn from the
   company's actual physical trade (coffee, soil, fuel, cargo) rather than
   a generic corporate navy-blue. Trading & Advisory pillars each carry
   their own accent color (terracotta / olive) to reinforce the two-business
   structure introduced across Home and Services. */

@import url('../fonts/fonts.css');

:root {
  /* Core palette */
  --ink:        #211A17;   /* warm near-black — headings, footer, dark bands */
  --ink-soft:   #3A2E28;   /* softer dark, decorative use */
  --cream:      #F7F2EA;   /* page background */
  --cream-deep: #EFE6D3;   /* deeper tan — alternating section surface */
  --paper:      #FFFFFF;   /* cards, sitting above cream */

  /* Trading pillar accent */
  --terracotta:      #B5451B;
  --terracotta-dark: #93380F;
  --terracotta-tint: rgba(181, 69, 27, 0.1);

  /* Advisory pillar accent */
  --olive:      #4B5D3A;
  --olive-dark: #3A4A2C;
  --olive-tint: rgba(75, 93, 58, 0.1);

  /* Decorative-only accent — fails contrast as text on light backgrounds,
     so it's reserved for rules, dividers and dark-background use */
  --gold: #C99A3D;

  /* Text */
  --text:      #5B5248;
  --text-soft: #8C8175;
  --hairline:  #E4DACB;

  --white: #FFFFFF;

  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --shell: 1200px;
  --gutter: 24px;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 10px 24px rgba(33, 26, 23, 0.08);

  /* Subtle warm color grade applied to client stock photography so the
     mix of cool daylight and warm night shots reads as one brand */
  --photo-filter: sepia(0.2) saturate(1.18) contrast(1.03) brightness(0.99);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  margin: 0 0 16px;
  line-height: 1.15;
  font-weight: 600;
}
p { margin: 0 0 16px; line-height: 1.7; }
button { font-family: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--terracotta);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 6px 0;
}
.skip-link:focus {
  left: 0;
}

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-accent {
  background: var(--terracotta);
  color: var(--cream);
}
.btn-accent:hover { background: var(--terracotta-dark); }
.btn-ink {
  background: var(--ink);
  color: var(--cream);
}
.btn-ink:hover { background: var(--ink-soft); }
.btn-outline-light {
  background: transparent;
  border-color: rgba(247, 242, 234, 0.55);
  color: var(--white);
}
.btn-outline-light:hover { background: rgba(247, 242, 234, 0.14); }
.btn-block { width: 100%; }

/* ---------------------------------------------------------------- */
/* Masthead                                                          */
/* ---------------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--hairline);
}
.masthead__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 14px;
}
.masthead__logo img { height: 40px; width: auto; }
.mainnav__list {
  display: flex;
  align-items: center;
  gap: 36px;
}
.mainnav__list a {
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.mainnav__list a:hover,
.mainnav__list a[aria-current="page"] {
  color: var(--terracotta);
  border-color: var(--terracotta);
}
.masthead__cta { display: flex; align-items: center; gap: 18px; }
.masthead__cta .btn { padding: 12px 22px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { width: 26px; height: 26px; }
.mainnav__cta-mobile { display: none; }

@media (max-width: 900px) {
  .mainnav { display: none; }
  .masthead__cta .btn-ink { display: none; }
  .nav-toggle { display: inline-flex; }

  .mainnav.is-open {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow);
  }
  .mainnav.is-open .mainnav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 18px;
  }
  .mainnav.is-open .mainnav__list a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--hairline);
  }
  .mainnav__cta-mobile {
    display: block;
    margin: 14px var(--gutter) 18px;
    width: calc(100% - (var(--gutter) * 2));
  }
}

/* ---------------------------------------------------------------- */
/* Hero (home)                                                       */
/* ---------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}
.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  filter: var(--photo-filter);
  transition: opacity 1.4s ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(33,26,23,0.8) 0%, rgba(33,26,23,0.48) 48%, rgba(181,69,27,0.28) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 620px;
  padding-block: 90px;
}
.hero__content h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  margin-bottom: 18px;
}
.hero__content p {
  color: rgba(247, 242, 234, 0.92);
  font-size: 1.08rem;
  max-width: 480px;
}
.hero__actions {
  display: flex;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

@media (max-width: 620px) {
  .hero { min-height: 560px; }
  .hero__content { padding-block: 60px; }
}

/* ---------------------------------------------------------------- */
/* Page banner (inner pages)                                         */
/* ---------------------------------------------------------------- */

.page-banner {
  position: relative;
  background: var(--ink);
  color: var(--white);
  padding-block: 84px;
  overflow: hidden;
}
.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('../images/banner-bg.jpeg') center / cover no-repeat;
  filter: var(--photo-filter);
}
.page-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(33, 26, 23, 0.66);
}
.page-banner__inner { position: relative; z-index: 1; }
.page-banner .eyebrow {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: rgba(247, 242, 234, 0.85);
}
.page-banner h1 {
  color: var(--white);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin: 0;
}

/* ---------------------------------------------------------------- */
/* Section headings                                                  */
/* ---------------------------------------------------------------- */

.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}
.section-heading h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); }
.section-heading__rule {
  width: 40px;
  height: 3px;
  background: var(--gold);
  margin: 12px auto 0;
  border-radius: 2px;
}
.section-heading.is-left { text-align: left; margin: 0 0 40px; }
.section-heading.is-left .section-heading__rule { margin-inline: 0; }
.section-heading .lede {
  margin: 16px auto 0;
  max-width: 620px;
  color: var(--text);
}
.section-heading.is-left .lede { margin-inline: 0; }

section { padding-block: 88px; }
.section-surface { background: var(--cream-deep); }
.section-dark {
  background: var(--ink);
  color: rgba(247, 242, 234, 0.88);
}
.section-dark h2 { color: var(--white); }

@media (max-width: 620px) {
  section { padding-block: 56px; }
}

/* ---------------------------------------------------------------- */
/* Pillars (Trading & Distribution / Advisory & Market Entry)        */
/* ---------------------------------------------------------------- */

.pillar { margin-bottom: 56px; }
.pillar:last-child { margin-bottom: 0; }
.pillar__head { margin-bottom: 24px; }
.pillar__label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.pillar--trading .pillar__label { color: var(--terracotta); }
.pillar--advisory .pillar__label { color: var(--olive); }
.pillar__head h3 {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin: 0 0 6px;
}
.pillar__head p {
  margin: 0;
  max-width: 640px;
  color: var(--text);
}

/* ---------------------------------------------------------------- */
/* What We Do Best — icon cards                                      */
/* ---------------------------------------------------------------- */

.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.icon-card {
  display: flex;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--paper);
}
.icon-card__icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-card--trading .icon-card__icon { background: var(--terracotta-tint); color: var(--terracotta); }
.icon-card--advisory .icon-card__icon { background: var(--olive-tint); color: var(--olive); }
.icon-card__icon svg { width: 24px; height: 24px; }
.icon-card h3 {
  font-family: var(--sans);
  font-size: 1.03rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}
.icon-card p {
  font-size: 0.92rem;
  margin: 0;
  color: var(--text);
}

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

/* ---------------------------------------------------------------- */
/* Split content / image blocks                                      */
/* ---------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split__media {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.split img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  filter: var(--photo-filter);
}
.split.is-reverse .split__media { order: 2; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.is-reverse .split__media { order: 0; }
}

/* ---------------------------------------------------------------- */
/* CTA band                                                          */
/* ---------------------------------------------------------------- */

.cta-band {
  background: var(--ink);
  color: var(--white);
}
.cta-band__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { color: var(--white); margin-bottom: 8px; }
.cta-band p { color: rgba(247, 242, 234, 0.78); margin: 0; }

/* ---------------------------------------------------------------- */
/* Value cards (core values, competitive advantage)                  */
/* ---------------------------------------------------------------- */

.value-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.value-card {
  padding: 26px 22px;
  border: 1px solid var(--hairline);
  border-top: 3px solid var(--terracotta);
  border-radius: var(--radius);
  background: var(--paper);
}
.value-card h3 {
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.value-card p { font-size: 0.92rem; margin: 0; }

@media (max-width: 1080px) {
  .value-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .value-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------- */
/* Vision / Mission                                                  */
/* ---------------------------------------------------------------- */

.vm-item {
  display: flex;
  gap: 16px;
  margin-top: 28px;
}
.vm-item img { width: 32px; height: 32px; flex: none; margin-top: 2px; }
.vm-item h3 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--terracotta);
  margin: 0 0 4px;
}
.vm-item p { margin: 0; }

/* ---------------------------------------------------------------- */
/* Long-form article sections (About Us story)                       */
/* ---------------------------------------------------------------- */

.prose { max-width: 820px; }
.prose h2 { margin-top: 8px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; list-style: disc; }
.prose li { margin-bottom: 8px; line-height: 1.6; }
.prose strong { color: var(--ink); }
.prose em { color: var(--terracotta); font-style: italic; }

/* ---------------------------------------------------------------- */
/* Services grid (services page + segments)                          */
/* ---------------------------------------------------------------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.service-card {
  background: transparent;
}
.service-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
}
.service-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--photo-filter);
  transition: transform .35s ease;
}
.service-card:hover .service-card__media img { transform: scale(1.05); }
.service-card__media.is-tile {
  display: flex;
  align-items: center;
  justify-content: center;
}
.service-card__media.is-tile--trading { background: var(--terracotta); }
.service-card__media.is-tile--advisory { background: var(--olive); }
.service-card__media.is-tile svg {
  width: 30%;
  height: 30%;
  color: var(--cream);
}
.service-card h3 {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
  margin-bottom: 8px;
}
.service-card p { font-size: 0.92rem; margin: 0; }

/* ---------------------------------------------------------------- */
/* Forms (Contact / Request a Quote)                                 */
/* ---------------------------------------------------------------- */

.form-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  background: var(--cream-deep);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  margin-bottom: 32px;
}
.form-tab {
  padding: 11px 22px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.form-tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--cream);
}
.form-panel[hidden] { display: none; }
.form-intro {
  max-width: 640px;
  margin-bottom: 28px;
}

.form-wrap {
  max-width: 720px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.is-full { grid-column: 1 / -1; }
.form-field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.form-field label .req { color: var(--terracotta); }
.form-field input,
.form-field select,
.form-field textarea {
  font-family: var(--sans);
  font-size: 0.98rem;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  background: var(--cream);
  color: var(--ink);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--terracotta);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-status {
  margin-top: 16px;
  font-size: 0.92rem;
  font-weight: 600;
}
.form-status[data-state="success"] { color: var(--olive-dark); }
.form-status[data-state="error"] { color: #A02B1F; }

.contact-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}
.contact-info__item {
  padding: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--paper);
  display: flex;
  gap: 14px;
}
.contact-info__item svg {
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--terracotta);
}
.contact-info__item h3 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
}
.contact-info__item p, .contact-info__item a { margin: 0; font-size: 0.94rem; }
.contact-info__item a:hover { color: var(--terracotta); }

@media (max-width: 900px) {
  .form-grid { grid-template-columns: 1fr; }
  .contact-info { grid-template-columns: 1fr; }
  .form-wrap { padding: 28px 22px; }
}

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

.site-footer {
  background: var(--ink);
  color: rgba(247, 242, 234, 0.72);
  padding-block: 64px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 48px;
}
.footer-grid h3 {
  font-family: var(--serif);
  color: var(--white);
  font-size: 1.1rem;
  margin: 0 0 10px;
}
.footer-rule {
  width: 40px;
  height: 3px;
  background: var(--gold);
  margin-bottom: 18px;
  border-radius: 2px;
}
.footer-grid p { font-size: 0.92rem; line-height: 1.7; }
.footer-grid p strong { color: var(--white); }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 0.92rem; color: rgba(247, 242, 234, 0.72); }
.footer-links a:hover { color: var(--gold); }
.footer-contact li {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  align-items: flex-start;
}
.footer-contact svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--gold); }
.footer-contact strong { display: block; color: var(--white); font-size: 0.9rem; margin-bottom: 2px; }
.footer-contact a, .footer-contact span { font-size: 0.92rem; color: rgba(247, 242, 234, 0.72); }
.footer-contact a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(247, 242, 234, 0.12);
  padding-block: 22px;
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- */
/* Legal / simple text pages                                         */
/* ---------------------------------------------------------------- */

.legal h2 { margin-top: 40px; }
.legal p, .legal li { color: var(--text); }
.legal-updated {
  font-size: 0.88rem;
  color: var(--text-soft);
  margin-bottom: 40px;
}

/* ---------------------------------------------------------------- */
/* 404                                                                */
/* ---------------------------------------------------------------- */

.not-found {
  text-align: center;
  padding-block: 140px;
}
.not-found h1 { font-size: clamp(2.4rem, 6vw, 4rem); }

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