/*
 * ============================================================
 *  Hannah Graham Portfolio — Main Stylesheet
 *  File: style.css
 *  Linked from: index.html, about.html, contact.html,
 *               and all project case study pages.
 *
 *  Contents:
 *    1.  Design Tokens       — colours, fonts, spacing
 *    2.  Global Reset        — base styles, links, images
 *    2b. Text Selection      — pink highlight
 *    3.  Custom Cursor       — daisy + pill
 *    4.  Layout: Hero        — full-screen intro
 *    5.  Components: Hero    — label, headline, buttons
 *    6.  Layout: Navigation  — sticky nav bar
 *    7.  Layout: Work Intro  — hello section
 *    8.  Components: Project grid & cards
 *    9.  Layout: Footer
 *   10.  Animation           — scroll reveal, keyframes
 *   11.  Media Queries       — mobile (max 700px)
 * ============================================================
 */


    /* =====================================================
       1. DESIGN TOKENS — colours, fonts, spacing
       ===================================================== */

    :root {
      /* Primary palette */
      --green:        #A2B445;
      --green-light:  #BBC48F;
      --green-dark:   #667326;

      /* Secondary palette */
      --pink-light:   #FD8EBD;
      --pink:         #FF007F;

      /* Tertiary palette */
      --tan:          #E6C374;
      --yellow:       #FDAF04;

      /* Neutrals */
      --cream:        #FAF4ED;
      --sand:         #E0D9CF;
      --sage:         #969B7D;
      --dark:         #2C2C2C;

      /* Typography */
      --serif:        'Source Serif 4', Georgia, serif;
      --sans:         'Space Grotesk', sans-serif;

      /* Spacing scale */
      --space-xs:     0.5rem;
      --space-sm:     1rem;
      --space-md:     2.5rem;
      --space-lg:     4rem;

      /* Layout */
      --max-width:    1200px;
    }


    /* =====================================================
       2. GLOBAL RESET & BASE STYLES
       ===================================================== */

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

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: var(--sans);
      background-color: var(--cream);
      color: var(--dark);
      cursor: none;          /* custom cursor replaces default */
      overflow-x: hidden;
    }

    a {
      text-decoration: none;
      color: inherit;
    }

    img {
      display: block;
      width: 100%;
    }


    /* =====================================================
       3. CUSTOM CURSOR
       ===================================================== */

    /* --- Daisy cursor — petals + permanent white centre ---
       White centre is baked into the SVG; no separate dot element.
    --- */
    #cursor-daisy {
      position: fixed;
      top: 0;
      left: 0;
      width: 30px;
      height: 30px;
      pointer-events: none;
      z-index: 9999;
      transform: translate(-50%, -50%);
      transition: width 0.1s ease, height 0.1s ease;
    }

    #cursor-daisy svg {
      width: 100%;
      height: 100%;
      overflow: visible;
      /* CSS transition for hover snap; velocity twirl set via JS */
      transition: transform 0.25s ease;
    }

    /* Hover: rotate petals 40deg */
    body.is-hovering #cursor-daisy svg {
      transform: rotate(40deg);
    }

    /* Press: shrink the whole daisy by 10% */
    body.is-pressing #cursor-daisy {
      width: 27px;
      height: 27px;
    }

    /* --- "Read more" pill (appears on project card hover) --- */
    #cursor-pill {
      position: fixed;
      top: 0;
      left: 0;
      pointer-events: none;
      z-index: 9997;
      transform: translate(-50%, 18px);
      background: var(--dark);
      color: var(--cream);
      font-family: var(--sans);
      font-weight: 700;
      font-size: 0.62rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      padding: 0.35rem 0.9rem;
      border-radius: 999px;
      white-space: nowrap;
      opacity: 0;
      transition: opacity 0.18s ease;
    }

    /* Show pill when hovering a project card */
    body.is-on-project #cursor-pill {
      opacity: 1;
    }

    /* =====================================================
       2b. TEXT SELECTION — light pink highlight, pink text
       ===================================================== */

    ::selection {
      background-color: var(--pink-light);
      color: var(--pink);
    }


    /* =====================================================
       4. LAYOUT — Hero
       ===================================================== */

    .hero {
      min-height: 100svh;
      background-color: #1e1d1a;
      /* subtle grid texture */
      background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
      background-size: 40px 40px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: var(--space-lg) var(--space-sm);
      position: relative;
      overflow: hidden;
    }

    /* Soft radial glow overlay */
    .hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(
        ellipse 70% 55% at 50% 50%,
        rgba(162, 180, 69, 0.13) 0%,
        rgba(255, 0, 127, 0.06) 50%,
        transparent 80%
      );
      pointer-events: none;
    }


    /* =====================================================
       5. COMPONENTS — Hero: label, headline, buttons
       ===================================================== */

    /* --- Eyebrow label --- */
    .hero__label {
      font-family: var(--sans);
      font-weight: 400;
      font-size: 0.72rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--sand);
      margin-bottom: 2.2rem;
      opacity: 0;
      animation: fadeUp 0.7s 0.2s forwards;
    }

    /* --- Main headline with conic gradient --- */
    .hero__headline {
      font-family: var(--serif);
      font-weight: 700;
      font-size: clamp(3.2rem, 9vw, 6.5rem);
      line-height: 1.0;
      letter-spacing: -0.1em;
      max-width: 30ch;
      margin-bottom: 3rem;
      /* Soft radial conic sweep across all text */
      background: conic-gradient(
        from 200deg at 55% 60%,
        #e8a0b8   0deg,
        #FD8EBD  40deg,
        #BBC48F  90deg,
        #E6C374 140deg,
        #FDAF04 180deg,
        #f0c88a 220deg,
        #FD8EBD 280deg,
        #e8a0b8 360deg
      );
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      filter: saturate(0.75) brightness(1.1);
      opacity: 0;
      animation: fadeUp 0.7s 0.4s forwards;
    }

    /* Forces "is decoration" onto its own line */
    .hero__headline .line2 {
      display: block;
    }

    /* --- Button group --- */
    .hero__buttons {
      display: flex;
      gap: var(--space-sm);
      flex-wrap: wrap;
      justify-content: center;
      opacity: 0;
      animation: fadeUp 0.7s 0.9s forwards;
    }

    /* --- Button base --- */
    .btn {
      font-family: var(--sans);
      font-weight: 700;
      font-size: 0.72rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      padding: 0.75rem 1.8rem;
      border: 1px solid;
      border-radius: 6px;
      display: inline-block;
      cursor: none;
      user-select: none;
      transition:
        background  0.18s ease,
        color        0.18s ease,
        box-shadow   0.18s ease,
        outline      0.18s ease,
        transform    0.10s ease;
    }

    /* Active (default) states */
    .btn--green  { border-color: rgba(162, 180,  69, 0.75); color: var(--green);      background: transparent; }
    .btn--pink   { border-color: rgba(255,   0, 127, 0.75); color: var(--pink-light); background: transparent; }
    .btn--yellow { border-color: rgba(230, 195, 116, 0.75); color: var(--tan);        background: transparent; }

    /* Hover states — filled + offset shadow + black inner outline */
    .btn--green:hover {
      background: var(--green-light);
      color: var(--dark);
      border-color: var(--green-light);
      box-shadow: 5px 5px 0 0 var(--green);
      outline: 0.5px solid rgba(0, 0, 0, 0.35);
      outline-offset: -1px;
      transform: translate(-2px, -2px);
    }
    .btn--pink:hover {
      background: var(--pink-light);
      color: var(--dark);
      border-color: var(--pink-light);
      box-shadow: 5px 5px 0 0 var(--pink);
      outline: 0.5px solid rgba(0, 0, 0, 0.35);
      outline-offset: -1px;
      transform: translate(-2px, -2px);
    }
    .btn--yellow:hover {
      background: var(--tan);
      color: var(--dark);
      border-color: var(--tan);
      box-shadow: 5px 5px 0 0 var(--yellow);
      outline: 0.5px solid rgba(0, 0, 0, 0.35);
      outline-offset: -1px;
      transform: translate(-2px, -2px);
    }

    /* Pressed states — filled, no shadow, snaps back down */
    .btn--green:active  { background: var(--green-light); color: var(--dark); border-color: var(--green-light); box-shadow: none; outline: none; transform: translate(0, 0); }
    .btn--pink:active   { background: var(--pink-light);  color: var(--dark); border-color: var(--pink-light);  box-shadow: none; outline: none; transform: translate(0, 0); }
    .btn--yellow:active { background: var(--tan);         color: var(--dark); border-color: var(--tan);         box-shadow: none; outline: none; transform: translate(0, 0); }


    /* =====================================================
       6. LAYOUT — Navigation
       ===================================================== */

    .site-nav {
      position: sticky;
      top: 0;
      z-index: 100;
      background: var(--cream);
      border-bottom: 1px solid var(--sand);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 var(--space-md);
      height: 52px;
    }

    .site-nav__links {
      display: flex;
      gap: 2rem;
      list-style: none;
    }

    .site-nav__links a {
      font-family: var(--sans);
      font-weight: 500;
      font-size: 0.72rem;
      letter-spacing: -0.03em;
      text-transform: uppercase;
      color: var(--sage);
      padding-bottom: 2px;
      border-bottom: 2px solid transparent;
      transition: color 0.2s, border-color 0.2s;
    }

    .site-nav__links a:hover,
    .site-nav__links a.is-active {
      color: var(--dark);
      border-bottom-color: var(--pink);
    }

    .site-nav__brand {
      font-family: var(--sans);
      font-size: 0.72rem;
      letter-spacing: -0.03em;
      text-transform: uppercase;
      display: flex;
      gap: 0.4rem;
      align-items: baseline;
    }

    .site-nav__brand strong {
      font-weight: 700;
      color: var(--dark);
    }

    .site-nav__brand span {
      font-weight: 400;
      color: var(--green-dark);
    }


    /* =====================================================
       7. LAYOUT — Work section intro
       ===================================================== */

    .work-intro {
      max-width: var(--max-width);
      margin: 0 auto;
      padding: var(--space-lg) var(--space-md) var(--space-sm);
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: var(--space-sm);
    }

    .work-intro__heading {
      font-family: var(--sans);
      font-weight: 700;
      font-size: 40px;
      letter-spacing: -0.6px;
      line-height: 1.1;
    }

    .work-intro__summary {
      font-family: var(--serif);
      font-weight: 700;
      font-size: 28px;
      letter-spacing: -2px;
      line-height: 1.25;
      color: var(--green-dark);
      align-self: end;
    }


    /* =====================================================
       8. COMPONENTS — Project grid & cards
       ===================================================== */

    /* --- Top row: 2 columns --- */
    .project-grid--top {
      max-width: var(--max-width);
      margin: 0 auto;
      padding: 0 var(--space-md);
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.5rem;
    }

    /* --- Bottom row: 3 columns --- */
    .project-grid--bottom {
      max-width: var(--max-width);
      margin: 1.5rem auto var(--space-lg);
      padding: 0 var(--space-md);
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 1.5rem;
    }

    /* --- Individual card --- */
    .project-card {
      position: relative;
      overflow: hidden;
      border-radius: 4px;
    }

    /* Thumbnail wrapper */
    .project-card__thumb {
      aspect-ratio: 4 / 3;
      background: var(--sand);
      overflow: hidden;
      position: relative;
    }

    .project-card__thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      filter: saturate(0.9);
      transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

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

    /* Placeholder texture shown before real images are added */
    .project-card__placeholder {
      width: 100%;
      height: 100%;
      background:
        repeating-linear-gradient(
          -45deg,
          rgba(150, 155, 125, 0.15),
          rgba(150, 155, 125, 0.15) 1px,
          transparent 1px,
          transparent 12px
        ),
        #2C2C2C;
    }

    /* Metadata row below thumbnail */
    .project-card__meta {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      padding: 0.6rem 0 0;
    }

    .meta-icon {
      color: var(--pink);
      font-size: 1rem;
      flex-shrink: 0;
    }

    .meta-name {
      font-family: var(--sans);
      font-weight: 500;
      font-size: 0.78rem;
      color: var(--dark);
      flex: 1;
    }

    .meta-tags {
      font-family: var(--sans);
      font-size: 0.65rem;
      font-weight: 500;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--sage);
    }

    .meta-tags .sep {
      margin: 0 0.25rem;
      opacity: 0.5;
    }


    /* =====================================================
       9. LAYOUT — Footer
       ===================================================== */

    /* Logo placeholder — swap for <img> when ready */
    .logo-placeholder {
      width: 80px;
      height: 80px;
      background: var(--sand);
      border: 2px dashed var(--sage);
      border-radius: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--sage);
      font-family: var(--serif);
      font-weight: 700;
      font-size: 1.4rem;
      letter-spacing: -0.02em;
      user-select: none;
    }

    .site-footer {
      background: var(--cream);
      border-top: 1px solid var(--sand);
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: stretch;
    }

    .site-footer__logo {
      padding: var(--space-md);
      border-right: 1px solid var(--sand);
      display: flex;
      align-items: center;
    }

    .site-footer__logo svg {
      width: 64px;
      height: auto;
    }

    .site-footer__main {
      padding: var(--space-md) 3rem;
      border-right: 1px solid var(--sand);
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }

    .site-footer__name {
      font-family: var(--sans);
      font-size: 0.65rem;
      font-weight: 500;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--sage);
      margin-bottom: var(--space-xs);
    }

    .site-footer__cta {
      font-family: var(--serif);
      font-weight: 700;
      font-size: clamp(1.8rem, 3vw, 2.5rem);
      letter-spacing: -0.02em;
      color: var(--dark);
    }

    .site-footer__cta a {
      border-bottom: 3px solid var(--pink);
      transition: color 0.2s, border-color 0.2s;
    }

    .site-footer__cta a:hover {
      color: var(--pink);
      border-bottom-color: var(--green);
    }

    .site-footer__links {
      padding: var(--space-md);
      display: flex;
      flex-direction: column;
      justify-content: center;
      gap: 0.6rem;
    }

    .site-footer__links a {
      font-family: var(--sans);
      font-size: 0.65rem;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--sage);
      display: flex;
      align-items: center;
      gap: 0.3rem;
      transition: color 0.2s;
    }

    .site-footer__links a::after {
      content: '↗';
      font-size: 0.7em;
    }

    .site-footer__links a:hover {
      color: var(--dark);
    }

    .site-footer__copy {
      grid-column: 1 / -1;
      border-top: 1px solid var(--sand);
      padding: 0.75rem var(--space-md);
      font-size: 0.62rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--sage);
    }


    /* =====================================================
       10. ANIMATION — Scroll reveal + entrance keyframes
       ===================================================== */

    .reveal {
      opacity: 0;
      transform: translateY(28px);
      transition: opacity 0.65s ease, transform 0.65s ease;
    }

    .reveal.is-visible {
      opacity: 1;
      transform: none;
    }

    /* Stagger delays for sibling reveals */
    .reveal:nth-child(2) { transition-delay: 0.10s; }
    .reveal:nth-child(3) { transition-delay: 0.20s; }
    .reveal:nth-child(4) { transition-delay: 0.30s; }
    .reveal:nth-child(5) { transition-delay: 0.35s; }

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


    /* =====================================================
       11. MEDIA QUERIES — Mobile (max 700px)
       ===================================================== */

    @media (max-width: 700px) {
      .work-intro           { grid-template-columns: 1fr; }
      .project-grid--top    { grid-template-columns: 1fr; }
      .project-grid--bottom { grid-template-columns: 1fr 1fr; }
      .site-footer          { grid-template-columns: 1fr; }
      .site-footer__logo,
      .site-footer__main    { border-right: none; border-bottom: 1px solid var(--sand); }
    }

  