/* ATO MATCHA — shared styles */

:root {
  --bg-page: #E4EBD3;
  --bg-hero: #DDE8CC;
  --green-dark: #3E4F24;
  --green-heading: #2E3A22;
  --green-muted: #77875A;
  --green-bullet: #55663B;
  --cream: #EFE9DB;
  --menu-hover: #EFF4E4;
  --field-bg: rgba(255, 255, 255, .55);
  --field-border: rgba(62, 79, 36, .2);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  background: var(--bg-page);
  color: var(--green-dark);
  font-family: 'Alef', sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Nav ---------- */

.nav {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 26px 52px;
}

.nav__side { display: flex; }

.nav__back {
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dark);
  transition: opacity .2s;
}

.nav__back:hover { opacity: .7; }

.nav__menu {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-dark);
}

.nav__menu a { transition: opacity .2s; }
.nav__menu a:hover { opacity: .7; }
.nav__menu a.active { opacity: .55; }

.nav__burger {
  display: none;
  background: none;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--green-dark);
}

.logo {
  font-family: 'Italiana', serif;
  font-size: 29px;
  line-height: 1;
  color: var(--green-dark);
  letter-spacing: .12em;
}

@media (min-width: 1440px) {
  .logo { font-size: 34px; }
}

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

.btn {
  display: inline-block;
  background: var(--green-dark);
  color: var(--cream);
  padding: 12px 28px;
  border: 0;
  border-radius: 8px;
  font-family: 'Alef', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
}

.btn:hover { opacity: .88; }

/* ---------- Home / hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg-hero);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero__img {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: -110px;
  width: 100%;
  height: calc(100% + 110px);
  object-fit: cover;
  object-position: 50% 0%;
}

.hero__copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 72px 52px 0;
  gap: 14px;
}

.hero__copy h1 {
  margin: 0;
  font-weight: 700;
  font-size: 44px;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--green-heading);
}

.hero__copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--green-dark);
  max-width: 480px;
}

.hero__copy .btn { margin-top: 6px; }

/* ---------- Inner pages (about / contact) ---------- */

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 96px 44px;
}

.split--about { gap: 60px; }
.split--contact { gap: 72px; padding-bottom: 0; }

.split__text {
  display: flex;
  flex-direction: column;
}

.split--about .split__text { gap: 22px; }
.split--contact .split__text { gap: 14px; }

.label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--green-muted);
}

.split__text h1 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--green-heading);
}

.split--about h1 {
  font-size: 36px;
  line-height: 1.3;
}

.split--contact h1 {
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1.2;
}

.split--about p {
  margin: 0;
  font-size: 16px;
  line-height: 1.9;
  color: var(--green-dark);
  max-width: 460px;
}

.bullets {
  display: flex;
  gap: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green-bullet);
  margin-top: 8px;
  flex-wrap: wrap;
}

.split__img {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.split--about .split__img { height: 560px; }
.split--contact .split__img { height: 520px; }

.split__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Contact form ---------- */

.field {
  width: 100%;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 10px;
  padding: 13px 18px;
  font-family: 'Alef', sans-serif;
  font-size: 14px;
  color: var(--green-dark);
  transition: border-color .2s;
}

.field::placeholder { color: var(--green-muted); opacity: 1; }

.field:focus {
  outline: none;
  border-color: rgba(62, 79, 36, .45);
}

.field--invalid { border-color: rgba(178, 60, 44, .6); }

textarea.field {
  resize: none;
  min-height: 92px;
  line-height: 1.6;
}

.form { display: flex; flex-direction: column; gap: 14px; }

.form .btn {
  align-self: flex-start;
  padding: 12px 34px;
}

/* Custom dropdown */

.dropdown { position: relative; }

.dropdown__toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: right;
}

.dropdown__toggle .dropdown__value { color: var(--green-muted); }
.dropdown__toggle.dropdown__toggle--filled .dropdown__value { color: var(--green-dark); }

.dropdown__caret {
  font-size: 11px;
  transition: transform .2s;
}

.dropdown.open .dropdown__caret { transform: rotate(180deg); }

.dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  background: #FFFFFF;
  border: 1px solid var(--field-border);
  border-radius: 10px;
  overflow: hidden;
  z-index: 5;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dropdown.open .dropdown__menu { display: block; }

.dropdown__option {
  padding: 12px 18px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(62, 79, 36, .1);
  transition: background .2s;
}

.dropdown__option:last-child { border-bottom: 0; }

.dropdown__option:hover,
.dropdown__option[aria-selected="true"],
.dropdown__option.focused {
  background: var(--menu-hover);
}

/* Success state */

.form-success {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.form-success h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--green-heading);
}

.form-success p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--green-dark);
}

.form.submitted { display: none; }
.form.submitted + .form-success { display: flex; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .nav { padding: 20px 20px; }
  .logo { font-size: 24px; }

  .nav__burger { display: inline-flex; }

  .nav__menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 20px 24px 24px;
    background: var(--bg-page);
    box-shadow: 0 14px 24px rgba(0, 0, 0, .08);
    font-size: 15px;
  }

  .nav.open .nav__menu { display: flex; }

  .hero__copy { padding: 36px 24px 0; }
  .hero__copy h1 { font-size: 32px; }
  .hero__img { bottom: -60px; height: calc(100% + 60px); object-position: 41% 0%; }

  .page { min-height: 0; }

  .split {
    grid-template-columns: 1fr;
    padding: 8px 24px 48px;
  }

  .split--about { gap: 36px; }
  .split--contact { gap: 36px; }

  .split--about h1 { font-size: 28px; }
  .split--contact h1 { font-size: 26px; }

  .split--about .split__img,
  .split--contact .split__img { height: 320px; }
}
