/* style.css */

:root {
  --background: #f4f1e8;
  --accent: #9b4819;
  --text: #191919;

  --serif: "Radley", Georgia, serif;
  --sans: "Carlito", Arial, sans-serif;

  --page-padding: clamp(24px, 4vw, 72px);
}

/* ------------------------------
   RESET
-------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;

  background: var(--background);
  color: var(--text);

  font-family: var(--sans);

  overflow-x: hidden;
}

a {
  color: inherit;
}

/* ------------------------------
   HEADER
-------------------------------- */

.site-header {
  position: fixed;

  top: 0;
  left: 0;

  width: 100%;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding:
    28px
    var(--page-padding);

  z-index: 20;
}

.logo {
  font-family: var(--sans);
  font-weight: 700;

  font-size: 0.9rem;
  letter-spacing: 0.08em;

  text-decoration: none;
}

.nav {
  display: flex;
  gap: clamp(18px, 2.5vw, 38px);
}

.nav a {
  position: relative;

  font-size: 0.9rem;

  text-decoration: none;
}

.nav a::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: -5px;

  width: 100%;
  height: 1px;

  background: var(--accent);

  transform: scaleX(0);
  transform-origin: right;

  transition: transform 0.35s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ------------------------------
   HERO
-------------------------------- */

.hero {
  position: relative;

  min-height: 100svh;

  display: grid;
  place-items: center;

  padding:
    130px
    var(--page-padding)
    70px;
}

.hero-content {
  width: min(1100px, 100%);

  text-align: center;
}

.eyebrow {
  margin: 0 0 35px;

  color: var(--accent);

  font-size: 0.8rem;
  font-weight: 700;

  letter-spacing: 0.14em;
}

.hero-title {
  margin: 0;

  font-family: var(--serif);
  font-weight: 400;

  font-size: clamp(4rem, 10vw, 9.5rem);
  line-height: 0.92;

  letter-spacing: -0.035em;
}

.hello {
  font-style: italic;
}

.title-line {
  display: block;
}

.name {
  position: relative;

  display: inline-block;

  color: var(--accent);

  white-space: nowrap;
}

/* ------------------------------
   HAND-DRAWN CIRCLE
-------------------------------- */

.name-circle {
  position: absolute;

  width: 125%;
  height: 145%;

  left: -12%;
  top: -20%;

  overflow: visible;

  pointer-events: none;
}

.name-circle path {
  fill: none;

  stroke: var(--accent);
  stroke-width: 2.2;

  stroke-linecap: round;
  stroke-linejoin: round;

  stroke-dasharray: 900;
  stroke-dashoffset: 900;

  animation:
    draw-circle
    1.25s
    cubic-bezier(.65, 0, .35, 1)
    forwards;

  animation-delay: 0.85s;
}

@keyframes draw-circle {
  to {
    stroke-dashoffset: 0;
  }
}

/* ------------------------------
   HERO TEXT
-------------------------------- */

.hero-description {
  max-width: 680px;

  margin:
    clamp(34px, 5vw, 58px)
    auto
    0;

  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.5;
}

.hero-description strong {
  font-weight: 400;
  color: var(--accent);
}

.hero-subline {
  margin: 12px auto 0;

  max-width: 620px;

  font-size: 1rem;
  line-height: 1.5;

  opacity: 0.72;
}

/* ------------------------------
   CTA
-------------------------------- */

.hero-actions {
  margin-top: 48px;
}

.explore-link {
  position: relative;

  display: inline-flex;
  align-items: center;
  gap: 12px;

  color: var(--accent);

  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;

  text-decoration: none;

  padding-bottom: 6px;
}

.explore-link::after {
  content: "";

  position: absolute;

  left: 0;
  bottom: 0;

  width: 100%;
  height: 1px;

  background: currentColor;

  transform: scaleX(0);
  transform-origin: right;

  transition: transform 0.4s ease;
}

.explore-link:hover::after,
.explore-link:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.arrow {
  display: inline-block;

  transition: transform 0.35s ease;
}

.explore-link:hover .arrow {
  transform: translateX(7px);
}

/* ------------------------------
   LOCATION
-------------------------------- */

.location {
  position: absolute;

  left: var(--page-padding);
  bottom: 34px;

  font-size: 0.85rem;

  opacity: 0.65;
}

/* ------------------------------
   LITTLE EDITORIAL DETAIL
-------------------------------- */

.scroll-hint {
  position: absolute;

  right: var(--page-padding);
  bottom: 32px;

  display: flex;
  align-items: center;

  gap: 12px;

  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.scroll-line {
  width: 42px;
  height: 1px;

  background: var(--accent);
}

/* ------------------------------
   INTRO ANIMATION
-------------------------------- */

.reveal {
  opacity: 0;

  transform: translateY(15px);

  animation:
    reveal
    0.8s
    cubic-bezier(.2, .7, .2, 1)
    forwards;
}

.eyebrow {
  animation-delay: 0.05s;
}

.hero-title {
  animation-delay: 0.18s;
}

.hero-description {
  animation-delay: 0.7s;
}

.hero-subline {
  animation-delay: 0.82s;
}

.hero-actions {
  animation-delay: 1s;
}

.location {
  animation-delay: 1.15s;
}

@keyframes reveal {

  to {
    opacity: 1;
    transform: translateY(0);
  }

}

/* ------------------------------
   PAGE TRANSITION
-------------------------------- */

.page-transition {
  position: fixed;

  inset: 0;

  background: var(--accent);

  transform: translateY(100%);

  z-index: 9999;

  pointer-events: none;
}

.page-transition.is-entering {
  animation:
    page-cover
    0.75s
    cubic-bezier(.76, 0, .24, 1)
    forwards;
}

@keyframes page-cover {

  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }

}

/* When a new page loads */
body.page-loaded .page-transition {
  animation:
    page-reveal
    0.75s
    cubic-bezier(.76, 0, .24, 1)
    forwards;
}

@keyframes page-reveal {

  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-100%);
  }

}

/* ------------------------------
   ACCESSIBILITY
-------------------------------- */

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}

/* ------------------------------
   RESPONSIVE
-------------------------------- */

@media (max-width: 760px) {

  .site-header {
    padding-top: 22px;
  }

  .nav a:not(:last-child) {
    display: none;
  }

  .hero {
    place-items: center start;

    padding-top: 120px;
  }

  .hero-content {
    text-align: left;
  }

  .hero-title {
    font-size: clamp(4rem, 19vw, 6.7rem);
  }

  .hero-description,
  .hero-subline {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-description {
    max-width: 540px;
  }

  .location {
    left: var(--page-padding);

    bottom: 26px;
  }

  .scroll-hint {
    display: none;
  }

}

/* ------------------------------
   REDUCED MOTION
-------------------------------- */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;

    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .name-circle path {
    stroke-dashoffset: 0;
  }

}