/* =========================================================
   CLAIRE LORTS — PORTFOLIO STYLES
   ========================================================= */

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

:root {
  /* Colors — replicated from the visual design */
  --page-bg: #3A3635;        /* dark page outer background */
  --header-cream: #f6f3e8;   /* warm cream or gray on header */
  --dark-band: #3A3635;      /* dark angled band + footer */
  --content-bg: #FFFFFF;     /* main content card bg */
  --red: #8B1A1A;            /* logo accent + buttons */
  --red-hover: #701414;
  --text-dark: #2C2C2C;
  --text-muted: #5b5b5b;
  --frame-border: #3A3635;   /* 1px frame around image cells */

  /* Spacing */
  --gutter-desktop: 40px;
  --gutter-mobile: 20px;
  --gutter: var(--gutter-desktop);

  /* Header heights — change drives the shrink animation */
  --header-h-large: 200px;
  --header-h-small: 92px;

  /* Type */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Lato', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--page-bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
    max-width: 1512px;
  margin: 0 auto;
}

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

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

/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--dark-band);  /* dark shows through below the cream wedge */
  height: var(--header-h-large);
  transition: height 0.35s ease;
}

/* Once page is scrolled, header shrinks */
.site-header.shrunk {
  height: var(--header-h-small);
}

.header-inner {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Cream layer with the diagonal cut.
   Polygon: top-left, top-right, drops along right side, then
   slopes down-left to bottom-left — leaving a triangle of dark
   exposed in the bottom-right corner. */
.header-cream {
  position: absolute;
  inset: 0;
  background: var(--header-cream);
  clip-path: polygon(0 0, 100% 0, 100% 50%, 0 90%);
}

/* Logo — center of header, vertically centered, sits across the diagonal */

.logo {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 3;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.logo img {
  display: block;
  height: 100px;          /* large header state. upload logo as svg at 140px ht or more */
  width: auto;
  transition: height 0.25s ease;
}
.site-header.shrunk .logo img {
  height: 50px;          /* shrunk state */
}


.logo:hover {
  transform: translate(-50%, -50%) translateY(-6px);
}

/* Desktop nav — sits in the dark wedge bottom-right */
.nav-desktop {
  position: absolute;
  right: 40px;
  bottom: 18px;
  display: flex;
  gap: 35px;
  z-index: 3;
   transition: bottom 0.25s ease;
}

.nav-desktop a {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #ffffff;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 10px;   
  transition: opacity 0.2s ease, font-size 0.25s ease;
}

.site-header.shrunk .nav-desktop {
  bottom: 1px;
}
.site-header.shrunk .nav-desktop a {
  font-size: 16px;
}

.nav-desktop a:hover {
  opacity: 0.75;
}

.nav-desktop a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: #ffffff;
}

/* Hamburger — hidden on desktop */
.hamburger {
  display: none;
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  width: 36px;
  height: 30px;
  cursor: pointer;
  z-index: 5;
  padding: 0;
}

.hamburger .bar {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2.5px;
  background: #1a1a1a;
  border-radius: 2px;
  transition: transform 0.35s ease, opacity 0.25s ease, top 0.35s ease;
}

.hamburger .bar-1 { top: 6px; }
.hamburger .bar-2 { top: 14px; }
.hamburger .bar-3 { top: 22px; }

/* X state */
.hamburger.is-open .bar-1 {
  top: 14px;
  transform: rotate(45deg);
}
.hamburger.is-open .bar-2 {
  opacity: 0;
}
.hamburger.is-open .bar-3 {
  top: 14px;
  transform: rotate(-45deg);
}

/* Mobile dropdown nav — hidden by default */
.nav-mobile {
  display: none;
  background: var(--dark-band);
  flex-direction: column;
  padding: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.nav-mobile a {
  display: block;
  padding: 22px 24px;
  font-family: var(--font-display);
  font-size: 26px;
  color: #ffffff;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-mobile a:last-child {
  border-bottom: 0;
}

.nav-mobile a:hover {
  background: rgba(255, 255, 255, 0.04);
}

.nav-mobile.is-open {
  display: flex;
}

/* =========================================================
   MAIN PAGE LAYOUT
   ========================================================= */

.page {
  background: var(--content-bg);
  margin: 0;
  padding: var(--gutter);
  min-height: 50vh;
}

.vis-hid {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   HOMEPAGE GRID
   ========================================================= */

.grid-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--gutter);
}

.grid-row {
  display: grid;
  gap: var(--gutter);
  align-items: start;
}
/* Cells keep per-cell aspect ratio; row no longer stretches them to match */


/* =========================================================
   HOMEPAGE — each row independently editable
   At 1512px design width: content = 1432px, gap = 40px
   ========================================================= */

/* Desktop ratios */
.row-1 { grid-template-columns: 3.35fr 1fr; }     /* rocks   | joker        */
.row-2 { grid-template-columns: 1fr 2.21fr; }     /* tshirt  | bottles      */
.row-3 { grid-template-columns: 3fr 1.51fr; }     /* cake    | collage      */
.row-4 { grid-template-columns: 1fr 1.295fr; }     /* lifecycle | typography */
.row-5 { grid-template-columns: 1.86fr 1fr; }     /* moldova | whiskey      */
.row-6 { grid-template-columns: 1fr 1.16fr 1.16fr; }    /* mixing  | two websites    */
.row-7 { grid-template-columns: 1fr 1fr; }     /* aurora  | newspaper    */


/* Image cell — placeholder gray box with a 1px black frame.
   Uses min-height (not aspect-ratio) so cells in the same grid row
   stretch to share a consistent row height regardless of column width. */
.cell {
  display: block;
  background: #d6d6d6;
  border: 1px solid var(--frame-border);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}


/* Hide gray placeholder + diagonal stripes once a real image is dropped in */
.cell:has(img),
.about-photo:has(img),
.project-cell:has(img) {
  background: transparent;
}

.cell:has(img)::after,
.about-photo:has(img)::after,
.project-cell:has(img)::after {
  display: none;
}

.cell img,
.about-photo img,
.project-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Subtle "image placeholder" texture so the boxes don't read as broken */
.cell::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.025) 0,
      rgba(0, 0, 0, 0.025) 10px,
      transparent 10px,
      transparent 20px
    );
  pointer-events: none;
}

/* Hover overlay — darkens image and shows project title */
.cell-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.75);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

/* Only fade in on devices that can actually hover */
@media (hover: hover) and (pointer: fine) {
  .cell:hover .cell-title {
    opacity: 1;
  }
}

/* Desktop hover rise */
@media (hover: hover) and (pointer: fine) {
  .cell:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 22px rgba(0, 0, 0, 0.18);
  }
}

/* =========================================================
   CHILD PAGES — common
   ========================================================= */

.child-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px 50px;
}

.child-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  text-align: center;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.child-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.child-body {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
  font-size: 15px;
  color: var(--text-dark);
}

/* Red button (used on About + Project pages) */
.btn-red {
  display: inline-block;
  background: var(--red);
  color: #ffffff;
  padding: 12px 28px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: bold;
  letter-spacing: 0.02em;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  border: 0;
}

.btn-red:hover {
  background: var(--red-hover);
  transform: translateY(-2px);
}

.cta-row {
  text-align: center;
  margin-top: 32px;
}

/* =========================================================
   ABOUT PAGE
   ========================================================= */

.about-content {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  max-width: 850px;
  margin: 0 auto;
  align-items: start;  /* keep text at top when row-spanning */
}

.about-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #d6d6d6;
  position: relative;
}

.about-photo img {
  width: 100%;
 height: auto;
}

.about-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.04) 0,
      rgba(0, 0, 0, 0.04) 8px,
      transparent 8px,
      transparent 16px
    );
}

.about-text p {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.about-text a {
  text-decoration: underline;
}

/* =========================================================
   PROJECT PAGE GRID
   ========================================================= */

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gutter);
  margin-top: 20px;
}

.project-cell {
  background: #83e0f3;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

}

.project-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(0, 0, 0, 0.025) 0,
      rgba(0, 0, 0, 0.025) 10px,
      transparent 10px,
      transparent 20px
    );
  pointer-events: none;
}

/* The bottles cell — wider (spans 2 cols) and matches stack height */
.project-cell-large {
  grid-column: span 2;
  aspect-ratio: auto;       /* override */
  min-height: 100%;         /* fill row height set by stack */
}

/* The right-side stack: image + button */
.project-cell-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-cell-stack .project-cell {
  flex: 1 1 auto;
  aspect-ratio: auto;
  min-height: 360px;
}

.btn-red-cell {
  text-align: center;
  align-self: stretch;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  background: var(--dark-band);
  color: #d8d4cf;
  text-align: center;
  padding: 26px 20px 30px;
  font-size: 13px;
  line-height: 1.7;
  margin: 0 var(--gutter) var(--gutter);
}

.site-footer p {
  margin: 0;
}


/* Stack everything below the design width -----------------------------------------*/

@media (max-width: 1000px) {

  .project-cell-large,
  .project-cell-stack {
    grid-column: span 1;
  }
  .project-cell-large { aspect-ratio: auto; }
  .project-cell-stack { flex-direction: column; }

  .grid-row {
    grid-template-columns: 1fr !important;
    justify-items: center;
  }
  .grid-row .cell {
    width: 100%;
  }

  /* Per-cell max-widths derived from each row's desktop ratio */
 .row-1 .cell:nth-child(1)       { max-width: 696px; }
.row-1 .cell:nth-child(2)       { max-width: 220px; }

  .row-2 .cell:nth-child(1)       { max-width: 464px; }
  .row-2 .cell:nth-child(2)       { max-width: 928px; }

  .row-3 .cell:nth-child(1)       { max-width: 835px; }
  .row-3 .cell:nth-child(2)       { max-width: 557px; }

  .row-4 .cell                    { max-width: 696px; }

  .row-5 .cell:nth-child(1)       { max-width: 928px; }
  .row-5 .cell:nth-child(2)       { max-width: 464px; }

  .row-7 .cell                    { max-width: 696px; }
.row-6 .cell:nth-child(1)       { max-width: 600px; }
  .row-6 .cell:nth-child(2)       { max-width: 600px; }
  .row-6 .cell:nth-child(3) { max-width: 600px; }
    
    .logo-name { font-size: 30px; }
  .site-header.shrunk .logo-name { font-size: 24px; }
  .logo-tag { font-size: 12px; }
  .nav-desktop { right: 28px; }
  .nav-desktop a { font-size: 18px; }

  .project-grid {
    grid-template-columns: 1fr !important;
    grid-template-areas: none !important;
    justify-items: center;
  }

  /* Each cell carries `grid-area: <name>` from its desktop
     layout. Once grid-template-areas is wiped, those named
     areas no longer exist — reset to auto so every child
     flows vertically in source order. */
  .project-grid > * {
    grid-area: auto !important;
    width: 100%;
    max-width: 700px;
  }

   /* Buttons size to their content, not the column */
  .project-grid > .btn-red {
    width: auto;
    max-width: none;
  }
  
  .logo img { height: 80px; }

}



/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 720px) {
  :root {
    --gutter: var(--gutter-mobile);
    --header-h-large: 110px;
    --header-h-small: 78px;
  }

  /* Show hamburger, hide desktop nav */
  .nav-desktop {
    display: none;
  }

  
  .logo img { height: 50px; }
  .site-header.shrunk .logo img { height: 40px; }


  .hamburger {
    display: block;
    top: auto;
    bottom: 8px;
    transform: none;
    right: 20px;
    transition: bottom 0.35s ease, width 0.35s ease, height 0.35s ease;
  }

  .hamburger .bar {
    background: #ffffff;
  }

  .site-header.shrunk .hamburger {
    bottom: 8px;
    width: 36px;
    height: 24px;
  }

  /* Logo shrinks for mobile */
  .logo {
    gap: 8px;
  }

  .logo-mark {
    width: 44px;
    height: 44px;
  }

  .site-header.shrunk .logo-mark {
    width: 36px;
    height: 36px;
  }

  .logo-name {
    font-size: 22px;
  }

  .site-header.shrunk .logo-name {
    font-size: 18px;
  }

  .logo-tag {
    font-size: 9px;
    letter-spacing: 0.25em;
    padding: 2px 6px;
  }

  .site-header.shrunk .logo-tag {
    font-size: 8px;
    padding: 1px 4px;
  }

  /* Adjust the cream wedge for the smaller header — give logo more cream space */
  .header-cream {
    clip-path: polygon(0 0, 100% 0, 100% 55%, 0 100%);
  }

  .project-cell-stack {
    flex-direction: column;
  }

  .project-cell-stack .project-cell {
    aspect-ratio: 4 / 3;
    min-height: 0;
  }

  .btn-red-cell {
    min-height: 0;
    padding: 14px 24px;
  }

  /* About page — stack photo above text, text stays at top */
  .about-content {
    grid-template-columns: 1fr;
    gap: 22px;
    max-width: 480px;
  }

  .about-photo {
    max-width: 230px;
    margin: 0 auto;
  }

 
  .child-title {
    font-size: 24px;
  }
}

/* Very small screens */
@media (max-width: 380px) {
  .logo-name { font-size: 18px; }
  .site-header.shrunk .logo-name { font-size: 15px; }
  .logo-tag { font-size: 8px; letter-spacing: 0.2em; }
  .logo-mark { width: 36px; height: 36px; }
  .site-header.shrunk .logo-mark { width: 30px; height: 30px; }
}

/* Disable hover-rise on touch devices */
@media (hover: none) {
  .cell:hover {
    transform: none;
    box-shadow: none;
  }
   .cell-title {
    display: none;
  }
}
