/* ── Tokens ───────────────────────────────────────────────────── */
    :root {
      --ink:       #1c1c16;
      --forest:    #1a3c22;
      --moss:      #3a6b47;
      --sage:      #6a9b76;
      --cream:     #f5f0e8;
      --warm:      #ede8de;
      --sand:      #d9c9a8;
      --gold:      #b8893a;
      --white:     #ffffff;
      --shadow-md: 0 12px 40px rgba(28,28,22,0.14), 0 2px 8px rgba(28,28,22,0.08);
      --shadow-lg: 0 24px 64px rgba(28,28,22,0.20), 0 4px 16px rgba(28,28,22,0.10);
    }

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

    html { scroll-behavior: smooth; }

    body {
      font-family: 'Libre Franklin', sans-serif;
      font-size: 16px;
      color: var(--ink);
      background: var(--cream);
      overflow-x: hidden;
    }

    a:link, a:visited { color: var(--moss); }
    a:hover { color: var(--forest); text-decoration: none; }

    /* ── Page wrapper ─────────────────────────────────────────────── */
    .home-page {
      max-width: 1200px;
      margin: 0 auto;
    }

    /* ════════════════════════════════════════════════════════════════
       HEADER
    ════════════════════════════════════════════════════════════════ */
    .site-header {
      position: relative;
      width: 100%;
      min-height: 200px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 2.5rem 1.5rem 0;
      background-image:
        url('/static/img/Treeline-simple.a2074e1.svg');
      background-repeat: no-repeat;
      background-position: center bottom;
      background-size: 100% auto;
      border-bottom: 1.5px solid var(--sand);
      margin-bottom: 0;
    }

    .site-header img.logo {
      max-width: 300px;
      width: 100%;
      position: relative;
      z-index: 1;
    }

    /* ── About TICO2e button ─────────────────────────────────────── */
    .about-tico2e {
      position: absolute;
      top: 1.4rem;
      right: 1.6rem;
      z-index: 20;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      background: linear-gradient(135deg, #5aad6a, #3d8a4a);
      color: #fff;
      text-decoration: none;
      border-radius: 100px;
      padding: 0.55rem 1.25rem;
      font-family: 'Libre Franklin', sans-serif;
      font-size: 0.78rem;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      box-shadow: 0 4px 16px rgba(0,0,0,0.18);
      animation: numReveal 0.8s cubic-bezier(0.16,1,0.3,1) both;
      animation-delay: 0.1s;
      transition: transform .2s, box-shadow .2s;
    }
    .about-tico2e:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(0,0,0,0.26);
    }

    @media (max-width:540px) {
      .about-tico2e { font-size: 0.72rem; padding: 0.45rem 1rem; top: 1rem; right: 1rem; }
    }



    /* ════════════════════════════════════════════════════════════════
       HERO
    ════════════════════════════════════════════════════════════════ */
    .home-hero {
      position: relative;
      overflow: hidden;
      min-height: 580px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .hero-bg {
      position: absolute;
      inset: 0;
      background-image: url("/static/img/pexels-jessef11-732547.jpg");
      background-size: cover;
      background-position: center 40%;
      transform: scale(1.04);
      animation: heroZoom 18s ease-out forwards;
    }

    @keyframes heroZoom {
      from { transform: scale(1.04); }
      to   { transform: scale(1.00); }
    }

    .hero-overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(
        160deg,
        rgba(26,60,34,0.75) 0%,
        rgba(26,60,34,0.45) 50%,
        rgba(28,28,22,0.72) 100%
      );
    }

    /* Subtle grain */
    .hero-grain {
      position: absolute;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' 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)' opacity='0.04'/%3E%3C/svg%3E");
      opacity: 0.5;
      pointer-events: none;
    }

    .hero-content {
      position: relative;
      z-index: 2;
      text-align: center;
      padding: 4rem 2rem 5rem;
      max-width: 760px;
      animation: fadeUp 0.9s ease both;
    }

    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(28px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .hero-eyebrow {
      display: inline-block;
      font-family: 'Libre Franklin', sans-serif;
      font-size: 0.7rem;
      font-weight: 600;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--sand);
      border: 1px solid rgba(217,201,168,0.45);
      background: rgba(217,201,168,0.12);
      padding: 0.35em 1.1em;
      border-radius: 100px;
      margin-bottom: 1.75rem;
      animation: fadeUp 0.9s 0.1s ease both;
    }

    .hero-headline {
      font-family: 'Playfair Display', serif;
      font-weight: 700;
      font-size: clamp(2.6rem, 6vw, 4.8rem);
      color: var(--white);
      line-height: 1.08;
      letter-spacing: -0.02em;
      margin-bottom: 1.25rem;
      animation: fadeUp 0.9s 0.15s ease both;
    }

    .hero-headline em {
      font-style: italic;
      color: var(--sand);
    }

    .hero-sub {
      font-size: 1.05rem;
      font-weight: 300;
      color: rgba(245,240,232,0.82);
      line-height: 1.75;
      max-width: 480px;
      margin: 0 auto 2.75rem;
      animation: fadeUp 0.9s 0.22s ease both;
    }

    /* ── CTA Card ──────────────────────────────────────────────────── */
    .card-row {
      display: flex;
      justify-content: center;
      gap: 1.5rem;
      list-style: none;
      padding: 0;
      margin: 0;
      flex-wrap: wrap;
      animation: fadeUp 0.9s 0.3s ease both;
    }

    .calc-card {
      background: var(--white);
      border-radius: 16px;
      width: 240px;
      overflow: hidden;
      box-shadow: var(--shadow-lg);
      transition: transform 0.25s ease, box-shadow 0.25s ease;
    }

    .calc-card:hover {
      transform: translateY(-6px);
      box-shadow: 0 32px 72px rgba(28,28,22,0.28);
    }

    .calc-card a,
    .calc-card a:link,
    .calc-card a:visited {
      text-decoration: none;
      color: inherit;
      display: block;
    }

    .calc-card-top {
      background: linear-gradient(135deg, var(--forest), var(--moss));
      padding: 1.75rem 1rem 1.5rem;
      text-align: center;
    }

    .calc-card .calculator-icon img {
      width: 52px;
      height: 52px;
      margin-bottom: 0;
      filter: brightness(0) invert(1);
      opacity: 0.92;
    }

    .calc-card-bottom {
      padding: 1.1rem 1.25rem 1.4rem;
      text-align: center;
    }

    .calc-card .calculator-title {
      font-family: 'Playfair Display', serif;
      font-size: 1rem;
      font-weight: 700;
      color: var(--forest);
      display: block;
      margin-bottom: 0.35rem;
      line-height: 1.25;
    }

    .calc-card .calculator-desc {
      font-size: 0.78rem;
      font-weight: 400;
      color: #6a7a6e;
      line-height: 1.5;
    }

    .calc-card-cta {
      display: block;
      margin: 0.85rem auto 0;
      padding: 0.55rem 1.4rem;
      background: var(--forest);
      color: var(--white) !important;
      border-radius: 100px;
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      width: fit-content;
      transition: background 0.2s;
    }

    .calc-card:hover .calc-card-cta {
      background: var(--moss);
    }

    /* ════════════════════════════════════════════════════════════════
       ABOUT
    ════════════════════════════════════════════════════════════════ */
    .home-about {
      max-width: 820px;
      margin: 5rem auto 4rem;
      padding: 0 2rem;
    }

    .about-inner {
      display: grid;
      grid-template-columns: 3px 1fr;
      gap: 0 2.5rem;
      align-items: start;
    }

    .about-rule {
      background: linear-gradient(to bottom, var(--gold), transparent);
      border-radius: 2px;
      align-self: stretch;
    }

    .about-text-wrap {}

    .about-label {
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--gold);
      margin-bottom: 1rem;
      display: block;
    }

    .about-lead {
      font-family: 'Playfair Display', serif;
      font-size: clamp(1.3rem, 2.5vw, 1.65rem);
      font-weight: 400;
      line-height: 1.55;
      color: var(--forest);
      margin-bottom: 1.25rem;
    }

    .about-body {
      font-size: 0.97rem;
      font-weight: 300;
      line-height: 1.85;
      color: #3a3a30;
    }

    /* ════════════════════════════════════════════════════════════════
       PROJECT CARDS
    ════════════════════════════════════════════════════════════════ */
    .home-carousel {
      padding: 4rem 2rem 5rem;
      background: var(--warm);
      border-top: 1.5px solid var(--sand);
      border-bottom: 1.5px solid var(--sand);
    }

    .section-header {
      text-align: center;
      margin-bottom: 3rem;
    }

    .section-label {
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--gold);
      display: block;
      margin-bottom: 0.65rem;
    }

    .section-title {
      font-family: 'Playfair Display', serif;
      font-size: clamp(1.5rem, 3vw, 2.1rem);
      font-weight: 700;
      color: var(--forest);
      line-height: 1.2;
    }

    .project-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
      gap: 1.5rem;
      max-width: 1100px;
      margin: 0 auto;
    }

    .project-card {
      text-decoration: none;
      color: inherit;
      border-radius: 12px;
      overflow: hidden;
      background: var(--white);
      box-shadow: var(--shadow-md);
      display: flex;
      flex-direction: column;
      transition: transform 0.22s ease, box-shadow 0.22s ease;
    }

    .project-card:hover {
      transform: translateY(-5px);
      box-shadow: var(--shadow-lg);
    }

    .project-card img {
      width: 100%;
      height: 170px;
      object-fit: cover;
      transition: transform 6s ease;
    }

    .project-card:hover img { transform: scale(1.04); }

    .project-card-caption {
      padding: 1rem 1.1rem 1.25rem;
      font-size: 0.88rem;
      font-weight: 500;
      line-height: 1.45;
      color: var(--forest);
      border-top: 3px solid var(--moss);
    }

    /* ════════════════════════════════════════════════════════════════
       VIDEO
    ════════════════════════════════════════════════════════════════ */
    .home-media {
      max-width: 860px;
      margin: 5rem auto 0;
      padding: 0 2rem;
    }

    .home-media .section-header { margin-bottom: 2rem; }

    .video-frame {
      border-radius: 16px;
      overflow: hidden;
      box-shadow: var(--shadow-lg);
      line-height: 0;
    }

    .home-media iframe {
      width: 100%;
      min-height: 380px;
      border: none;
      display: block;
    }

    /* ════════════════════════════════════════════════════════════════
       NEWSLETTER
    ════════════════════════════════════════════════════════════════ */
    .home-newsletter {
      text-align: center;
      margin: 5rem auto 4rem;
      padding: 3.5rem 2rem;
      max-width: 560px;
      border: 1.5px solid var(--sand);
      border-radius: 16px;
      background: var(--white);
      box-shadow: var(--shadow-md);
    }

    .newsletter-label {
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--gold);
      display: block;
      margin-bottom: 0.75rem;
    }

    .home-newsletter h3 {
      font-family: 'Playfair Display', serif;
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--forest);
      line-height: 1.3;
      margin-bottom: 0.5rem;
    }

    .home-newsletter h3 + h3 {
      font-style: italic;
      font-weight: 400;
      font-size: 1.25rem;
      color: var(--moss);
      margin-bottom: 1.75rem;
    }

    .newsletter-btn {
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.85rem 2.25rem;
      border-radius: 100px;
      background: var(--forest);
      color: var(--white) !important;
      text-decoration: none !important;
      font-size: 0.82rem;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      box-shadow: 0 6px 20px rgba(26,60,34,0.28);
      transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    }

    .newsletter-btn:hover {
      background: var(--moss);
      transform: translateY(-2px);
      box-shadow: 0 10px 28px rgba(26,60,34,0.35);
    }

    /* ════════════════════════════════════════════════════════════════
       FOOTER
    ════════════════════════════════════════════════════════════════ */
    #pageFooter {
      border-top: 1.5px solid var(--sand);
      text-align: center;
      padding: 2.5rem 1rem 3rem;
      background: var(--warm);
    }

    #footerText {
      font-size: 0.68rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.2em;
      color: var(--sage);
      margin-bottom: 0.85rem;
    }

    #niccLogo {
      max-width: 150px;
      margin: 0.25rem 0 1.25rem;
      opacity: 0.85;
      transition: opacity 0.2s;
    }

    #niccLogo:hover { opacity: 1; }

    #sdashCredit {
      font-size: 0.78rem;
      font-weight: 300;
      color: #7a7a6e;
      margin: 0.25em 0;
    }

    #sdashCredit a:link, #sdashCredit a:visited { color: var(--moss); }

    /* ── Responsive ───────────────────────────────────────────────── */
    @media (max-width: 900px) {
      .calc-card { width: 88%; max-width: 300px; }
    }

    @media (max-width: 600px) {
      .site-header { min-height: 150px; }
      .home-hero { min-height: 500px; }
      .hero-headline { font-size: 2.3rem; }
      .about-inner { grid-template-columns: 1fr; }
      .about-rule { display: none; }
      .home-newsletter { margin: 3rem 1.5rem; }
    }
