/* Blue Crane Properties — screen styles
   1. Foundations  2. Layout  3. Components  4. States  5. Responsive */

/* 1. Foundations ------------------------------------------------------- */
:root {
  --bg: #F5F8F9;
  --surface: #FFFFFF;
  --text: #18282F;
  --muted: #4A5C65;
  --brand: #1F4F66;
  --brand-deep: #163B4C;
  --brand-light: #3E778F;
  --accent: #9DBAC7;
  --on-brand: #FFFFFF;
  --on-brand-hover: #E6EEF1;

  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-6: 1.5rem;  --space-8: 2rem;   --space-12: 3rem;   --space-16: 4rem;
  --space-24: 6rem;

  --gutter: 1.25rem;
  --container: 70rem;  /* 1120px */
  --measure: 42.5rem;  /* 680px  */
  --radius: 6px;
  --focus: 3px solid var(--brand-light);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;          /* 17px */
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

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

.nowrap { white-space: nowrap; }

h1, h2, p { margin: 0; }

h1 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.875rem, 1.35rem + 2.6vw, 3.25rem);   /* 30 → 52px */
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 18ch;
  text-wrap: balance;
}

h2 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(1.3125rem, 1.15rem + 0.7vw, 1.625rem); /* 21 → 26px */
  line-height: 1.3;
  text-wrap: balance;
}

a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: var(--focus); outline-offset: 3px; }

/* 2. Layout ------------------------------------------------------------ */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header floats over the hero photo; the hero reserves its height. */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  padding-block: var(--space-4);
}

.hero {
  --header-h: 9rem;
  --photo-h: 9rem;          /* small screens: open photo space between logo and headline */
  --wash: rgba(22, 59, 76, 0.2);
  --hero-jpg: url("../assets/hero-800.jpg");
  --hero-img: image-set(url("../assets/hero-800.webp") type("image/webp"), url("../assets/hero-800.jpg") type("image/jpeg"));
  --hero-pos: 18% 72%;      /* frames the armchairs, lamp and window view */
  --hero-size: auto 165%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 6px solid var(--brand);           /* brand band under the hero */
  padding-block: calc(var(--header-h) + var(--photo-h)) var(--space-16);
}
.hero .lede { margin-top: var(--space-6); max-width: var(--measure); }

/* Layer 1: photo, softened by a blue-gray shadow wash */
.hero::before {
  content: "";
  position: absolute; z-index: -2;
  top: 0; left: 0; right: 0;
  height: calc(var(--header-h) + var(--photo-h) + 2rem);
  background: linear-gradient(var(--wash), var(--wash)), var(--hero-jpg) var(--hero-pos) / var(--hero-size) no-repeat;
  background: linear-gradient(var(--wash), var(--wash)), var(--hero-img) var(--hero-pos) / var(--hero-size) no-repeat;
  transform-origin: 30% 60%;
}
/* Layer 2: light veil behind the logo, clear photo in the middle, solid color by the headline */
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg,
    rgba(245, 248, 249, 0.86) 0,
    rgba(245, 248, 249, 0.74) calc(var(--header-h) - 2rem),
    rgba(245, 248, 249, 0) calc(var(--header-h) + 1.5rem),
    rgba(245, 248, 249, 0.35) calc(var(--header-h) + var(--photo-h) - 3.5rem),
    rgba(245, 248, 249, 0.92) calc(var(--header-h) + var(--photo-h) - 0.5rem),
    var(--bg) calc(var(--header-h) + var(--photo-h) + 0.5rem));
}

.experience { background: var(--surface); padding-block: var(--space-16); }
.experience__inner { display: grid; gap: var(--space-4); }
.experience__text { max-width: var(--measure); }

.coming-soon {
  position: relative;
  overflow: hidden;
  background: var(--brand);
  color: var(--on-brand);
  padding-block: var(--space-16);
}
.coming-soon__inner { position: relative; display: grid; gap: var(--space-8); }
.coming-soon__text { max-width: var(--measure); }
.coming-soon__text p { margin-top: var(--space-3); }

.site-footer { padding-block: var(--space-6); color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.site-footer__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-4);
}

/* 3. Components -------------------------------------------------------- */
.skip-link {
  position: absolute; left: var(--space-4); top: var(--space-4); z-index: 10;
  padding: var(--space-3) var(--space-4);
  background: var(--brand); color: var(--on-brand);
  border-radius: var(--radius); font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
main:focus { outline: none; }

.brand { display: inline-block; border-radius: var(--radius); }
.brand img { width: 6.5rem; height: auto; }  /* 104px */

.figure { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.figure__number {
  font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(3.5rem, 2.6rem + 3.8vw, 5.5rem);    /* 56 → 88px */
  line-height: 1; color: var(--brand);
  font-variant-numeric: lining-nums;
}
.figure__label { color: var(--muted); font-size: 0.9375rem; }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3rem; padding: 0.875rem 1.375rem;
  border-radius: var(--radius);
  background: var(--on-brand); color: var(--brand);
  font-family: var(--font-sans); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none;
}
.button:hover { background: var(--on-brand-hover); color: var(--brand-deep); }
.coming-soon :focus-visible { outline-color: var(--on-brand); }

.email-text { margin-top: var(--space-3); font-size: 0.9375rem; overflow-wrap: anywhere; }

.share { position: relative; }
.share__button, .share__copy {
  min-height: 2.75rem; padding: 0.5rem 1rem;
  border: 1px solid var(--muted); border-radius: var(--radius);
  background: transparent; color: var(--text);
  font: 600 0.875rem/1.2 var(--font-sans); cursor: pointer;
}
.share__button:hover, .share__copy:hover { border-color: var(--brand); color: var(--brand); }
.share__panel {
  margin-top: var(--space-3);
  display: grid; grid-template-columns: 1fr auto; gap: var(--space-2);
  max-width: 22rem;
}
.share__panel[hidden] { display: none; }
.share__label { grid-column: 1 / -1; color: var(--text); font-weight: 600; }
.share__url {
  min-width: 0; min-height: 2.75rem; padding: 0.5rem 0.75rem;
  border: 1px solid var(--muted); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font: inherit;
}
.share__status { grid-column: 1 / -1; color: var(--text); min-height: 1.5em; }

/* 4. States ------------------------------------------------------------ */
/* Reveal only when JS is running and motion is welcome; content is visible otherwise. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal:not(.is-visible) { opacity: 0; transform: translateY(12px); }
  .js .reveal { transition: opacity 400ms ease-out, transform 400ms ease-out; }
}
.reveal:focus-within { opacity: 1 !important; transform: none !important; }

/* Hero photo settles into place once on load */
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: hero-settle 2.2s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
}
@keyframes hero-settle {
  from { transform: scale(1.08); opacity: 0.4; }
  to   { transform: scale(1);    opacity: 1; }
}

/* 5. Responsive -------------------------------------------------------- */
@media (min-width: 37.5em) {           /* 600px */
  :root { --gutter: 2rem; }
  .hero {
    --photo-h: 12rem;
    --hero-jpg: url("../assets/hero-1200.jpg");
    --hero-img: image-set(url("../assets/hero-1200.webp") type("image/webp"), url("../assets/hero-1200.jpg") type("image/jpeg"));
    --hero-pos: 20% 70%;
    --hero-size: cover;
    padding-bottom: var(--space-24);
  }
}

@media (min-width: 60em) {             /* 960px */
  body { font-size: 1.125rem; }        /* 18px */
  .brand img { width: 8rem; }          /* 128px */
  .site-header { padding-block: var(--space-6); }
  .hero {
    --header-h: 11.5rem;
    --photo-h: var(--space-12);
    --wash: rgba(22, 59, 76, 0.18);
    --hero-jpg: url("../assets/hero-2000.jpg");
    --hero-img: image-set(url("../assets/hero-2000.webp") type("image/webp"), url("../assets/hero-2000.jpg") type("image/jpeg"));
    --hero-pos: center 45%;
    --hero-size: cover;
  }
  .hero .lede { max-width: 34rem; }
  /* Photo fills the hero from the logo's right; a diagonal fade follows the copy,
     reaching furthest into the photo near the logo and sweeping wide along the bottom. */
  .hero::before { left: 22%; height: auto; bottom: 0; transform-origin: 70% 40%; }
  .hero::after {
    background:
      linear-gradient(0deg, rgba(245, 248, 249, 0.9) 0, rgba(245, 248, 249, 0.35) 12%, rgba(245, 248, 249, 0) 26%),
      linear-gradient(62deg,
        var(--bg) 0,
        var(--bg) 40%,
        rgba(245, 248, 249, 0.86) 47%,
        rgba(245, 248, 249, 0.45) 55%,
        rgba(245, 248, 249, 0.12) 63%,
        rgba(245, 248, 249, 0) 70%);
  }
  .experience, .coming-soon { padding-block: var(--space-24); }
  .experience__inner { grid-template-columns: auto 1fr; align-items: center; gap: var(--space-12); }
  .figure { flex-direction: column; gap: var(--space-2); align-items: flex-start; }
  .coming-soon__inner { grid-template-columns: 1fr auto; align-items: center; gap: var(--space-12); }
}
