/* Hilltop Farms Forth Pty Ltd - custom styles (plain CSS, used alongside the Tailwind CDN) */

:root {
  --pasture: #3F6B3A;
  --pasture-700: #30532C;
  --pasture-50: #EEF3EC;
  --ochre: #C8862E;
  --ochre-700: #8F5D1A;
  --ochre-100: #F4E3C8;
  --forest: #1F2A1E;
  --cream: #F5F1E6;
  --stone: #8A8370;
  --stone-700: #5C5747;
}

/* Sticky header offset for anchored sections */
section[id],
main {
  scroll-margin-top: 5rem;
}

main:focus {
  outline: none;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  background: var(--forest);
  color: var(--cream);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* Visible focus for everything interactive */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--ochre);
  outline-offset: 3px;
}

/* Eyebrow labels */
.eyebrow {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ochre-700);
}

.eyebrow-dark {
  color: var(--ochre);
}

/* Navigation */
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  font-weight: 600;
  color: var(--forest);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  background: var(--pasture-50);
  color: var(--pasture-700);
}

.mobile-link {
  display: block;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--forest);
  text-decoration: none;
}

.mobile-link:hover {
  background: var(--pasture-50);
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-primary {
  background: var(--pasture);
  color: #fff;
  border: 2px solid var(--pasture);
}

.btn-primary:hover {
  background: var(--pasture-700);
  border-color: var(--pasture-700);
}

.btn-secondary {
  background: transparent;
  color: var(--forest);
  border: 2px solid rgba(31, 42, 30, 0.25);
}

.btn-secondary:hover {
  border-color: var(--forest);
  background: #fff;
}

/* Cards */
.card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(31, 42, 30, 0.1);
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 42, 30, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 10px 30px -12px rgba(31, 42, 30, 0.25);
  transform: translateY(-2px);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.875rem;
  background: var(--pasture-50);
  color: var(--pasture-700);
}

/* Key facts */
.fact {
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(245, 241, 230, 0.15);
  background: rgba(245, 241, 230, 0.05);
}

.fact-label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ochre);
}

.fact-value {
  margin-top: 0.375rem;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cream);
}

.timeline-dot {
  position: absolute;
  left: calc(-1.5rem - 7px);
  top: 0.375rem;
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: var(--ochre);
  box-shadow: 0 0 0 4px var(--forest);
}

/* Contact */
.contact-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: var(--pasture-50);
  color: var(--pasture-700);
}

/* Clearly marked "to be added" contact details */
.pending-chip {
  display: inline-block;
  margin-top: 0.25rem;
  padding: 0.125rem 0.625rem;
  border: 1px dashed var(--stone);
  border-radius: 0.375rem;
  background: var(--cream);
  color: var(--stone-700);
  font-size: 0.9375rem;
  font-style: italic;
}

/* Form */
.form-label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 600;
  color: var(--forest);
}

.form-input {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid rgba(31, 42, 30, 0.3);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--forest);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: var(--pasture);
  box-shadow: 0 0 0 3px rgba(63, 107, 58, 0.2);
}

.form-input[aria-invalid="true"] {
  border-color: #A1321F;
}

.form-error {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #A1321F;
}

.form-status:empty {
  display: none;
}

.form-status {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  border-left: 4px solid var(--ochre);
  background: var(--ochre-100);
  color: var(--forest);
  line-height: 1.6;
}

.form-status.is-error {
  border-left-color: #A1321F;
  background: #FBE9E5;
}

.link-button {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--pasture-700);
  text-decoration: underline;
  text-decoration-color: var(--ochre);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-button:hover {
  color: var(--forest);
}

/* Footer */
.footer-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--cream);
  text-decoration: underline;
  text-decoration-color: rgba(200, 134, 46, 0.7);
  text-underline-offset: 3px;
  cursor: pointer;
}

.footer-link:hover {
  color: #fff;
  text-decoration-color: var(--ochre);
}

/* Legal modals */
.legal-modal {
  width: calc(100% - 2rem);
  max-width: 44rem;
  max-height: 85vh;
  padding: 0;
  border: 0;
  border-radius: 1rem;
  background: #fff;
  color: var(--forest);
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(31, 42, 30, 0.45);
}

.legal-modal::backdrop {
  background: rgba(31, 42, 30, 0.65);
}

.legal-modal-inner {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.legal-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(31, 42, 30, 0.1);
}

.legal-modal-body {
  overflow-y: auto;
  padding: 1.25rem 1.5rem 1.75rem;
  line-height: 1.65;
}

.legal-modal-body h3 {
  margin-top: 1.25rem;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 600;
}

.legal-modal-body p,
.legal-modal-body ul {
  margin-top: 0.5rem;
  color: var(--stone-700);
}

.legal-modal-body ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.legal-modal-body a {
  color: var(--pasture-700);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.modal-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border: 1px solid rgba(31, 42, 30, 0.15);
  border-radius: 9999px;
  background: #fff;
  color: var(--forest);
  cursor: pointer;
}

.modal-close:hover {
  background: var(--pasture-50);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .card:hover {
    transform: none;
  }
}
