/* ──────────────────────────────────────
   Allium Software — alliumsoftware.co.nz
   ────────────────────────────────────── */

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Tokens */
:root {
  --parchment: #f5f0e8;
  --parchment-mid: #ede8df;
  --parchment-dk: #e3ded6;
  --cream: #fdfcfa;

  --ink: #1a1a18;
  --ink-soft: #33312c;
  --ink-mid: #77746c;
  --ink-faint: #9d9a92;

  --sage: #6b7f5e;
  --sage-lt: #8ba07a;
  --sage-dk: #4f5e45;
  --sage-pale: rgba(107, 127, 94, 0.08);

  --warm-black: #1c1b18;

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --logo: "Inter", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink-soft);
  background: var(--parchment);
  overflow-x: hidden;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--sage);
  color: var(--cream);
}

/* ── Texture overlay ── */

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Shared ── */

.tag {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.75rem;
}

.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.hr {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hr span {
  display: block;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--sage), transparent);
  opacity: 0.15;
}

/* ── Scroll reveal ── */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1s var(--ease-out),
    transform 1s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-delay="1"] {
  transition-delay: 0.1s;
}
.reveal[data-delay="2"] {
  transition-delay: 0.2s;
}
.reveal[data-delay="3"] {
  transition-delay: 0.3s;
}
.reveal[data-delay="4"] {
  transition-delay: 0.4s;
}

/* ────────────────────
   Nav
   ──────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.6s var(--ease-out);
}

.nav.is-scrolled {
  padding: 1rem 3rem;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 1px 0 rgba(107, 127, 94, 0.06);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.nav__logo:hover {
  opacity: 0.8;
}

.nav__logo img {
  height: 34px;
  width: auto;
}

.nav__wordmark {
  font-family: var(--logo);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sage);
}

.nav__links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav__links a {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mid);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease;
}

.nav__links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--sage);
  transition: width 0.4s var(--ease-out);
}

.nav__links a:hover {
  color: var(--sage);
}

.nav__links a:hover::after {
  width: 100%;
}

/* ────────────────────
   Hero
   ──────────────────── */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 5rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Animated background blobs */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__bg svg {
  position: absolute;
  width: 160%;
  height: 160%;
  top: -30%;
  left: -30%;
}

/* Logo mark entrance */
.hero__mark {
  position: relative;
  z-index: 1;
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: scale(0.8);
  animation: mark-in 1.2s var(--ease-out) 0.2s forwards;
}

.hero__mark img {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 4px 16px rgba(107, 127, 94, 0.2));
}

.hero__body {
  position: relative;
  z-index: 1;
}

.hero__overtitle {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up 1s var(--ease-out) 0.6s forwards;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(3.2rem, 8vw, 7rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--ink);
  max-width: 900px;
}

.hero h1 em {
  font-style: italic;
  color: var(--sage);
}

/* Line-by-line text reveal */
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}

.line__inner {
  display: block;
  transform: translateY(105%);
  animation: line-reveal 1s var(--ease-out) forwards;
}

.line:nth-child(1) .line__inner {
  animation-delay: 0.5s;
}
.line:nth-child(2) .line__inner {
  animation-delay: 0.65s;
}
.line:nth-child(3) .line__inner {
  animation-delay: 0.8s;
}

.hero__sub {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--ink-mid);
  margin-top: 1.5rem;
  max-width: 480px;
  margin-inline: auto;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(15px);
  animation: fade-up 0.9s var(--ease-out) 1.1s forwards;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  animation: fade-up 0.8s var(--ease-out) 1.6s forwards;
}

.hero__scroll span {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero__scroll-line {
  width: 1px;
  height: 48px;
  position: relative;
  overflow: hidden;
}

.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--sage), transparent);
  animation: scroll-drop 2.2s ease-in-out infinite;
}

/* ────────────────────
   About
   ──────────────────── */

.about {
  padding: 10rem 2rem;
  position: relative;
}

.about__inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.about h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-soft);
}

.about h2 strong {
  font-weight: 500;
  color: var(--ink);
}

.about .orb:first-of-type {
  width: 350px;
  height: 350px;
  background: radial-gradient(
    circle,
    rgba(107, 127, 94, 0.07),
    transparent 70%
  );
  top: 8%;
  right: -5%;
}

.about .orb:last-of-type {
  width: 250px;
  height: 250px;
  background: radial-gradient(
    circle,
    rgba(107, 127, 94, 0.05),
    transparent 70%
  );
  bottom: 12%;
  left: -3%;
}

/* ────────────────────
   Statement
   ──────────────────── */

.statement {
  padding: 8rem 2rem;
  text-align: center;
}

.statement blockquote {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3.8vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
  max-width: 750px;
  margin: 0 auto;
  line-height: 1.45;
  position: relative;
}

.statement blockquote::before {
  content: "\201C";
  position: absolute;
  top: -0.35em;
  left: -0.5em;
  font-size: 4.5em;
  color: var(--sage);
  opacity: 0.15;
  font-family: var(--serif);
  line-height: 1;
}

.statement blockquote em {
  color: var(--sage);
}

/* ────────────────────
   Beliefs
   ──────────────────── */

.beliefs {
  padding: 8rem 2rem 9rem;
  background: var(--warm-black);
  color: var(--parchment);
  position: relative;
  overflow: hidden;
}

.beliefs__inner {
  max-width: 1060px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.beliefs__header {
  text-align: center;
  margin-bottom: 5rem;
}

.beliefs .tag {
  text-align: center;
  color: var(--sage-lt);
}

.beliefs h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 300;
  color: var(--parchment);
  margin-top: 0.5rem;
}

.beliefs__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.beliefs__card {
  padding: 2.5rem 2rem;
  border: 1px solid rgba(245, 240, 232, 0.06);
  border-radius: 12px;
  background: rgba(245, 240, 232, 0.02);
  position: relative;
  overflow: hidden;
  transition: all 0.5s var(--ease-out);
}

.beliefs__card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--sage), transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.beliefs__card:hover {
  border-color: rgba(107, 127, 94, 0.15);
  background: rgba(245, 240, 232, 0.03);
  transform: translateY(-4px);
}

.beliefs__card:hover::before {
  opacity: 0.6;
}

.beliefs__card-num {
  font-family: var(--serif);
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--sage);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 1.2rem;
}

.beliefs__card h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--parchment);
  margin-bottom: 0.8rem;
}

.beliefs__card p {
  font-size: 1rem;
  font-weight: 300;
  color: rgba(245, 240, 232, 0.55);
  line-height: 1.7;
}

/* Background glow */
.beliefs__glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(107, 127, 94, 0.08),
    transparent 70%
  );
  top: 15%;
  left: -10%;
  pointer-events: none;
  z-index: 0;
}

/* ────────────────────
   Team
   ──────────────────── */

.team {
  padding: 8rem 2rem;
}

.team__header {
  text-align: center;
  margin-bottom: 5rem;
}

.team h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  font-weight: 300;
  color: var(--ink);
  margin-top: 0.5rem;
}

.team__grid {
  display: flex;
  justify-content: center;
  gap: 6rem;
  max-width: 900px;
  margin: 0 auto;
}

.team__member {
  text-align: center;
  flex: 0 1 360px;
}

.team__photo-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
}

.team__photo-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: var(--sage);
  opacity: 0;
  transition: all 0.6s var(--ease-out);
}

.team__member:hover .team__photo-ring {
  opacity: 0.4;
  animation: ring-rotate 8s linear infinite;
}

.team__photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.08);
  border: 3px solid var(--parchment-dk);
  transition: all 0.6s var(--ease-out);
}

.team__member:hover .team__photo {
  border-color: var(--sage);
  box-shadow: 0 12px 48px rgba(107, 127, 94, 0.12);
  transform: scale(1.02);
}

.team__name {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 400;
  margin-top: 1.8rem;
  color: var(--ink);
}

.team__role {
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-top: 0.35rem;
}

.team__bio {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink-mid);
  margin-top: 1rem;
  max-width: 320px;
  margin-inline: auto;
  line-height: 1.7;
}

/* ────────────────────
   Contact
   ──────────────────── */

.contact {
  padding: 7rem 2rem 8rem;
  text-align: center;
  background: var(--cream);
  border-top: 1px solid var(--sage-pale);
}

.contact__header {
  margin-bottom: 2rem;
}

.contact h2 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 300;
  color: var(--ink);
  margin-top: 0.5rem;
}

.contact__text {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--ink-mid);
  margin-bottom: 2.5rem;
  max-width: 450px;
  margin-inline: auto;
  line-height: 1.7;
}

.contact__email {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: 400;
  color: var(--sage);
  text-decoration: none;
  display: inline-block;
  position: relative;
  transition: color 0.3s ease;
}

.contact__email::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--sage);
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.contact__email:hover {
  color: var(--sage-dk);
}

.contact__email:hover::after {
  transform: scaleX(1);
}

.contact__location {
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 2rem;
}

/* ────────────────────
   Footer
   ──────────────────── */

.footer {
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--sage-pale);
  background: var(--parchment);
}

.footer p {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* ────────────────────
   Keyframes
   ──────────────────── */

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mark-in {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes line-reveal {
  to {
    transform: translateY(0);
  }
}

@keyframes scroll-drop {
  0% {
    top: -100%;
  }
  100% {
    top: 200%;
  }
}

@keyframes ring-rotate {
  to {
    transform: rotate(360deg);
  }
}

/* ────────────────────
   Responsive
   ──────────────────── */

@media (max-width: 768px) {
  .nav {
    padding: 1.2rem 1.5rem;
  }
  .nav.is-scrolled {
    padding: 0.8rem 1.5rem;
  }
  .nav__links {
    gap: 1.5rem;
  }

  .beliefs__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .team__grid {
    flex-direction: column;
    align-items: center;
    gap: 3.5rem;
  }

  .footer {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 5rem 1.5rem 3rem;
  }
  .about {
    padding: 6rem 1.5rem;
  }
  .beliefs {
    padding: 5rem 1.5rem 6rem;
  }
  .team,
  .statement {
    padding: 5rem 1.5rem;
  }
  .nav__wordmark {
    display: none;
  }
}
