/* ==========================================================
   StellarEcom — site styles
   Colors: warm white, charcoal, soft sage.
   Layout: full-width photo heroes, light sections, and
   rounded charcoal panels (services, contact and footer).
   ========================================================== */

:root {
  --bg: #F4F0EA;            /* warm white page */
  --surface: #FBF9F5;       /* cards on the page */
  --cream: #ECE6DC;
  --charcoal: #2B2D2F;      /* text */
  --muted: #62655F;
  --soft-ink: #8A8D87;      /* second tone of headings on light */
  --line: #DFD8CD;

  --panel: #262A28;         /* charcoal panels */
  --panel-raised: #313633;
  --panel-text: #F4F0EA;
  --panel-muted: #B4B8B2;
  --panel-soft: #8C928D;    /* second tone of headings on dark */
  --panel-line: rgba(244, 240, 234, .14);

  --sage: #8FA388;
  --sage-dark: #5F7559;
  --sage-light: #B9C8B1;
  --sage-soft: #E4EADF;

  --radius: 20px;
  --panel-radius: 32px;
  --edge: 12px;             /* gap between panels and the window edge */
  --font-display: "Inter Tight", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--charcoal);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(143, 163, 136, .25);
}

img { max-width: 100%; display: block; }
/* <picture> only chooses which file to load; the <img> inside keeps all the layout */
picture { display: contents; }
source { display: none; }
a { color: inherit; }
p { margin: 0; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

/* second, quieter tone inside a heading */
.soft { color: var(--soft-ink); }
.panel .soft { color: var(--panel-soft); }

a:focus-visible {
  outline: 2px solid var(--sage-dark);
  outline-offset: 4px;
  border-radius: 8px;
}
.panel a:focus-visible,
.hero a:focus-visible { outline-color: var(--sage-light); }

.container {
  width: min(1200px, 100% - 64px);
  margin-inline: auto;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 22px 16px 26px;
  border-radius: 12px;
  background: var(--charcoal);
  color: var(--bg);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.btn::after {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: var(--arrow) center / contain no-repeat;
  mask: var(--arrow) center / contain no-repeat;
  transition: transform .2s ease;
}
.btn:hover { background: var(--sage-dark); }
.btn:hover::after { transform: translateX(3px); }
.btn-sm { padding: 11px 16px 11px 20px; font-size: .95rem; border-radius: 10px; }
.btn-sm::after { width: 16px; height: 16px; }
.btn-light { background: var(--bg); color: var(--charcoal); }
.btn-light:hover { background: var(--sage-light); }
.btn-outline { background: transparent; color: var(--charcoal); box-shadow: inset 0 0 0 1px var(--line); }
.btn-outline:hover { background: var(--surface); box-shadow: inset 0 0 0 1px var(--charcoal); }

.text-link {
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1.5px solid var(--sage);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: color .2s ease, border-color .2s ease;
}
.text-link:hover { color: var(--sage-dark); border-color: var(--sage-dark); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 240, 234, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  height: 80px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.logo img { width: 34px; height: 34px; }
.logo em { font-style: normal; color: var(--sage-dark); }

.nav { display: flex; gap: 36px; }
.nav a {
  color: var(--muted);
  font-weight: 500;
  font-size: .97rem;
  text-decoration: none;
  transition: color .2s ease;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--charcoal); }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--sage); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.header-cta { justify-self: end; }
.header-inner .logo { justify-self: start; }

/* ---------- Hero: a full-width photo with the headline on top ---------- */
.hero { padding: 0 var(--edge); }
.hero-frame {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  max-width: 1760px;
  min-height: clamp(560px, calc(100vh - 92px), 820px);
  min-height: clamp(560px, calc(100svh - 92px), 820px);
  margin-inline: auto;
  border-radius: var(--panel-radius);
  background: var(--panel);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 56%;
}
/* darkens the lower part so the white headline stays readable */
.hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(24, 27, 25, .82) 0%, rgba(24, 27, 25, .5) 32%, rgba(24, 27, 25, 0) 62%),
    linear-gradient(to right, rgba(24, 27, 25, .28), rgba(24, 27, 25, 0) 55%);
}
.hero-content {
  display: grid;
  grid-template-columns: 1fr minmax(0, 340px);
  align-items: end;
  gap: 48px;
  width: 100%;
  padding: 64px clamp(28px, 4.5vw, 64px) clamp(32px, 4.5vw, 64px);
  color: #fff;
}
.hero h1 {
  font-size: clamp(3rem, 6.4vw, 6.25rem);
  line-height: .98;
  letter-spacing: -0.045em;
  max-width: 12ch;
}
.hero p {
  margin-bottom: 28px;
  color: rgba(255, 255, 255, .86);
  font-size: 1.15rem;
}

.hero-page .hero-frame { min-height: clamp(520px, calc(88svh - 92px), 760px); }
.hero-page .hero-bg { object-position: 50% 50%; }
.hero-page h1 { max-width: 12ch; }

/* ---------- Sections ---------- */
.section { padding: 128px 0; }
.section-head { max-width: 660px; margin-bottom: 56px; }
.section-head h2,
.split-head h2 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); }
.section-head p { margin-top: 18px; color: var(--muted); font-size: 1.12rem; }
.section-head.center { max-width: 820px; margin-inline: auto; text-align: center; }

.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
}
.section-head-row .section-head { margin-bottom: 0; }

/* heading on the left, short text on the right */
.split-head {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: end;
  gap: 48px;
  margin-bottom: 64px;
}
.split-head h2 { max-width: 13ch; }
.split-head p { max-width: 38ch; color: var(--muted); font-size: 1.12rem; }
.split-head .text-link { display: inline-block; margin-top: 22px; }

/* ---------- Product cards ---------- */
.grid { display: grid; gap: 40px 24px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card { display: flex; flex-direction: column; }
.card-media {
  aspect-ratio: 8 / 7;
  border-radius: var(--radius);
  background: var(--sage-soft);
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
@media (hover: hover) {
  .card:hover .card-media img { transform: scale(1.04); }
}
.card h3 { margin-top: 20px; font-size: 1.28rem; letter-spacing: -0.02em; }
.card p { margin-top: 6px; color: var(--muted); font-size: 1rem; }

/* ---------- Charcoal panels ---------- */
.panel {
  max-width: 1760px;
  margin-inline: var(--edge);
  border-radius: var(--panel-radius);
  background: var(--panel);
  color: var(--panel-text);
  overflow: hidden;
}
@media (min-width: 1784px) { .panel { margin-inline: auto; } }
.panel .split-head p,
.panel .section-head p { color: var(--panel-muted); }

/* ---------- Services ---------- */
.services .panel { padding: 120px 0 128px; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 64px;
}
.service {
  position: relative;
  padding: 40px 32px 0 0;
  border-top: 1px solid var(--panel-line);
}
/* small sage marker sitting on the line */
.service::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  background: var(--sage-light);
}
.service-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 28px;
  border-radius: 14px;
  background: var(--panel-raised);
  color: var(--sage-light);
}
.service h3 { font-size: 1.3rem; letter-spacing: -0.02em; }
.service p { margin-top: 10px; max-width: 26ch; color: var(--panel-muted); font-size: 1rem; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 64px;
  align-items: stretch;
}
.about-photo {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--sage-soft);
}
.stats {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}
.stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.stat strong {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.25rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}
.stat span { color: var(--muted); font-size: 1rem; text-align: right; }

/* ---------- Reviews ---------- */
.reviews { padding-top: 0; }
.review {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 0;
  padding: 36px;
  border-radius: 24px;
  background: var(--surface);
}
.stars { color: var(--sage-dark); font-size: 1.05rem; letter-spacing: 4px; }
.review blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.02em;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-dark);
  font-weight: 600;
}
.review-author strong { display: block; font-size: 1rem; font-weight: 600; }
.review-author span { color: var(--muted); font-size: .95rem; }

/* ---------- Contact & footer: one charcoal panel ---------- */
.panel-top { margin-top: 0; border-radius: var(--panel-radius) var(--panel-radius) 0 0; }
.panel-bottom { border-radius: 0 0 var(--panel-radius) var(--panel-radius); margin-bottom: var(--edge); }

.contact .panel { padding: 128px 0 96px; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
}
.contact h2 { font-size: clamp(2.5rem, 5.4vw, 4.6rem); max-width: 11ch; }
.contact-copy p { margin: 22px 0 36px; max-width: 34ch; color: var(--panel-muted); font-size: 1.12rem; }

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.3vw, 2.9rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
  text-decoration-color: var(--sage);
  overflow-wrap: anywhere;
  transition: color .2s ease;
}
.contact-email:hover { color: var(--sage-light); }
.contact-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 40px 0 0;
  padding: 28px 0 0;
  border-top: 1px solid var(--panel-line);
  list-style: none;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--panel-muted);
  text-decoration: none;
  transition: color .2s ease;
}
a.contact-item:hover { color: var(--panel-text); }
.contact-item svg { flex: none; color: var(--sage-light); }

/* essentials page: closing call to action */
.cta-band { padding: 128px 0 96px; text-align: center; }
.cta-band h2 { font-size: clamp(2.5rem, 5.4vw, 4.6rem); max-width: 17ch; margin-inline: auto; }
.cta-band p { margin: 22px auto 36px; max-width: 36ch; color: var(--panel-muted); font-size: 1.12rem; }

.category + .category { margin-top: 128px; }

/* ---------- Footer ---------- */
.site-footer .panel { padding: 0 0 40px; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid var(--panel-line);
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.footer-nav a { color: var(--panel-muted); text-decoration: none; transition: color .2s ease; }
.footer-nav a:hover { color: var(--panel-text); }
.copyright { color: var(--panel-soft); font-size: .95rem; }
.footer-wordmark {
  display: block;
  margin-top: 48px;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 18vw, 15.6rem);
  font-weight: 600;
  line-height: .85;
  letter-spacing: -0.055em;
  text-decoration: none;
  white-space: nowrap;
}
.footer-wordmark em { font-style: normal; color: var(--sage-light); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .header-inner { grid-template-columns: auto 1fr auto; }
  .nav { justify-content: center; gap: 28px; }
}

@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 24px; }
  .hero-content > div { max-width: 420px; }
  .split-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 48px; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .about-photo { height: auto; }
  .contact-grid { grid-template-columns: 1fr; gap: 56px; align-items: start; }
}

/* touch screens and small windows: links big enough for a fingertip (44px) */
@media (max-width: 900px), (pointer: coarse) {
  .nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 2px; }
  .footer-nav a,
  .contact-item,
  .text-link { display: inline-flex; align-items: center; min-height: 44px; }
  .contact-email { padding-block: 8px; }
  .btn-sm { min-height: 44px; }
  .logo { min-height: 44px; }
}

@media (max-width: 760px) {
  :root { --edge: 8px; --panel-radius: 24px; }
  html { scroll-padding-top: 16px; }
  .site-header { position: static; }
  .header-inner { display: flex; flex-wrap: wrap; justify-content: space-between; height: auto; padding: 10px 0 0; row-gap: 6px; }
  .logo { min-height: 44px; }
  .header-cta { display: none; }
  .nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 4px;
    border-top: 1px solid var(--line);
  }
  .contact-list { gap: 8px; }
  /* fill the rest of the first screen below the header, so the button is visible without scrolling */
  .hero-frame { min-height: min(680px, max(440px, calc(100vh - 128px))); min-height: min(680px, max(440px, calc(100svh - 128px))); }
  .hero-page .hero-frame { min-height: min(600px, max(420px, calc(100vh - 160px))); min-height: min(600px, max(420px, calc(100svh - 160px))); }
  .hero h1 { font-size: clamp(2.4rem, 12.5vw, 3.25rem); }
  .hero-bg { object-position: 50% 45%; }
  .hero-page .hero-bg { object-position: 72% 50%; }
  .section { padding: 80px 0; }
  .reviews { padding-top: 0; }
  .services .panel { padding: 80px 0 88px; }
  .contact .panel, .cta-band { padding: 88px 0 72px; }
  .section-head, .section-head-row { margin-bottom: 40px; }
  .section-head-row { flex-direction: column; align-items: flex-start; }
  .category + .category { margin-top: 88px; }
}

@media (max-width: 600px) {
  .container { width: calc(100% - 40px); }
  .hero-content { padding: 48px 22px 26px; }
  .hero-frame::after {
    background: linear-gradient(to top, rgba(24, 27, 25, .86) 0%, rgba(24, 27, 25, .6) 45%, rgba(24, 27, 25, 0) 80%);
  }
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; row-gap: 48px; }
  .service { padding-right: 0; }
  .stat { padding: 22px 0; }
  .review { padding: 28px; }
  .contact-list { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-nav { gap: 0 24px; }
  .copyright, .review-author span { font-size: .95rem; }
  .split-head p, .section-head p, .contact-copy p, .cta-band p { font-size: 1.06rem; }
}

/* phones held sideways: little height, so drop the sticky header and shorten the hero */
@media (max-height: 520px) and (orientation: landscape) {
  .site-header { position: static; }
  html { scroll-padding-top: 16px; }
  /* keep the header to one row */
  .header-inner { flex-wrap: nowrap; padding: 6px 0; }
  .header-inner .nav { order: 0; width: auto; gap: 20px; border-top: 0; justify-content: flex-end; }
  .hero-frame,
  .hero-page .hero-frame { min-height: max(300px, calc(100vh - 96px)); min-height: max(300px, calc(100svh - 96px)); }
  .hero-content { grid-template-columns: 1fr minmax(0, 300px); gap: 32px; padding: 32px 32px 28px; }
  .hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.2rem); }
  .hero p { margin-bottom: 18px; font-size: 1rem; }
}

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

/* Hide the "Powered by Netlify" badge that Netlify injects on free-plan sites.
   Unofficial: Netlify still adds the badge code; this only hides it, and may stop
   working if Netlify changes the badge. Delete this rule to show the badge again. */
#nl-badge-frame { display: none !important; }
