/* ===== VARIABLES ===== */
:root {
    --color-background: #fff7e9;
    --color-primary: #ffb400;
    --color-text: #000000;
    --color-card-shadow: rgba(0,0,0,0.1);
  
    --font-sans-serif: 'neue-haas-grotesk-display', sans-serif;
    --font-serif-display: 'freight-display-pro', serif;
    --font-serif-text: 'freight-text-pro', serif;
  
    --spacing-xl: 4rem;
    --spacing-lg: 3rem;
    --spacing-md: 1.5rem;
    --spacing-sm: 0.75rem;
    --spacing-xs: 0.5rem;
  }
  
  /* ===== BASE RESET ===== */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
  }
  
  html {
    font-size: 100%; /* Base for rem units (typically 16px) */
  }
  
  body {
    font-family: var(--font-sans-serif);
    background-color: var(--color-background);
    line-height: 1.6;
    color: var(--color-text);
  }
  
  img {
    max-width: 100%;
    display: block;
  }
  
  a {
    color: var(--color-text);
    text-decoration: none;
  }
  
  li {
    list-style-type: none;
  }
  
  /* ===== LAYOUT ===== */
  #wrapper {
    width: 100%;
    max-width: 1920px;
  }  
  
  .nav {
    padding: var(--spacing-lg);
    position: fixed;
    z-index: 100;
    width: 100%;
    top: 0;
    left: 0;
  }
  
  .nav ul {
    display: flex;
    justify-content: space-between;
  }
  
  .nav a {
    font-size: 1.25rem; /* Adjusted base size, was 1.4rem */
    font-family: var(--font-serif-display);
    font-weight: 700;
  }
  
  header {
    display: flex;
    flex-direction: column;
    padding: 0 var(--spacing-lg);
    /* Consider padding-top if fixed nav content needs explicit spacing, */
    /* though transparent nav makes this less critical */
  }
  
  main {
    /* Main content area */
  }
  
  footer {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  footer p {
      font-size: 1rem;
  }
  
  /* ===== TYPOGRAPHY & COMPONENTS ===== */
  .hero-title {
    font-family: var(--font-serif-text);
    font-weight: 300;
    font-style: italic;
    white-space: nowrap;
    /* MIN, PREFERRED, MAX */
    font-size: clamp(3.5rem, 15.5vw, 14rem); 
    line-height: 1.05; /* Adjusted for tighter large text */      
    color: var(--color-primary);
    margin-top: var(--spacing-xl);
    letter-spacing: -0.025em; /* Adjusted from -0.4rem for better scalability */
    text-align: justify;
  }
  
  .hero-title br {
    display: none;
  }
  .casespacing {
    margin-bottom: 2vh;
  }
  
  .section-title {
    font-family: var(--font-serif-text);
    font-weight: 300;
    font-style: italic;
    /* MIN, PREFERRED, MAX */
    font-size: clamp(3rem, 10vw, 8rem);
    line-height: 1.2;
    color: var(--color-primary);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    padding: 0 var(--spacing-lg);
  }
  
  .homepage {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-md);
  }
  
  .introtext {
    width: 45%;
    display: flex;
    flex-direction: column;
  }
  
  .introtext p {
    /* MIN, PREFERRED (e.g. 1rem base + 1vw scaling), MAX */
    font-size: clamp(1rem, calc(0.9rem + 1vw), 1.75rem); 
    font-family: var(--font-sans-serif);
    font-weight: 400;
    letter-spacing: 0.5px; /* Was 1px, slightly reduced */
  }
  .casetext {
    width: 100%;
  }
  
  .highlight-company {
    font-family: var(--font-serif-text);
    font-style: italic;
    font-weight: bold;
    letter-spacing: -0.015em;
  }
  
  .introimg {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    width: 45%;
  }
   /* ARROW ÄR KRÅNGLIGT */
  .arrow {
    max-height: 10vw; /* Scales with viewport width */
    min-height: 40px; /* Prevent it from becoming too small */
    margin-bottom: var(--spacing-md);
  }
    @media (min-width: 600px) and (max-width: 800px) {
      .arrow {
              position: relative;
              right: 15%;
      }

  }   
      @media (min-width: 1650px){
      .arrow {
              position: relative;
              right: 5%;
      }

  }  
  
  /* ----- Cases Section ----- */
  .cases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: start; 
    grid-auto-rows: minmax(200px, auto); 
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    max-width: 100vw;
  }
  
  .case-card {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease;
  }
  
  .case-card:hover {
    transform: scale(1.01);
  }
  
  .case-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
  }
  
  .case-card-title {
    margin-top: var(--spacing-sm);
    font-size: 1.8rem; /* Was 1.4rem */
    font-family: var(--font-serif-text);
    font-weight: 600;
    font-style: italic;
  }
  
  /* ----- About Me & Contact Sections ----- */
  .twocolumngrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
  }
  .aboutme-section .aboutmetext {
    width: 100%;
    align-items: flex-start;
  }
  .about-me-image {
    width: 100%;
    object-fit: cover;
  }
  
  .contacttext {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem); /* Was 2rem, now responsive */
    font-family: var(--font-serif-text);
    font-weight: 300;
    font-style: italic;
    margin-bottom: var(--spacing-sm);
  }
  
  .footer-copyright {
    margin-top: var(--spacing-md);
    font-size: 0.875rem;
    font-family: var(--font-serif-text);
    font-weight: 300;
    font-style: italic;
  }
  
  /* ===== CASE SITE SPECIFIC (for case.html) ===== */
  .casewrapper {
    width: 100%;
    padding: var(--spacing-lg);
  }
  .big-img, .small-img { /* Combined for brevity if styles are identical */
    width: 100%;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
  }
  .big-img { margin-bottom: var(--spacing-lg); }
  
  
  /* ===== MEDIA QUERIES ===== */
  @media (max-width: 1000px) { /* Large tablets / Small laptops */
    .nav {
      padding: var(--spacing-md);
    }
    .nav a {
      font-size: 1.15rem; /* Slightly smaller nav links */
    }
    header {
      padding: 0 var(--spacing-md);
    }
    /* .hero-title font-size is handled by clamp() */
    /* .section-title font-size is handled by clamp() */
    /* .introtext p font-size is handled by clamp() */
  
    .section-title {
       padding: 0 var(--spacing-md); /* Adjust padding for section titles */
    }
    
    .cases-grid,
    .twocolumngrid,
    .casewrapper {
      padding: var(--spacing-md);
      gap: var(--spacing-md);
    }
  
    .arrow {
      max-height: 12vw; /* Adjust arrow scaling */
    }
  }    
  
  @media (max-width: 800px) { /* Tablets */
    .homepage {
      flex-direction: column;
      align-items: center;
      gap: var(--spacing-md);
    }
    .introtext,
    .introimg {
      width: 100%;
    }
    /* .introtext p font-size is handled by clamp() */
  
    .arrow {
      max-height: 15vw; /* Further arrow scaling */
    }
  }
  
  @media (max-width: 768px) { /* Smaller Tablets / Large Phones */
    .cases-grid,
    .twocolumngrid {
      grid-template-columns: 1fr;
    }
    /* .section-title font-size handled by clamp() */
    .case-card-title {
      font-size: 1.6rem; /* Slightly larger for single column */
    }
  }    
  
  @media (max-width: 600px) { /* Mobile */
    /* Your specific navigation changes for mobile */
    .nav {
      /* position: fixed; is already the default for .nav */
      /* padding is var(--spacing-md) from 1000px MQ. */
      /* User wants to adjust padding-bottom */
      padding-bottom: var(--spacing-sm); 
    }
    .nav ul {
      flex-direction: column;
      align-items: flex-start; /* Corrected from 'start' */
      gap: var(--spacing-xs); /* Reduced gap for tighter mobile nav, was --spacing-sm */
    }
    .nav a {
      font-size: 1.1rem; /* Adjust nav link size for mobile */
    }
  
    .hero-title {
      /* font-size is handled by clamp(), but specific MQ overrides if needed */
      /* For example, if 18vw was desired and clamp isn't hitting it: */
      /* font-size: clamp(3rem, 18vw, 7rem); */ 
      /* The existing clamp(3.5rem, 15.5vw, 14rem) should cover this well. */
      /* The 15.5vw will result in larger perceived size on smaller screens due to less overall width */
      /* z-index: 101; /* Retained */
      letter-spacing: -0.02em; /* Slightly adjust spacing for mobile hero */
      text-align: right;
      margin-top: var(--spacing-lg); /* Give some space from the now fixed nav */
                                     /* Was var(--spacing-md), and originally 0rem */
    }
    .hero-title br {
      display: block;
    }

    /* .introtext p font-size is handled by clamp() */
    /* .section-title font-size is handled by clamp() */
    .section-title {
      padding: 0 var(--spacing-md); /* Consistent padding for titles */
      margin-top: var(--spacing-lg);
      margin-bottom: var(--spacing-md);
    }
  
    .cases-grid,
    .twocolumngrid {
      padding: var(--spacing-md);
      gap: var(--spacing-md);
    }
    .arrow {
      max-height: 20vw; /* As per original */
      min-height: 30px;
    }
    .footer p {
      font-size: 0.9rem;
    }
      .big-img, .small-img { /* Combined for brevity if styles are identical */
        position: relative;
        top: var(--spacing-lg);
  }
  }