/* ---------------------------------------------------
   RURAL SMART — BASE STYLES
   Author: Mariana Martins
   Updated: 16/10/2025
   --------------------------------------------------- */

/*  */
/* -------------------------------------------
  TOKENS (COLORS, TYPOGRAPHY) & VARIABLES
------------------------------------------- */
:root {
  /* Brand Palette */
  --brand-primary: #0b7754;
  --brand-secondary: #46b865;
  --brand-accent: #f68b1f;
  --brand-dark: #432312;

  /* Functional Colors */
  --color-primary: var(--brand-primary);
  --color-secondary: var(--brand-secondary);
  --color-accent: var(--brand-accent);
  --color-text-primary: var(--brand-dark);
  --color-base: #ffffff;
  --color-border: #e9e9e9;
  --color-placeholder: #9e9e9e;
  --color-error: #cf2812;

  /* Layout */
  --section-padding: 5rem;
  --footer-radius: 2.5rem;
}

/* -------------------------------------------
  RESET + GLOBAL BASE
------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Poppins", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 160%;
  color: var(--color-text-primary);
  background-color: var(--color-primary);
}

/* -------------------------------------------
  STRUCTURE & LAYOUT
------------------------------------------- */
.section {
  padding: var(--section-padding) 0;
}
.container {
  max-width: calc(1280px + 5rem);
  margin: 0 auto;
  padding: 0 5rem;
}

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

/* -------------------------------------------
  TYPOGRAPHY
------------------------------------------- */
h1,
h2,
h3 {
  margin: 0 0 1rem;
  line-height: 120%;
}

h1 {
  font-size: 6rem;
  font-weight: 700;
  letter-spacing: -0.2rem;
}

h2 {
  font-size: 3.25rem;
  font-weight: 600;
  letter-spacing: -0.1rem;
}

h3 {
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: -0.05rem;
}

p {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  letter-spacing: -0.05rem;
  font-weight: 300;
  line-height: 160%;
}

.emphasize {
  font-style: italic;
}

.highlight {
  color: var(--color-accent);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 90%;
  letter-spacing: 0rem;
  border-radius: 100px;
  border: 1px solid var(--color-border);
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}
.section-tag::before {
  content: "";
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  background-color: var(--color-primary);
  border-radius: 50%;
}

/* -------------------------------------------
  LINKS & BUTTONS
------------------------------------------- */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  text-decoration: underline;
}

.cta-button,
button {
  background-color: var(--color-primary);
  color: var(--color-base);
  border: none;
  border-radius: 100px;
  padding: 1.125rem 1.5rem;
  font-family: "Poppins", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: inline-flex;
  justify-content: center;
  gap: 0.75rem;
  align-items: center;
}
.cta-button:hover,
button:hover {
  background-color: var(--color-secondary);
  text-decoration: none;
}

/* -------------------------------------------
  NAVBAR
------------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--color-primary);
  padding: 1.5rem 0;
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
/* .nav-links ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-base);
}
.nav-links a:hover {
  text-decoration: underline;
} */
.logo {
  width: 40%;
  min-width: 100px;
}

/* -------------------------------------------
  HERO SECTION
------------------------------------------- */
.hero {
  text-align: center;
  background-image: url("/assets/images/green-farm-field.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  padding: 8rem 0;
  color: var(--color-base);
}
.hero p {
  padding: 1.5rem 0;
}

/* -------------------------------------------
  ABOUT SECTION
------------------------------------------- */
.about {
  background-color: var(--color-base);
}
.about .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: flex-start;
}
.grid-column:first-of-type {
  margin-right: 4.5rem;
}
.about-description {
  margin-bottom: 2.5rem;
  font-size: 1.25rem;
}

/* -------------------------------------------
  SERVICES SECTION
------------------------------------------- */
.services {
  background-color: var(--color-secondary);
  color: var(--color-base);
  text-align: center;
}
.services h2 {
  margin-bottom: 4rem;
}
.services-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: min(5rem, 5%);
}
.accordion {
  text-align: left;
}
.accordion hr {
  border: none;
  border-bottom: 1px solid var(--color-base);
  opacity: 0.5;
  margin-bottom: 1.5rem;
}
.service {
  opacity: 0.5;
}
.service[open] {
  opacity: 1;
}
.service summary {
  cursor: pointer;
  list-style: none;
}
#service-img {
  aspect-ratio: 630 / 615;
  object-fit: cover;
  border-radius: 1.25rem;
}

/* -------------------------------------------
  BENEFITS SECTION
------------------------------------------- */
.benefits {
  text-align: center;
  background-color: var(--color-base);
}
.benefits-cards {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.benefit {
  text-align: left;
  padding: 1.25rem;
  border-radius: 0.75rem;
  color: var(--color-base);
}
.benefit p {
  font-size: 0.75rem;
  letter-spacing: 0rem;
  margin: 0;
}
.benefit-icon {
  width: 5rem;
  margin-bottom: 1.5rem;
}
#benefit-expertise {
  background-color: var(--color-primary);
  transform: rotate(3deg);
  margin-right: -1rem;
}
#benefit-innovation {
  background-color: var(--color-accent);
  z-index: 1;
}
#benefit-partnership {
  background-color: var(--color-secondary);
  transform: rotate(-3deg);
  margin-left: -0.5rem;
}

/* -------------------------------------------
  CONTACT SECTION
------------------------------------------- */
.contact {
  background-color: var(--color-accent);
  color: var(--color-base);
  text-align: center;
  padding-bottom: calc(var(--section-padding) + var(--footer-radius));
}
.contact h2 {
  color: var(--color-text-primary);
  margin-bottom: 1.5rem;
}
.contact-form {
  margin-top: 2.5rem;
  text-align: left;
}

.input-group {
  position: relative;
  margin-bottom: 1rem;
}
/* floating labels */
.inside-label {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  color: var(--color-placeholder);
  pointer-events: none;
  transition: all 0.2s ease;
}
/* floating labels transition */
.input-group:has(input:not([type="checkbox"]):focus) .inside-label,
.input-group:has(input:not([type="checkbox"]):not(:placeholder-shown))
  .inside-label,
.input-group:has(textarea:focus) .inside-label,
.input-group:has(textarea:not(:placeholder-shown)) .inside-label {
  font-size: 0.75rem;
  top: calc(1rem - 0.875rem);
}

.contact-form input:not([type="checkbox"]),
.contact-form textarea {
  width: 100%;
  min-height: 2.5rem;
  padding: 1rem 1.5rem;
  border: 1px solid var(--color-border);
  border-radius: 100px;
  font-family: var(--font-main);
  font-size: 1rem;
  color: var(--color-text-primary);
  transition: all 0.2s ease;
}
.contact-form textarea {
  border-radius: 2.5rem;
}
input:not([type="checkbox"]):focus,
input:not([type="checkbox"]):not(:placeholder-shown),
textarea:focus,
textarea:not(:placeholder-shown) {
  padding-top: calc(1rem + 0.25rem);
}

.input-consent {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
#contact-consent {
  appearance: none;
  aspect-ratio: 1;
  height: 1.75rem;
  border: 1px solid var(--color-border);
  background-color: var(--color-base);
  cursor: pointer;
  border-radius: 100px;
}
#contact-consent::after {
  content: "";
  position: absolute;
  aspect-ratio: 1;
  height: 1rem;
  margin: calc((1.75rem - 1rem) / 2 - 1px);
  border-radius: 100px;
  background-color: var(--color-primary);
  transform: scale(0);
  transition: transform 0.1s ease-in-out;
}
#contact-consent:checked::after {
  transform: scale(1);
}

.contact-form a {
  color: var(--color-base);
  text-decoration: underline;
}
.contact-form a:hover {
  color: var(--color-text-primary);
}

.contact-form input:focus,
.contact-form textarea:focus,
#contact-consent:focus-visible {
  outline: none;
  border-color: var(--color-text-primary);
}
.contact-form input:not(:placeholder-shown):invalid {
  border-color: var(--color-error);
}

.form-message {
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 400;
  text-align: left;
}
.form-message.success {
  color: var(--brand-primary);
}
.form-message.error {
  color: var(--color-error);
}
button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* -------------------------------------------
  FOOTER
------------------------------------------- */
.footer {
  border-top-left-radius: var(--footer-radius);
  border-top-right-radius: var(--footer-radius);
  margin-top: calc(-1 * var(--footer-radius));
  padding: 5rem 0 3rem 0;
  background-color: var(--color-primary);
}
.footer p,
.footer a {
  font-size: 0.875rem;
  line-height: 180%;
  color: var(--color-base);
}
.footer-logo {
  margin-bottom: 6rem;
}
.content-group {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.link-group {
  display: flex;
  gap: 1.5rem;
}
.social-link {
  background-color: var(--color-base);
  padding: 0.75rem;
  border-radius: 100px;
}
.social-link img {
  height: 1.25rem;
}

/* -------------------------------------------
  RESPONSIVE CHANGES
------------------------------------------- */
@media (width <= 1180px) {
  h1 {
    font-size: 5rem;
  }
  h2 {
    font-size: 2.75rem;
  }
  h3 {
    font-size: 1.5rem;
  }
  /* Realign About */
  .about-description {
    font-size: 1.125rem;
  }
}

@media (width < 1024px) {
  .container {
    padding: 0 4rem;
  }
  h2 {
    font-size: 2.5rem;
  }
  p {
    font-size: 1rem;
    letter-spacing: -0.025rem;
  }
}

@media (width <= 768px) {
  :root {
    --section-padding: 3rem;
    --footer-radius: 1.75rem;
  }
  .container {
    padding: 0 3rem;
  }
  h1,
  h2,
  h3 {
    margin: 0 0 0.875rem;
  }
  h1 {
    font-size: 2.75rem;
    font-weight: 600;
    letter-spacing: -0.05rem;
  }
  h2 {
    font-size: 1.875rem;
    letter-spacing: -0.05rem;
  }
  h3 {
    font-size: 1.25rem;
    letter-spacing: -0.025rem;
  }
  p {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    letter-spacing: -0.025rem;
    font-weight: 200;
  }

  .cta-button,
  button {
    padding: 0.875rem 1.25rem;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
  }
  .section-tag {
    gap: 0.5rem;
    font-size: 0.875rem;
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.875rem;
  }
  .section-tag::before {
    width: 0.5rem;
    height: 0.5rem;
  }

  .hero {
    padding: 3.5rem 0;
  }

  .about .container {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
  .grid-column:first-of-type {
    margin-right: 0;
    margin-bottom: 1.125rem;
  }
  .about-description {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
  }

  .services h2 {
    margin-bottom: 1.75rem;
  }
  .services-content {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .accordion hr {
    margin-bottom: 0.875rem;
  }
  #service-img {
    order: -1;
    border-radius: 0.75rem;
  }

  .benefits-cards {
    margin-top: 1.75rem;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    justify-items: center;
  }
  .benefit {
    max-width: 75%;
    padding: 1rem;
    border-radius: 0.75rem;
  }
  .benefit p {
    font-size: 0.75rem;
  }
  .benefit-icon {
    width: 3.75rem;
    margin-bottom: 1.625rem;
  }
  #benefit-expertise {
    transform: rotate(0deg);
    margin-right: 0rem;
  }
  #benefit-expertise img {
    transform: rotate(-4deg);
  }
  #benefit-innovation {
    z-index: 0;
  }
  #benefit-partnership {
    transform: rotate(0deg);
    margin-left: 0rem;
  }

  .contact-form {
    margin-top: 1.5rem;
  }
  .input-group {
    margin-bottom: 1.125rem;
  }
  .contact-form input:not([type="checkbox"]),
  .contact-form textarea {
    padding: 1.125rem 1.5rem;
    font-size: 1rem;
  }
  .contact-form textarea {
    border-radius: 2rem;
  }
  input:not([type="checkbox"]):focus,
  input:not([type="checkbox"]):not(:placeholder-shown),
  textarea:focus,
  textarea:not(:placeholder-shown) {
    padding-top: calc(1.25rem + 0.25rem);
  }
  .input-consent {
    margin-bottom: 1.5rem;
  }
  .input-consent label {
    font-size: 0.875rem;
  }

  .footer {
    padding: 3rem 0 2.25rem 0;
  }
  .footer-logo {
    margin-bottom: 2rem;
  }
  .footer-content {
    display: flex;
    align-items: end;
    justify-content: space-between;
  }
  .footer a {
    font-size: 0.875rem;
  }
  .footer p {
    font-size: 0.75rem;
  }
  .link-group:first-of-type {
    flex-direction: column;
    gap: 1.25rem;
  }
  .content-group {
    margin-top: 1.25rem;
    flex-direction: column;
    align-items: start;
  }
  .content-group:first-of-type {
    gap: 3rem;
  }
  .link-group {
    display: flex;
    gap: 1rem;
  }
}

@media (width <= 600px) {
  .footer-content {
    flex-direction: column;
    align-items: start;
  }
}

@media (width <= 480px) {
  :root {
    --section-padding: 2.5rem;
    --footer-radius: 1.25rem;
  }
  .container {
    padding: 0 1.25rem;
  }
  h1,
  h2,
  h3 {
    margin: 0 0 0.5rem;
  }
  h1 {
    font-size: 2.25rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  h3 {
    font-size: 1rem;
  }
  p {
    font-size: 0.875rem;
  }

  .cta-button,
  button {
    padding: 0.875rem 1.25rem;
    gap: 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
  }
  .section-tag {
    gap: 0.5rem;
    font-size: 0.75rem;
    padding: 0.5rem 0.625rem;
    margin-bottom: 0.75rem;
  }
  .section-tag::before {
    width: 0.5rem;
    height: 0.5rem;
  }

  .hero {
    padding: 3.35rem 0;
  }

  .grid-column:first-of-type {
    margin-right: 0;
    margin-bottom: 1.125rem;
  }
  .about-description {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
  }

  .services h2 {
    margin-bottom: 1.25rem;
  }
  .services-content {
    gap: 1.5rem;
  }
  .accordion hr {
    margin-bottom: 0.875rem;
  }
  #service-img {
    border-radius: 0.625rem;
  }

  .benefits-cards {
    margin-top: 1.5rem;
    gap: 1.5rem;
  }
  .benefit {
    max-width: 100%;
    padding: 1rem;
    border-radius: 0.5rem;
  }
  .benefit p {
    font-size: 0.625rem;
  }
  .benefit-icon {
    width: 3.75rem;
    margin-bottom: 1.5rem;
  }

  .contact-form {
    margin-top: 1.25rem;
  }
  .input-group {
    margin-bottom: 1rem;
  }
  .contact-form input:not([type="checkbox"]),
  .contact-form textarea {
    padding: 1.125rem 1.5rem;
    font-size: 1rem;
  }
  .contact-form textarea {
    border-radius: 2rem;
  }
  input:not([type="checkbox"]):focus,
  input:not([type="checkbox"]):not(:placeholder-shown),
  textarea:focus,
  textarea:not(:placeholder-shown) {
    padding-top: calc(1.25rem + 0.25rem);
  }
  .input-consent {
    margin-bottom: 1.25rem;
  }
  .input-consent label {
    font-size: 0.75rem;
  }

  .footer {
    padding: 3rem 0 2.25rem 0;
  }
  .footer a {
    font-size: 0.875rem;
  }
  .footer p {
    font-size: 0.75rem;
  }
  .footer-logo {
    margin-bottom: 2rem;
  }
  .link-group:first-of-type {
    gap: 1.25rem;
  }
  .content-group {
    margin-top: 1.25rem;
  }
  .content-group:first-of-type {
    gap: 3rem;
  }
  .link-group {
    gap: 1rem;
  }
}
