/* ============================================================
   Serenidade Architectural — landing page
   Tokens mirror DESIGN.md. Sharp corners throughout (0px radius).
   ============================================================ */

:root {
  /* Color — only the roles this page uses */
  --primary:            #180f27; /* Midnight Violet — selection */
  --surface:            #fcf9f8; /* Soft Bone — hero text on dark */
  --inverse-surface:    #303030; /* Muted Charcoal — Contact + Footer bg */
  --inverse-on-surface: #f3f0ef; /* text on charcoal */
  --outline:            #7a757d; /* button border default, placeholder */
  --outline-variant:    #cbc4cd; /* button border hover */
  --inverse-primary:    #cfc1e1; /* input focus border, footer link hover */
  --surface-tint:       #645a76; /* link hover on light */
  --lavender:           #DBB2DFBC; /* footer wordmark + nav (inverse-primary alpha) */

  /* Hero-specific (this pass) */
  --hero-tint-rgb:       16, 17, 28;   /* cooled, darker tint base */
  --hero-heading-color:  #EDEDF4;
  --hero-body-color:     #efe9e6;      /* pick a final value — was tweakable in the design tool */
  --hero-email-color:    rgba(219, 178, 223, 0.737);

  /* Type families */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Layout */
  --container-max: 1280px;
  --gutter: 32px;
  --section-pad-v: 120px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: #1b1b1c;
  font-family: var(--font-body);
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--primary); color: var(--surface); }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--surface-tint); }

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

/* ============================================================
   NAV
   ============================================================ */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding: 28px 0;
  opacity: 1;
  transition: opacity 0.1s linear;
  will-change: opacity;
}

.nav__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Driven by JS: 0 = fully faded. Below 0.05 we stop intercepting clicks. */
.nav[data-faded="true"] { pointer-events: none; }

.nav__brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28.6px;
  line-height: 1.05;
  letter-spacing: 0.04em;
  color: var(--surface);
}

.nav__links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0; /* spacing carried by link padding below (larger tap target) */
}

.nav__link {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--surface);
  opacity: 0.9;
  padding: 6px 0; /* touch target */
  transition: opacity 0.15s var(--ease-out);
}

.nav__link:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: var(--primary);
}

.hero__photo {
  position: absolute;
  inset: 0;
  background-image: url('../assets/hero-skyline.jpg');
  background-size: cover;
  background-position: center;
}

.hero__tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(var(--hero-tint-rgb), 0.45) 0%,
    rgba(var(--hero-tint-rgb), 0.65) 55%,
    rgba(var(--hero-tint-rgb), 0.95) 100%
  );
}

.hero__fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 260px;
  background: linear-gradient(180deg, rgba(48, 48, 48, 0) 0%, #303030 100%);
  z-index: 2;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.hero__content { max-width: 820px; }

.hero__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 54px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--hero-heading-color);
  margin: 0 0 16px;
  text-wrap: balance;
}

.hero__body {
  font-size: 18px;
  line-height: 1.35;
  color: var(--hero-body-color);
  max-width: 616px;
  margin: 0;
  text-align: justify;
}

.hero__body-intro {
  color: var(--hero-heading-color);
  font-size: 15.5px;
  font-weight: 300;
}

.hero__body-spacer { height: 40px; }

.hero__body-notice {
  text-align: justify;
  line-height: 1.3;
}

.hero__body-link {
  color: inherit;
  font-weight: bold;
  text-decoration: none;
}

.hero__body-link:hover { text-decoration: underline; }

.hero__body-contact {
  text-align: justify;
  margin-top: 24px;
  font-weight: 300;
  font-size: 15.5px;
}

.hero__body-contact a { color: var(--hero-email-color); }

/* ============================================================
   CONTACT
   ============================================================ */

.contact {
  background: var(--inverse-surface);
  padding: var(--section-pad-v) var(--gutter);
}

.contact__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 96px;
}

.contact__heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 40px;
  line-height: 1.2;
  color: var(--inverse-on-surface);
  margin: 0 0 10px;
  max-width: 460px;
  text-wrap: balance;
}

.contact__lede {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 300;
  text-align: justify;
  color: rgba(243, 240, 239, 0.7);
  max-width: 460px;
  margin: 0 0 48px;
}

/* Info rows (EMAIL / PHONE) — no divider rule in this pass */
.info {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info__row {
  padding-top: 16px;
}

.info__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(243, 240, 239, 0.6); /* AA on charcoal (0.5 was 4.15:1 → 5.3:1) */
}

.info__value {
  font-size: 16px;
  color: var(--inverse-on-surface);
  margin: 6px 0 0;
}

.info__value a {
  color: inherit;
  transition: color 0.15s var(--ease-out);
}

.info__value a:hover { color: var(--inverse-primary); }

/* ---- Form ---- */

.form {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field__caption {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(243, 240, 239, 0.6);
}

.field__input {
  border: none;
  border-bottom: 1px solid rgba(243, 240, 239, 0.5);
  background: transparent;
  font-family: var(--font-body);
  font-size: 16px;
  padding: 8px 0;
  min-height: 44px; /* touch target */
  outline: none;
  color: var(--inverse-on-surface);
  transition: border-color 0.2s var(--ease-out);
}

.field__input--area {
  resize: none;
  font-family: inherit;
}

/* Placeholder lifted to clear WCAG AA on charcoal (was --outline #7a757d = 2.93:1 → 5.3:1) */
.field__input::placeholder { color: rgba(243, 240, 239, 0.55); opacity: 1; }

.field__input:focus { border-bottom-color: var(--inverse-primary); }

.field__input:user-invalid { border-bottom-color: #e0a0a0; }

.form__error {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #f0b4b4;
}

.btn {
  margin-top: 12px;
  width: 100%;
  background: var(--inverse-surface);
  color: rgba(243, 240, 239, 0.6); /* translucent label, per current design pass */
  border: 1px solid var(--outline);
  padding: 18px 32px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out), opacity 0.2s var(--ease-out);
}

.btn:hover { border-color: var(--outline-variant); }
.btn:focus-visible { outline: 1px solid var(--inverse-primary); outline-offset: 3px; }
.btn[disabled] { opacity: 0.55; cursor: default; }

/* ---- Thank-you state ---- */

.thanks[hidden] { display: none; }

.thanks {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  border-top: 1px solid var(--inverse-on-surface);
  padding-top: 32px;
}

.thanks__title {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
  color: var(--inverse-on-surface);
  margin: 0 0 12px;
}

.thanks__body {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(243, 240, 239, 0.7);
  margin: 0;
}

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

.footer {
  position: relative;
  background: var(--inverse-surface);
  color: var(--inverse-on-surface);
  padding: 80px 32px 64px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

/* Decorative oversized wordmark — intentionally cropped by overflow:hidden */
.footer__watermark {
  position: absolute;
  top: 57px;
  left: 32px;
  right: 32px;
  height: 238px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.footer__watermark span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: min(19vw, 300px);
  line-height: 1;
  background: linear-gradient(115deg, rgba(0, 0, 0, 0.0952), rgba(0, 0, 0, 0.0476) 45%, rgba(0, 0, 0, 0.0816) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
}

.footer__row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 48px;
}

.footer__identity {
  max-width: 340px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: flex-end;
  margin-top: 40px;
}

.footer__idblock {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer__wordmark {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
  color: var(--lavender);
  margin: 0;
}

.footer__address {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(243, 240, 239, 0.6);
  margin: 0;
}

.footer__contact {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(243, 240, 239, 0.6);
  margin: 0;
}

.footer__contact a {
  color: inherit;
  transition: color 0.15s var(--ease-out);
}

.footer__contact a:hover { color: var(--inverse-primary); }

.footer__nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0; /* spacing carried by link padding (larger tap target) */
  align-self: flex-start;
  margin-top: 40px;
}

.footer__link {
  font-size: 14px;
  color: var(--lavender);
  font-weight: 100;
  padding: 4px 0; /* touch target */
  transition: color 0.15s var(--ease-out);
}

.footer__link--right {
  text-align: right;
  font-weight: 300;
}

.footer__link:hover { color: var(--inverse-primary); }

/* Visible but inert placeholders — no destination page yet */
.footer__link--disabled {
  pointer-events: none;
  cursor: default;
}

.footer__legal {
  padding: 24px 0 32px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer__legal span {
  font-size: 12px;
  color: rgba(243, 240, 239, 0.5);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .contact__inner {
    grid-template-columns: 1fr;
    gap: 56px;
  }
  .contact__heading { max-width: none; }
  .contact__lede { max-width: 60ch; }
}

@media (max-width: 680px) {
  .nav__inner { padding: 0 24px; }
  .nav__wordmark { font-size: 22px; }

  .hero__inner { padding: 0 24px; }
  .hero__heading { font-size: 36px; letter-spacing: -0.01em; margin-bottom: 16px; }
  .hero__body { font-size: 16px; }

  .contact { padding: 64px 24px; }
  .contact__heading { font-size: 32px; }

  .footer { padding: 64px 24px 48px; }
  .footer__row { gap: 32px; }
  .footer__nav { align-self: flex-end; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
