/* ============================================================
   LANDING — standalone stylesheet for index.html.
   The landing page carries no nav, footer or scrolling content,
   so it loads this file alone instead of style.css.
============================================================ */

/* ---------- TOKENS ---------- */
:root {
  --slate:        #0F0F0F;
  --amber:        #D4900A;
  --cream:        #F2EDE4;
  --cream-dim:    rgba(242, 237, 228, 0.55);
  --cream-faint:  rgba(242, 237, 228, 0.22);

  --sans:  'Archivo', sans-serif;
  --serif: 'Fraunces', serif;
  --mono:  'Space Mono', monospace;

  --gutter: 2.5rem;
  --panel-grown: 56vw;
}

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

html, body {
  height: 100%;
}

body {
  background-color: var(--slate);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  overflow: hidden;
}

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

em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- SHELL ---------- */
.landing {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 460px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- SPLIT ---------- */
.landing-split {
  position: absolute;
  inset: 0;
  display: flex;
}

.panel {
  position: relative;
  flex: 1 1 50%;
  display: flex;
  overflow: hidden;
  transition: flex-basis 0.6s cubic-bezier(0.22, 0.8, 0.3, 1);
}

/* The layer is a fixed width (never the panel's own width) and is pinned to
   the panel's outer edge. `cover` therefore resolves once per viewport, so a
   growing panel uncovers more photograph instead of re-fitting — and so
   re-scaling — the image. --panel-grown must match the hover flex-basis. */
.panel-image {
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--panel-grown);
  background-size: cover;
  background-position: center;
}

.panel--bw .panel-image {
  left: 0;
}

.panel--watches .panel-image {
  right: 0;
}

.panel--bw .panel-image {
  background: linear-gradient(140deg, #080808 0%, #111111 30%, #1a1a1a 60%, #080808 100%);
  background-image: url('../images/photography.webp');
  background-size: cover;
  background-position: center;
  filter: grayscale(1) contrast(1.05);
}

.panel--watches .panel-image {
  background: linear-gradient(140deg, #1a0a00 0%, #3d1e00 30%, #6b3800 65%, #1a0a00 100%);
  background-image: url('../images/watches.webp');
  background-size: cover;
  background-position: center;
}

/* Darkens the image so the headline and the blended name stay legible */
/* Two stacked layers rather than one gradient that swaps on hover: browsers
   do not interpolate between gradients, so a `background` transition snaps
   at the midpoint. The lit state is the base; the extra darkening sits on
   top and fades out, which opacity interpolates smoothly. */
.panel-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 15, 15, 0.62) 0%,
    rgba(15, 15, 15, 0.14) 50%,
    rgba(15, 15, 15, 0.26) 100%
  );
}

.panel-tint::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 15, 15, 0.82) 0%,
    rgba(15, 15, 15, 0.44) 50%,
    rgba(15, 15, 15, 0.24) 100%
  );
  transition: opacity 0.75s cubic-bezier(0.33, 0, 0.2, 1);
}

/* Hairline between the two halves */
.panel + .panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(242, 237, 228, 0.18);
  z-index: 5;
}

.panel:hover .panel-tint::after,
.panel:focus-visible .panel-tint::after {
  opacity: 0;
}

/* The hovered half takes over; its neighbour yields */
.landing-split:hover .panel {
  flex-basis: 44%;
}

.landing-split:hover .panel:hover {
  flex-basis: 56%;
}

.panel:focus-visible {
  outline: 1px solid var(--amber);
  outline-offset: -6px;
}

.panel-label {
  position: relative;
  z-index: 4;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 var(--gutter) 7rem;
}

.panel-title {
  font-weight: 900;
  font-size: clamp(1.75rem, 2.9vw, 3.5rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  transition: color 0.4s ease, transform 0.4s ease;
}

.panel-title em {
  color: inherit;
}

.panel:hover .panel-title,
.panel:focus-visible .panel-title {
  color: var(--amber);
  transform: translateY(-4px);
}

.panel-sub {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-top: 1rem;
}

.panel-cta {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  margin-top: 1.75rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.panel:hover .panel-cta,
.panel:focus-visible .panel-cta {
  opacity: 1;
  transform: none;
}

/* ---------- NAME ---------- */
.landing-head {
  position: relative;
  z-index: 10;
  pointer-events: none;
  padding-top: 2.25rem;
}

/* Scrim that guarantees the blended name reads over any image */
.landing-head::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 200%;
  background: linear-gradient(to bottom, rgba(15, 15, 15, 0.55), rgba(15, 15, 15, 0));
  pointer-events: none;
}

.landing-name {
  position: relative;
  display: block;
  font-weight: 900;
}

/* SVG text with textLength fits the name edge to edge at any width,
   with no JS measuring pass. */
.landing-name svg {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: difference;
}

.landing-name text {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.02em;
  fill: #fff;
}

/* Sizes chosen so each line's natural width lands just under the 1000-unit
   viewBox: textLength then only nudges the tracking to snap it flush. */
.name-wide text {
  font-size: 100px;
}

.name-line-1 {
  font-size: 253px;
}

.name-line-2 {
  font-size: 179px;
}

/* Scoped past `.landing-name svg` so the display toggle actually wins */
.landing-name .name-stacked {
  display: none;
}

/* ---------- BOTTOM BAR ---------- */
.landing-foot {
  position: relative;
  z-index: 10;
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  padding: 1.25rem var(--gutter) 1.75rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.landing-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.landing-links a:hover {
  color: var(--cream);
}

.landing-foot a {
  transition: color 0.2s ease;
}

/* ---------- LANGUAGE TOGGLE ---------- */
.lang-toggle {
  display: inline-flex;
  align-items: center;
}

.lang-btn {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: none;
  border: 0;
  padding: 0;
  color: var(--cream-faint);
  cursor: pointer;
  transition: color 0.2s ease;
}

.lang-btn:hover {
  color: var(--cream-dim);
}

.lang-btn.active {
  color: var(--cream);
}

.lang-sep {
  color: var(--cream-faint);
  margin: 0 0.4rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  :root {
    --gutter: 1.5rem;
  }

  body {
    font-size: 17px;
  }

  /* Stacked halves — each still owns half the screen */
  .landing-split {
    flex-direction: column;
  }

  .landing-split:hover .panel,
  .landing-split:hover .panel:hover {
    flex-basis: 50%;
  }

  .panel + .panel::before {
    left: 0;
    right: 0;
    top: 0;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .panel-image {
    left: 0;
    right: 0;
    width: auto;
  }

  .panel-label {
    padding: 0 var(--gutter) 2rem;
  }

  /* The bottom half sits under the foot bar, so it needs the clearance */
  .panel + .panel .panel-label {
    padding-bottom: 5rem;
  }

  .panel-title {
    font-size: clamp(1.6rem, 7.5vw, 2.4rem);
  }

  /* Touch has no hover, so the CTA is always visible */
  .panel-cta {
    opacity: 1;
    transform: none;
    margin-top: 1.1rem;
  }

  .landing-name .name-wide {
    display: none;
  }

  .landing-name .name-stacked {
    display: block;
  }

  .landing-head {
    padding-top: 1.5rem;
  }

  .landing-foot {
    padding-bottom: 1.5rem;
  }

  .landing-links {
    gap: 1.25rem;
  }
}

@media (hover: none) {
  .panel-cta {
    opacity: 1;
    transform: none;
  }

  /* No hover to lift the mute, so the halves rest part-way lit */
  .panel-tint::after {
    opacity: 0.6;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel,
  .panel-tint::after,
  .panel-title,
  .panel-cta {
    transition: none;
  }

  .landing-split:hover .panel,
  .landing-split:hover .panel:hover {
    flex-basis: 50%;
  }
}
