/* styles.css */

/* —————————————————————————————— */
/* 1 · Custom font                  */
/* —————————————————————————————— */
@font-face {
  font-family: 'Nova Rune';
  src: url('fonts/NovaRune.woff2') format('woff2'),
       url('fonts/NovaRune.ttf')  format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* —————————————————————————————— */
/* 2 · CSS Variables                */
/* —————————————————————————————— */
:root {
  --white:      #ffffff;
  --charcoal:   #0a0a0a;
  --accent:     #b48c57;
  --terracotta: #8c4e37;

  --font-imfell:    'IM Fell English','IM Fell English SC', serif;
  --font-cormorant: 'Cormorant Garamond', serif;
  --nav-bg:     rgba(0, 0, 0, 0.55);
  --nav-height-mobile: 70px;
}

/* —————————————————————————————— */
/* 3 · Reset & Globals             */
/* —————————————————————————————— */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}
html { scroll-behavior: smooth; }
body {
  height: 100%;
  font-family: 'Montserrat', sans-serif;
  background: url("texture1.jpg") center/cover fixed no-repeat;
  color: var(--white);
}

/* —————————————————————————————— */
/* 4 · Nav placeholder              */
/* —————————————————————————————— */
#nav-placeholder {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  z-index: 1000;
}

/* —————————————————————————————— */
/* 5 · Hero                         */
/* —————————————————————————————— */
.hero {
  position: relative;
  width: 100%; height: 100vh;
  background: url("h.jpg") center/cover no-repeat;
  background-position: 50% 30%;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center,
             transparent 60%, rgba(0,0,0,0.4) 100%);
  z-index: 2; pointer-events: none;
}
.hero-text {
  position: absolute;
  top: 44%; left: 10%;
  display: flex; flex-direction: column; gap: .5rem;
  font-family: 'Nova Rune', serif;
  color: var(--white);
  text-shadow:
    0 2px 6px rgba(0,0,0,0.7),
    0 4px 12px rgba(0,0,0,0.5);
  z-index: 3;
}
.hero-text .line-1 {
  font-size: clamp(2rem,5vw,3.5rem);
  font-weight: 300; font-style: italic;
  color: var(--accent); letter-spacing: .05em;
}
.hero-text .line-2 {
  font-size: clamp(4rem,10vw,8rem);
  font-weight: 400; letter-spacing: -0.02em;
  line-height: 1; max-width: 70vw;
}
.hero-text .scroll-cue {
  position: absolute;
  top: calc(100% + 2.5rem);
  left: 50%;
  transform: translateX(-55%) scaleX(1.5);
}

/* —————————————————————————————— */
/*   Global scroll arrow & bounce   */
/* —————————————————————————————— */
.scroll-cue {
  position: absolute;
  bottom: 8%; left: 50%;
  transform: translateX(-50%) scaleX(1.5);
  color: var(--accent);
  font-size: clamp(1.5rem,4vw,3rem);
  opacity: .9; z-index: 3;
  animation: bounce 2s infinite;
  cursor: pointer; text-decoration: none;
  transition: color .3s;
}
.scroll-cue:hover { color: var(--terracotta); }
@keyframes bounce {
  0%,100% { transform: translate(-50%,0) scaleX(1.5); }
  50%     { transform: translate(-50%,10px) scaleX(1.5); }
}

/* —————————————————————————————— */
/* 6 · Terracotta panels            */
/* —————————————————————————————— */
.terracotta {
  position: relative; overflow: hidden;
  padding-top: 20vh;
  background:
    radial-gradient(circle at 80% 20%,
      rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 50%),
    linear-gradient(to bottom,
      rgba(10,10,10,0.8) 0%,
      rgba(10,10,10,0.6) 30%,
      rgba(10,10,10,0.3) 50%,
      transparent 75%),
    radial-gradient(circle at 80% 20%,
      var(--charcoal) 30%, var(--charcoal) 100%);
}
.terracotta img {
  display: block;
  width: 75vw; height: 120vh;
  object-fit: cover; object-position: center 50%;
  margin-top: -0.5in; z-index: 1;
}
.terracotta-text {
  position: absolute;
  top: 20%; left: 60%;
  transform: translateX(-50%);
  width: 70%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  font-family: var(--font-cormorant);
  font-size: clamp(2rem,6vw,4rem);
  line-height: 1;
  gap: .2em;
  z-index: 2;
}
.terracotta-text > span:first-child {
  margin-top: .5rem;
}
.terracotta-button {
  position: absolute;
  top: 65%; left: 0;
  height: 8rem; width: clamp(200px,30vw,400px);
  display: flex; align-items: center; justify-content: center;
  background: #1b1a1a; color: var(--accent);
  padding: 0 2rem;
  font-family: 'Nova Rune', serif;
  font-size: clamp(1rem,3vw,1.5rem);
  text-decoration: none;
  border-radius: .5rem;
  border: 2px solid #b48c57;
  border-left: none;
  transition: background .3s;
  z-index: 3;
}
.terracotta-button:hover {
  background: #48280a; color: var(--white);
}
.contact-button {
  left: auto; right: 0;
  background: #0a0a0a;
  border: 2px solid #705737;
  border-right: none;
}
.terracotta-flip {
  background:
    radial-gradient(circle at 20% 20%,
      rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 50%),
    linear-gradient(to bottom,
      rgba(10,10,10,0.8) 0%,
      rgba(10,10,10,0.6) 30%,
      rgba(10,10,10,0.3) 50%,
      transparent 75%),
    radial-gradient(circle at 20% 20%,
      var(--charcoal) 30%, var(--charcoal) 100%);
}
.terracotta-flip img {
  margin-left: auto; object-position: 0%;
  mask-image:
    linear-gradient(to right,
      rgba(0,0,0,0) 0%, rgba(0,0,0,1) 15%),
    linear-gradient(to bottom,
      rgba(0,0,0,0) 0%, rgba(0,0,0,1) 20%);
  mask-mode: alpha; mask-composite: intersect;
  mask-repeat: no-repeat;
  -webkit-mask-image:
    linear-gradient(to right,
      rgba(0,0,0,0) 0%, rgba(0,0,0,1) 15%),
    linear-gradient(to bottom,
      rgba(0,0,0,0) 0%, rgba(0,0,0,1) 20%);
  -webkit-mask-composite: destination-in;
  -webkit-mask-repeat: no-repeat;
}
/* shrink panels by 1in */
.terracotta img,
.terracotta-flip img {
  width: calc(75vw - 2in);
  height: calc(120vh - 2in);
}
.terracotta-flip .terracotta-text {
  position: absolute; top: 30%;
  right: 60%; left: auto;
  transform: translateX(50%);
  align-items: flex-start;
  text-align: left;
  font-size: clamp(2rem,6vw,4rem);
  z-index: 2;
}

/* —————————————————————————————— */
/* 7 · Text gradients & reflection   */
/* —————————————————————————————— */
.gradient-fill {
  background: none;
  -webkit-background-clip: initial;
  color: var(--white);
}
.shadow-text {
  display: inline-block;
  background: linear-gradient(90deg,#fff 0%,#eee 40%,#999 60%,#333 100%);
  -webkit-background-clip: text;
  color: transparent;
  -webkit-box-reflect: below 0px
    linear-gradient(transparent, rgba(0,0,0,0.4) 80%);
}
@supports not (-webkit-box-reflect: below 0px linear-gradient(transparent, rgba(0,0,0,0.4) 80%)) {
  .shadow-text::after {
    content: attr(data-text);
    position: absolute; bottom: 0; left: 0;
    transform: scaleY(-1);
    background: inherit;
    -webkit-background-clip: text;
    color: transparent;
    opacity: .3;
    mask-image: linear-gradient(transparent, black);
    pointer-events: none;
  }
}

/* —————————————————————————————— */
/* 8 · Impression effect             */
/* —————————————————————————————— */
.impression {
  display: inline-block;
  font-family: var(--font-cormorant);
  text-shadow:
    -1px -1px 2px rgba(255,255,255,0.3),
     1px  1px 2px rgba(0,0,0,0.7);
}

/* —————————————————————————————— */
/* 9 · Terracotta arrows             */
/* —————————————————————————————— */
.scroll-cue-terra {
  margin-top: 2.5rem;
  margin-left: 10rem;
  color: var(--accent);
  font-size: clamp(1.5rem,4vw,3rem);
  animation: bounce 2s infinite;
  cursor: pointer;
  text-decoration: none;
  transition: color .3s;
  z-index: 3;
}
.scroll-cue-terra:hover { color: var(--terracotta); }

/* —————————————————————————————— */
/* 10 · Ending section               */
/* —————————————————————————————— */
.ending {
  position: relative;
  padding: 20vh 2rem;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("texture4.jpg") center/cover no-repeat;
  background-size: cover;
}
.ending-text {
  position: relative;
  text-align: center;
  font-family: var(--font-cormorant);
  color: var(--white);
  font-size: clamp(1.5rem,5vw,3rem);
  line-height: 1.3;
  max-width: 70vw;
  margin: 0 auto;
  z-index: 1;
}
.ending-text p { margin: .5em 0; }
.ending-sub {
  margin-top: .5em;
  font-family: var(--font-cormorant);
  font-weight: 400;
  font-size: clamp(1rem,3vw,1.5rem);
  color: var(--accent);
}
.ending-button {
  text-decoration: none;
  margin-top: 1rem;
  font-size: clamp(1rem,3vw,1.2rem);
  background: var(--terracotta);
  color: var(--white);
  border: none;
  padding: .75rem 1.5rem;
  font-family: 'Nova Rune', serif;
  cursor: pointer;
  border-radius: .5rem;
  transition: background .3s;
}
.ending-button:hover { background: #452012; }
footer {
  text-align: center;
  padding: 2rem;
  background-color: #000 !important;
  background-image: none !important;
  color: var(--terracotta);
  font-family: var(--font-cormorant);
  font-weight: 400;
  letter-spacing: .02em;
}

/* —————————————————————————————— */
/* 11 · Soft fade-in                */
/* —————————————————————————————— */
.reveal {
  opacity: 0;
  transition: opacity 1.9s ease-out;
}
.reveal.visible {
  opacity: 1;
}
/* —————————————————————————————— */
/* Tablet (min-width:600px & max-width:1023px) */
/* —————————————————————————————— */
/* Tablet Hero & Arrow tweaks (600px–1023px) */
@media (min-width: 600px) and (max-width: 1023px) {
  .hero {
    margin-top: calc(-1 * (env(safe-area-inset-top, 0) + var(--nav-total-height))) !important;
  }

  .hero-text {
    text-align: left !important;
    /* pull it up a bit and nudge left */
    margin: 4vh 0 0 3% !important;
  }
  .hero-text .line-1 {
    font-size: clamp(3rem, 8vw, 5rem) !important;
  }
  .hero-text .line-2 {
    font-size: clamp(6rem, 12vw, 9rem) !important;
  }

  .hero-text .scroll-cue {
    bottom: 15% !important;
    left: 50% !important;
    font-size: clamp(2rem, 5vw, 4rem) !important;

    /* restore the bounce animation */
    animation: bounce 2s infinite !important;
    /* no transform override here—let the keyframes handle it */
    cursor: pointer !important;
    opacity: .9 !important;
    color: var(--accent) !important;
    transition: color .3s !important;
    z-index: 3 !important;
  }

  
  /* Terracotta panel sizing */
  .terracotta, .terracotta-flip {
    padding-top: 15vh;
  }
  .terracotta img, .terracotta-flip img {
    width: 90vw;
    height: auto;
  }
  .terracotta-text {
    left: 55%;
    top: 20%;
    transform: translateX(-50%);
  }
  .terracotta-flip .terracotta-text {
    right: 55%;
    left: auto;
    top: 25%;
    transform: translateX(50%);
  }
}
/* —————————————————————————————— */
/* Mobile (max-width:599px)         */
/* —————————————————————————————— */
@media (max-width: 600px) {

  /* Hero reposition & sizing */
  body { overflow-x: hidden; }

  .hero {
    /* span the full viewport width */
    width: 100vw;
    /* pull up exactly under the fixed nav (nav adds this much padding-top) */
    margin-top: calc(-1 * (env(safe-area-inset-top, 0) + var(--nav-total-height))) !important;
    /* extend the hero down past the bottom of the nav, too */
    height:     calc(100vh + var(--nav-total-height) + env(safe-area-inset-top, 0)) !important;
    /* ensure the background still covers */
    background-size: cover !important;
    background-position: top center !important;
  }
  .hero-text {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%) !important;
    width: 90%; max-width: 90vw;
    padding: 2rem;
    text-align: center;
    z-index: 3;
  }
  .hero-text .line-1 {
    font-size: clamp(2rem, 8vw, 4rem) !important;
    font-family: var(--font-cormorant) !important;
  }
  .hero-text .line-2 {
    font-size: clamp(3rem,12vw,10rem) !important;
    font-family: 'Nova Rune', serif !important;
    line-height: 1 !important;
  }
  .hero-text .scroll-cue {
    top: auto !important;
    left: 50% !important;
    transform: translateX(-50%) scale(2) !important;
    font-size: clamp(2rem,6vw,5rem) !important;
  }
  

  /* First Terracotta panel – remove overlay */
  #feature.terracotta {
    background: none !important;
    padding-top: 0 !important;
    overflow: visible !important;
  }
  #feature .terracotta-text {
    position: absolute !important;
    top: 30% !important;
    left: 50% !important;
    transform: translate(-50%,-50%) !important;
    width: 90% !important;
    max-width: 90vw !important;
    text-align: center !important;
    font-size: clamp(2rem,8vw,3rem) !important;
    z-index: 3 !important;
  }

  /* All panels */
  .terracotta, .terracotta-flip {
    padding-top: 10vh;
    overflow: visible;
  }
  .terracotta img, .terracotta-flip img {
    width: 100vw;
    height: auto;
    margin-top: 0;
  }
  .terracotta-text, .terracotta-flip .terracotta-text {
    position: absolute;
    top: 18vh; left: 50%;
    transform: translate(-50%,-50%);
    width: 90%; max-width: 90vw;
    text-align: center;
    font-size: clamp(2rem,8vw,3rem);
    z-index: 3;
  }
  .terracotta-button, .contact-button {
    position: absolute !important;
    top: 75% !important;
    left: 50% !important;
    transform: translate(-50%,-50%) !important;
    width: 80vw !important;
    height: auto !important;
    padding: 20px;
    border: 2px solid var(--accent) !important;
    z-index: 3 !important;
  }
  .scroll-cue-terra {
    font-size: clamp(2.5rem,8vw,6rem);
    margin-top: 1rem;
  }

  /* make the flipped panel container “relative” so the arrow can absolutely position inside it */
.terracotta-flip {
  position: relative !important;
}

/* absolutely position the arrow under the Contact button */
.terracotta-flip .scroll-cue-terra {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) scale(2) !important;
  /* pull it down below the button – tweak “2rem” until it sits just underneath */
  bottom: 2rem !important;
  /* cancel any old margin or top settings */
  top:    auto   !important;
  margin: 0      !important;
}
}

@media (max-width: 599px) {
  .hero-text .scroll-cue {
    /* push it 4rem below the text on mobile */
    top:    calc(100%) !important;
    bottom: auto           !important;
    transform: translateX(-50%) scale(2) !important;
  }

    /* 15 · Push the flipped‐panel arrow below the Contact button */
  .terracotta-flip {
    position: relative; /* ensure the arrow can absolutely position itself against this container */
  }
  .terracotta-flip .scroll-cue-terra {
    position: absolute !important;
    /* align it horizontally */
    left: 50% !important;
    transform: translateX(-50%) scale(2) !important;
    /* push it down—tweak this % until it sits nicely under your button */
    /* cancel any old margin-based positioning */
    margin-top: 0 !important;
  }

    /* 15 · Push the flipped‐panel arrow below the Contact button */
  .terracotta-flip {
    position: relative; /* ensure arrow positions against this container */
  }
  .terracotta-flip .scroll-cue-terra {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) scale(2) !important;
    bottom: -5rem !important;  /* tweak this until it sits just under the button */
    top:    auto   !important; /* cancel any earlier top setting */
    margin: 0      !important; /* cancel any earlier margin-based positioning */
  }

}

@media (max-width: 599px) {
  /* …existing mobile rules… */

  /* override just the flipped panel image on mobile */
  .terracotta-flip img {
    width: 110vw !important;      /* make it 10% wider than viewport */
    margin-left: -5vw !important; /* center the overflow */
     height: 60vh !important;
  }
}

@media (max-width: 600px) {
  /* hide any x-overflow from the shift */
  body { overflow-x: hidden; }

  .hero {
    /* pull it up under the nav as before */
    margin-top: calc(
      -1 * (env(safe-area-inset-top, 0) + var(--nav-total-height))
    ) !important;
    height: calc(
      100vh + var(--nav-total-height) + env(safe-area-inset-top, 0)
    ) !important;

    /* full-bleed horizontally */
    position: relative;          /* enable left/top offsets */
    left: 50%;                   /* move the left edge to center of container */
    transform: translateX(-50vw);/* then pull it left by half the viewport */
    width: 100vw !important;     /* span exactly the viewport width */

    /* ensure the bg covers the new dimensions */
    background-size: cover !important;
    background-position: top center !important;
  }
}
/* —— MOBILE-ONLY: tone down last section image & boost its text —— */
.ending {
  /* make the “ending” panel shorter on mobile */
  min-height: 50vh !important;  
  /* tighten up its padding */
  padding: 15vh 1rem !important;  
}

.ending img {
  /* if you have an actual <img> in the ending, shrink it */
  width: 80vw !important;
  height: auto !important;
}

.ending-text {
  /* enlarge the copy “A place where paper remembers its soul…” */
  font-size: clamp(2.5rem, 8vw, 4rem) !important;
}
/* Mobile only: force the “∨” under the Contact button in the flipped panel */
@media (max-width: 600px) {
  /* make the flipped panel the containing block */
  .terracotta-flip {
    position: relative !important;
  }

  /* absolutely position the arrow under the button */
  .terracotta-flip .scroll-cue-terra {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) scale(2) !important;
    top: auto !important;           /* cancel any previous top */
    bottom: -15rem !important;        /* tweak this value until it sits just below your button */
    margin: 0 !important;           /* remove any stray margins */
  }
}

/* nudge the Contact button up under the flipped panel text */
@media (max-width: 600px) {
  .terracotta-flip .contact-button {
    /* drop from 75% to around 70% (experiment between 68–72%) */
    top: 60% !important;
  }
}
