/* ============================================================
   Xerophyte — Global Styles
   ============================================================ */

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

:root {
  --cream:   #F5EFE6;
  --cream-dk:#EDE4D7;
  --green:   #2D5A3D;
  --sage:    #7AAD82;
  --sage-lt: #A8C9AD;
  --charcoal:#1A1A1A;
  --mid:     #5A5A52;
  --white:   #FFFFFF;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'DM Sans', sans-serif;

  --max: 1100px;
  --gutter: clamp(1.5rem, 5vw, 4rem);
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4 { font-family: var(--serif); font-weight: 400; line-height: 1.1; }
h1 { font-size: clamp(3rem, 8vw, 7rem); }
h2 { font-size: clamp(2rem, 5vw, 4rem); }
h3 { font-size: clamp(1.4rem, 3vw, 2.2rem); }

.label {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sage);
}

p { max-width: 62ch; }
a { color: inherit; text-decoration: none; }

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

section { padding: clamp(4rem, 10vw, 9rem) 0; }

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--gutter);
  background: transparent;
  transition: background .3s, box-shadow .3s;
}
nav.scrolled {
  background: rgba(245,239,230,.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.4rem;
  color: var(--green);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--charcoal);
  font-weight: 400;
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 100%;
  height: 1px;
  background: var(--green);
  transition: right .25s;
}
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-links a:hover, .nav-links a.active { color: var(--green); }
.nav-cta {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .55rem 1.3rem;
  border: 1px solid var(--green);
  color: var(--green) !important;
  border-radius: var(--radius);
  transition: background .2s, color .2s !important;
}
.nav-cta:hover { background: var(--green); color: var(--cream) !important; }
.nav-cta::after { display: none !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 24px; height: 1.5px;
  background: var(--charcoal);
  transition: transform .3s, opacity .3s;
  display: block;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .85rem 2rem;
  border-radius: var(--radius);
  transition: all .25s;
  cursor: pointer;
}
.btn-primary { background: var(--green); color: var(--cream); border: 1px solid var(--green); }
.btn-primary:hover { background: transparent; color: var(--green); }
.btn-outline { background: transparent; color: var(--green); border: 1px solid var(--green); }
.btn-outline:hover { background: var(--green); color: var(--cream); }

.divider { width: 3rem; height: 1px; background: var(--sage); margin: 1.5rem 0; }

/* ── POV callout ── */
.pov-block {
  background: var(--green);
  color: var(--cream);
  padding: 2.5rem 3rem;
  border-radius: var(--radius);
  margin: 2.5rem 0;
}
.pov-block .label { color: var(--sage-lt); margin-bottom: .8rem; }
.pov-block p { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 3vw, 2rem); line-height: 1.3; max-width: none; }

/* ── Stats ── */
.stats { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; margin-top: 2rem; }
.stat-num { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.8rem); color: var(--green); line-height: 1; }
.stat-desc { font-size: .8rem; color: var(--mid); letter-spacing: .05em; margin-top: .2rem; }

/* ── Case study card ── */
.case-card {
  border-top: 1px solid var(--cream-dk);
  padding: 3.5rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 5rem;
  align-items: start;
}
.case-card:last-child { border-bottom: 1px solid var(--cream-dk); }
.case-meta { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.case-tag { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; padding: .25rem .75rem; border: 1px solid var(--sage-lt); color: var(--mid); border-radius: 99px; }
.case-steps { display: grid; gap: 1.8rem; }
.step-label { font-size: .68rem; letter-spacing: .15em; text-transform: uppercase; color: var(--sage); margin-bottom: .3rem; }
.step-title { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; margin-bottom: .4rem; line-height: 1.2; }
.step-body { font-size: .9rem; color: var(--mid); line-height: 1.65; }

/* ── Services grid ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--cream-dk);
  border: 1px solid var(--cream-dk);
  margin-top: 3rem;
}
.service-item { background: var(--cream); padding: 2rem 1.8rem; }
.service-problem { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; margin: .6rem 0 1rem; line-height: 1.25; }
.service-solutions { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.service-solutions li { font-size: .85rem; color: var(--mid); padding-left: 1rem; position: relative; line-height: 1.4; }
.service-solutions li::before { content: '→'; position: absolute; left: 0; color: var(--sage); font-size: .75rem; }

/* ── Hero ── */
#hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 6rem;
}
.hero-inner { position: relative; z-index: 2; max-width: 820px; }
.hero-inner h1 { color: var(--green); }
.hero-inner h1 em { font-style: italic; color: var(--charcoal); }
.hero-sub { margin: 1.8rem 0 2.5rem; font-size: 1.1rem; color: var(--mid); max-width: 50ch; }
.hero-bg-text {
  position: absolute; right: -1rem; top: 50%; transform: translateY(-50%);
  font-family: var(--serif); font-size: clamp(8rem, 18vw, 18rem); font-weight: 300;
  color: transparent; -webkit-text-stroke: 1px rgba(45,90,61,.08);
  line-height: 1; pointer-events: none; user-select: none; white-space: nowrap;
}

/* ── Page hero ── */
.page-hero {
  padding-top: clamp(7rem, 14vw, 12rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

/* ── Contact form ── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mid); margin-bottom: .5rem; }
.form-group input, .form-group textarea {
  width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--cream-dk);
  padding: .6rem 0; font-family: var(--sans); font-size: .95rem; color: var(--charcoal); outline: none; transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--green); }
.form-group textarea { resize: vertical; min-height: 100px; }

/* ── Footer ── */
footer {
  background: var(--green); color: var(--cream);
  padding: 3rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer-logo { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; }
.footer-copy { font-size: .8rem; opacity: .6; }
.footer-email { font-size: .85rem; letter-spacing: .08em; text-decoration: underline; text-underline-offset: 3px; opacity: .85; transition: opacity .2s; }
.footer-email:hover { opacity: 1; }

/* ── Fade-in ── */
.fade-up { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.fade-up.visible { opacity: 1; transform: none; }

/* Active nav */
body[data-page="home"]    .nav-home::after,
body[data-page="about"]   .nav-about::after,
body[data-page="work"]    .nav-work::after,
body[data-page="contact"] .nav-contact::after { right: 0; }
body[data-page="home"]    .nav-home,
body[data-page="about"]   .nav-about,
body[data-page="work"]    .nav-work,
body[data-page="contact"] .nav-contact { color: var(--green); }

/* ── Responsive ── */
@media (max-width: 860px) {
  .case-card { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .nav-links { display: none; flex-direction: column; gap: 1.5rem; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--cream); justify-content: center; align-items: center; z-index: 99; }
  .nav-links.open { display: flex; }
  .nav-cta { display: none; }
  .nav-toggle { display: flex; z-index: 101; }
  .nav-links a { font-size: 1.1rem; letter-spacing: .15em; }
}
@media (max-width: 560px) {
  .pov-block { padding: 1.8rem; }
  .stats { gap: 1rem 2rem; }
  footer { flex-direction: column; align-items: flex-start; }
}

/* ── Single-page nav additions ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem var(--gutter);
  background: transparent;
  transition: background .3s, box-shadow .3s;
}
nav.scrolled {
  background: rgba(245,239,230,.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(0,0,0,.07);
}
.nav-logo {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--green);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .45rem;
  text-decoration: none;
}
.nav-links {
  display: flex;
  gap: 2.2rem;
  list-style: none;
}
.nav-links a {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--charcoal);
  font-weight: 400;
  text-decoration: none;
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0; right: 100%;
  height: 1px;
  background: var(--green);
  transition: right .25s;
}
.nav-links a:hover::after,
.nav-links a.active::after { right: 0; }
.nav-links a:hover,
.nav-links a.active { color: var(--green); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  width: 22px; height: 1.5px;
  background: var(--charcoal);
  display: block;
  transition: transform .3s, opacity .3s;
}

/* Mobile nav */
@media (max-width: 760px) {
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1.8rem;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--cream);
    justify-content: center;
    align-items: center;
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1.1rem; letter-spacing: .15em; }
  .nav-toggle { display: flex; z-index: 101; }
}

/* Section background alternation */
#what    { background: var(--green); color: var(--cream); }
#contact { background: var(--cream-dk); }

footer {
  background: var(--green);
  color: var(--cream);
  padding: 2.5rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.footer-copy { font-size: .78rem; opacity: .55; }
.footer-email { font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; opacity: .8; transition: opacity .2s; color: var(--cream); }
.footer-email:hover { opacity: 1; }
