/* ==========================================================================
   Hortus.dev marketing site
   Vanilla CSS, mobile-first. Palette and type matched to the Shopify store
   (shop.hortus.dev): Assistant typeface, forest green, and gold.
   ========================================================================== */

/* Brand typeface, self-hosted (Latin variable woff2 covers weights 200-800). */
@font-face {
  font-family: "Assistant";
  src: url("assets/fonts/assistant-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Greens (from the store theme) */
  --forest:      #437c4e;   /* brand green: header, footer, accents */
  --forest-deep: #2f5a3a;   /* darker, for text-heavy dark sections */

  /* Green accent (replaces the store's teal): the primary accent here */
  --accent-fill: #3c6e48;   /* green button/step fills (white text passes AA) */
  --accent:      #2f5a3a;   /* dark green: links, labels, hovers (AA on white) */

  /* Gold: the store's announcement-bar accent */
  --gold:        #d1bb6a;

  /* Neutrals */
  --bg:        #f7f8f6;   /* page background */
  --tint:      #edf2ec;   /* light sage, for set-apart sections */
  --surface:   #ffffff;   /* cards */
  --ink:       #202223;   /* primary text */
  --ink-soft:  #5b5f5c;   /* secondary text */
  --paper:     #f7f8f6;   /* light text colour used on dark sections */
  --on-dark:   #e8efe9;   /* muted text on dark green */

  --line:      rgba(32, 34, 35, 0.12);
  --line-dark: rgba(255, 255, 255, 0.20);

  --font-sans: "Assistant", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --container: 72rem;
  --measure: 40rem;        /* centred text column */
  --measure-wide: 60rem;   /* wider blocks (grids) that break out, still centred */
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section-y: clamp(3.5rem, 9vw, 7rem);
  --section-top: clamp(2rem, 4.5vw, 3.25rem);
  --radius: 10px;
}

/* --- Reset / base ------------------------------------------------------- */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; font-weight: 700; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-fill); }

:focus-visible {
  outline: 2px solid var(--accent-fill);
  outline-offset: 3px;
  border-radius: 3px;
}

mark { background: none; color: inherit; }

/* --- Layout helpers ----------------------------------------------------- */

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 100;
  background: var(--forest-deep);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top 0.18s ease;
}
.skip-link:focus { top: 0.75rem; }

/* --- Brand -------------------------------------------------------------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}
.brand-mark { width: 2.1rem; height: 2.1rem; flex: none; display: block; }
.brand-wordmark {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: #fff;
  transition: color 0.15s ease;
}
.brand-dot { color: var(--gold); }
.brand:hover .brand-wordmark { color: var(--gold); }
.footer-wordmark {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: #fff;
}
.footer-dot { color: var(--gold); }

/* --- Header / nav ------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--forest);
  color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.primary-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.7rem 0.25rem;
  border-bottom: 1px solid var(--line-dark);
}
.primary-nav a:hover { color: var(--gold); }
.primary-nav a[aria-current="page"] { color: var(--gold); }
.primary-nav .nav-cta { color: #fff; border-bottom: 0; }
.primary-nav .nav-cta[aria-current="page"] { color: #fff; }

.nav-toggle {
  appearance: none;
  border: 1px solid var(--line-dark);
  background: transparent;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after  { position: absolute; top: 6px; }

.primary-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--forest);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  padding: 0.5rem var(--gutter) 1rem;
  display: none;
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.5);
}
.nav-open .primary-nav { display: block; }
.nav-open .nav-toggle-bar { background: transparent; }
.nav-open .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bar::after  { transform: translateY(-6px) rotate(-45deg); }

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

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-primary { background: var(--accent-fill); color: #fff; }
.btn-primary:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent-fill); color: var(--accent); }
.btn-lg { padding: 1rem 2.1rem; font-size: 1.125rem; }

/* On the green header, the CTA is a gold pill */
.site-header .nav-cta {
  background: var(--gold);
  color: #2a2410;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-weight: 700;
}
.site-header .nav-cta:hover { background: #ddc97f; color: #2a2410; }

/* --- Sections ----------------------------------------------------------- */

.section { padding-block: var(--section-top) var(--section-y); }
.section + .section { border-top: 1px solid var(--line); }

/* Light sage tint, used to set sections apart without going dark. */
.section-tint {
  background: var(--tint);
  border-top: 0;
}
.section + .section-tint,
.section-tint + .section { border-top: 0; }

.section-index {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}

.section-heading {
  font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.6rem);
  margin: 0 0 1.1rem;
  max-width: 18ch;
}
.lead {
  font-size: clamp(1.08rem, 1rem + 0.5vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 36rem;
  margin: 0 0 1.5rem;
}
.subheading {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 2.25rem 0 1rem;
}

/* Body copy at a comfortable reading measure (e.g. the Software section). */
.prose {
  max-width: 36rem;
  margin: 0 0 1.1rem;
}
.prose:last-child { margin-bottom: 0; }
/* Extra breathing room when prose follows a bullet list. */
.capabilities + .prose { margin-top: 2rem; }

/* --- Two-arm overview cards --------------------------------------------- */

.arms {
  display: grid;
  gap: clamp(1rem, 3vw, 1.75rem);
  margin-top: 1.75rem;
}
.arm {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.6rem 1.5rem;
}
.arm-title { font-size: 1.5rem; margin: 0 0 0.6rem; }
.arm p { color: var(--ink-soft); margin: 0 0 1.1rem; }
.arm-link { margin: 0; }
.arm-link a { font-weight: 700; text-decoration: none; }
.arm-link a span {
  display: inline-block;
  transition: transform 0.15s ease;
}
.arm-link a:hover span { transform: translateX(3px); }

@media (min-width: 40rem) {
  .arms { grid-template-columns: 1fr 1fr; }
}

/* --- Hero --------------------------------------------------------------- */

.hero {
  padding-block: clamp(3.5rem, 8vw, 6.5rem) var(--section-y);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  -webkit-mask-image: radial-gradient(120% 90% at 85% -10%, #000, transparent 70%);
          mask-image: radial-gradient(120% 90% at 85% -10%, #000, transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}
.hero .container { position: relative; }
.kicker {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
  padding-left: 1.6rem;
  position: relative;
}
.kicker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 1.1rem;
  height: 3px;
  background: var(--gold);
}
.hero h1 {
  font-size: clamp(2.3rem, 1.3rem + 5vw, 4.25rem);
  margin: 0 0 1.4rem;
  max-width: 18ch;
}
.hero-sub {
  font-size: clamp(1.1rem, 1rem + 0.7vw, 1.45rem);
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* About hero: title with a portrait stacked beneath it. */
.hero-about {
  /* Smaller bottom padding so the space below the photo matches the space
     above the title (the next section adds its own top padding). */
  padding-bottom: var(--section-top);
}
.hero-about-col {
  max-width: var(--measure);
  margin-inline: auto;
}
.hero-about .kicker,
.hero-about h1 {
  max-width: none;
  margin-inline: 0;
}
.hero-portrait {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  margin: 2rem 0 0;
}

/* --- Capabilities list -------------------------------------------------- */

.capabilities {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  max-width: 56ch;
}
.capabilities li {
  position: relative;
  padding-left: 1.9rem;
}
.capabilities li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid var(--accent-fill);
  border-radius: 50%;
}

/* --- Portfolio ---------------------------------------------------------- */

.portfolio-grid {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: clamp(1rem, 3vw, 1.75rem);
}
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent-fill) 45%, var(--line));
  box-shadow: 0 22px 40px -30px rgba(32, 34, 35, 0.4);
}
.tile-media {
  aspect-ratio: 1 / 1;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.tile-media img { width: 100%; height: 100%; object-fit: cover; }
.tile-body { padding: 1.35rem 1.4rem 1.6rem; }
.tile-body h3 { font-size: 1.3rem; margin: 0 0 0.55rem; }
.tile-body p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

.work-footnote {
  margin: 2rem 0 0;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* --- How it works / steps ----------------------------------------------- */

.steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
}
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
  max-width: 60ch;
}
.step-num {
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-fill);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}
.step h3 { font-size: 1.2rem; margin: 0.25rem 0 0.4rem; }
.step p { margin: 0; color: var(--ink-soft); }


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

.contact-action { margin: 2rem 0 0; }

/* Cross-link from one arm to the other */
.cross-arm { margin: 1.75rem 0 0; }
.cross-arm a { font-weight: 700; text-decoration: none; }
.cross-arm a span { display: inline-block; transition: transform 0.15s ease; }
.cross-arm a:hover span { transform: translateX(3px); }

/* --- Footer ------------------------------------------------------------- */

.site-footer {
  background: var(--forest);
  color: var(--on-dark);
  padding-block: 2.5rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer-links a {
  color: var(--on-dark);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}
.footer-links a:hover { color: var(--gold); }

/* --- Centred content column --------------------------------------------- */
/* Text lives in one centred measure. Wide blocks (grids) break out to a
   wider measure, also centred, so the whole page shares one centre axis. */
.kicker,
.hero h1,
.hero-sub,
.hero-actions,
.section-index,
.section-heading,
.lead,
.prose,
.subheading,
.capabilities,
.steps,
.work-footnote,
.contact-action,
.cross-arm {
  max-width: var(--measure);
  margin-inline: auto;
}
.portfolio-grid,
.arms {
  max-width: var(--measure-wide);
  margin-inline: auto;
}

/* On grid sections, the label, heading and footnote widen to the grid
   measure so their left edges line up with the grid. */
.section-wide .section-index,
.section-wide .section-heading,
.section-wide .work-footnote {
  max-width: var(--measure-wide);
}

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

@media (min-width: 48rem) {
  .nav-toggle { display: none; }
  .primary-nav {
    position: static;
    display: block;
    background: none;
    border: 0;
    padding: 0;
    box-shadow: none;
  }
  .primary-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 1.85rem;
  }
  .primary-nav a { padding: 0.35rem 0; border-bottom: 0; }
  /* Set the action apart from the navigation links. */
  .primary-nav li:last-child {
    margin-left: 0.6rem;
    padding-left: 1.85rem;
    border-left: 1px solid var(--line-dark);
  }
}

@media (min-width: 40rem) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

/* --- Motion / preferences ---------------------------------------------- */

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