/* ============================================================
   The Sorted Home — Design System
   Brand: heritage NYC monogram identity. Trajan Pro display +
   Aptos body. Four-colour palette:
     #98B2C5  powder blue (brand accent)
     #26354A  navy (primary dark)
     #E7E4DE  warm mid-neutral
     #F9F3EE  cream (lightest)
   ============================================================ */

:root {
  /* Brand palette — four colours */
  --powder-blue: #98B2C5;
  --powder-blue-soft: #98B2C5;
  --powder-blue-deep: #26354A;
  --navy: #26354A;
  --navy-soft: #26354A;
  --blush: #98B2C5;
  --blush-soft: #E7E4DE;

  /* Neutrals */
  --cream: #F9F3EE;
  --cream-deep: #E7E4DE;
  --ivory: #F9F3EE;
  --paper: #F9F3EE;
  --warm-gray: #98B2C5;
  --line: rgba(38, 53, 74, .12);
  --line-soft: rgba(38, 53, 74, .08);

  /* Type
     Trajan Pro = Adobe-licensed (not webfont-distributable). Cinzel is the
     closest free Trajan analog on Google Fonts.
     Aptos = Microsoft Office (also not webfont-distributable). Inter is
     the closest free Aptos analog on Google Fonts.
     Stacking the brand names first means users with them installed see
     the real fonts; everyone else gets the close fallbacks. */
  --font-display: "Trajan Pro", "Trajan Pro 3", "Cinzel", "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --font-serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --font-sans: "Aptos", "Aptos Display", "Inter", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Layout */
  --container: 1180px;
  --container-narrow: 880px;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  --radius: 2px;
  --radius-lg: 4px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--navy);
  text-decoration: none;
  transition: color .2s var(--ease), opacity .2s var(--ease);
}
a:hover { color: var(--powder-blue); }

/* Display headings — Trajan-style classical capitals */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--navy);
  margin: 0 0 var(--space-4);
  line-height: 1.18;
  text-transform: uppercase;
  letter-spacing: .14em;
}

h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  letter-spacing: .16em;
}
h2 {
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  letter-spacing: .14em;
}
h3 {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  letter-spacing: .14em;
}

/* Italic / softer heading variant — Cormorant Garamond italic */
.h-italic,
h2.h-italic,
h3.h-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: .005em;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
}

h4 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: .82rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--navy);
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: .68rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .36em;
  color: var(--navy);
  margin-bottom: var(--space-4);
}

.eyebrow--center { display: block; text-align: center; }

.lede {
  font-family: var(--font-serif);
  font-size: clamp(1.18rem, 1.95vw, 1.45rem);
  line-height: 1.6;
  font-style: italic;
  color: var(--navy);
}

.serif { font-family: var(--font-serif); }
.display { font-family: var(--font-display); text-transform: uppercase; letter-spacing: .18em; }

/* ============================================================
   Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding: var(--space-9) 0; position: relative; }
.section--tight { padding: var(--space-7) 0; }

.section--cream { background: var(--cream); }
.section--cream-deep { background: var(--cream-deep); }
.section--blush { background: var(--cream-deep); }

.section--powder {
  background: var(--powder-blue);
  color: var(--paper);
}
.section--powder h1,
.section--powder h2,
.section--powder h3,
.section--powder h4 { color: var(--paper); }
.section--powder .eyebrow { color: var(--paper); opacity: .92; }

.section--navy {
  background: var(--navy);
  color: var(--cream);
}
.section--navy h1,
.section--navy h2,
.section--navy h3,
.section--navy h4 { color: var(--cream); }
.section--navy .eyebrow { color: var(--blush); }
.section--navy a { color: var(--blush); }

.text-center { text-align: center; }

/* ============================================================
   Header / Navigation
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(249, 243, 238, .94);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line-soft);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  gap: var(--space-6);
}

/* Brand lockup — uses the actual logo crest + script wordmark images */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--navy);
  line-height: 1;
}
.brand:hover { opacity: .9; }

.brand__crest {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  object-fit: contain;
}

.brand__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.brand__wordmark {
  height: 30px;
  width: auto;
  display: block;
}

.brand__wordmark--lg {
  height: 48px;
  width: auto;
  display: block;
}

.brand__tagline {
  font-family: var(--font-display);
  font-size: .58rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: .8;
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: var(--space-6); }
.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0; padding: 0;
}
.nav__link {
  font-family: var(--font-display);
  font-size: .76rem;
  font-weight: 400;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--navy);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav__link:hover,
.nav__link[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--navy);
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .32em;
  text-transform: uppercase;
  padding: 17px 36px;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--cream);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover {
  background: var(--powder-blue);
  border-color: var(--powder-blue);
  color: var(--navy);
}

.btn--ghost {
  background: transparent;
  color: var(--navy);
}
.btn--ghost:hover {
  background: var(--navy);
  color: var(--cream);
}

.btn--light {
  background: var(--cream);
  color: var(--navy);
  border-color: var(--cream);
}
.btn--light:hover {
  background: var(--blush);
  border-color: var(--blush);
  color: var(--navy);
}

.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--navy);
}
.link-arrow::after {
  content: "→";
  transition: transform .2s var(--ease);
}
.link-arrow:hover::after { transform: translateX(4px); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  padding: var(--space-10) 0 var(--space-9);
  text-align: center;
  background:
    radial-gradient(circle at 80% 8%, rgba(152, 178, 197, .38), transparent 50%),
    radial-gradient(circle at 12% 85%, rgba(152, 178, 197, .35), transparent 55%),
    var(--cream);
  overflow: hidden;
}
.hero__inner {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
}

.hero__crest {
  width: clamp(120px, 18vw, 200px);
  height: auto;
  margin: 0 auto var(--space-5);
  display: block;
}

.hero__wordmark {
  width: clamp(280px, 60vw, 620px);
  height: auto;
  margin: 0 auto var(--space-5);
  display: block;
}

.hero__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--powder-blue-deep);
  margin: var(--space-5) auto var(--space-4);
  max-width: 460px;
}
.hero__divider::before,
.hero__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: .65;
}
.hero__divider__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--navy);
  flex: 0 0 6px;
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(.85rem, 1.3vw, 1rem);
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0;
}
.hero__tagline + .hero__tagline { margin-top: .35em; }

.hero__cta {
  margin-top: var(--space-7);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

.hero__accent {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: .22;
  width: clamp(180px, 22vw, 280px);
  height: auto;
}
.hero__accent--bl { bottom: 4%; left: 3%; }
.hero__accent--br { bottom: 6%; right: 4%; }
.hero__inner { position: relative; z-index: 1; }

/* ============================================================
   Page header (interior pages)
   ============================================================ */
.page-header {
  padding: var(--space-9) 0 var(--space-7);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(152, 178, 197, .22), transparent 60%),
    var(--cream);
  position: relative;
}

.page-header__crest {
  width: clamp(80px, 9vw, 110px);
  height: auto;
  margin: 0 auto var(--space-4);
  display: block;
}

.page-header h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--navy);
  margin-bottom: var(--space-4);
  font-size: clamp(1.8rem, 4.2vw, 3rem);
}

.page-header__sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--navy);
  letter-spacing: .03em;
  margin-top: -.4rem;
  margin-bottom: 0;
  opacity: .85;
}

.page-header .lede { max-width: 640px; margin: var(--space-5) auto 0; }
.page-header .small-divider { margin: var(--space-5) auto 0; }

/* ============================================================
   Dividers
   ============================================================ */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--powder-blue-deep);
  margin: var(--space-6) auto;
  max-width: 380px;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: .55;
}
.divider__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--navy);
  flex: 0 0 6px;
}
.divider__mark {
  width: 32px;
  height: auto;
  flex: 0 0 32px;
  opacity: .85;
}

.small-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--powder-blue-deep);
  max-width: 180px;
  margin: 0 auto;
}
.small-divider::before,
.small-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: .5;
}
.small-divider__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--navy);
  flex: 0 0 6px;
}

/* ============================================================
   Service cards
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-7);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  padding: var(--space-7) var(--space-6);
  text-align: center;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--powder-blue);
  box-shadow: 0 24px 60px -34px rgba(38, 53, 74, .22);
}

.card__accent {
  width: 110px;
  height: 110px;
  margin: 0 auto var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card__accent img { width: 100%; height: 100%; object-fit: contain; }

.card h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: clamp(1.4rem, 2.1vw, 1.7rem);
  color: var(--navy);
}
.card__cta { margin-top: auto; padding-top: var(--space-3); }

a.card { color: inherit; }
a.card:hover { color: var(--navy); }

/* ============================================================
   Two-column "split" layout
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}
.split--reverse > :first-child { order: 2; }

.split__media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--powder-blue);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.split__media--blush { background: var(--cream-deep); }
.split__media--navy { background: var(--navy); }
.split__media--cream { background: var(--cream-deep); }
.split__media--navy { background: var(--navy); }

.split__media__art {
  position: relative;
  z-index: 1;
  width: 70%;
  max-width: 380px;
}
.split__media__art img { width: 100%; height: auto; }

.split__media__art--invert img {
  /* Recolor the navy line art to cream when placed on dark backgrounds */
  filter: brightness(0) invert(96%) sepia(15%) saturate(440%) hue-rotate(338deg) brightness(101%) contrast(96%);
}

/* ============================================================
   Quote / testimonial
   ============================================================ */
.quote {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  padding: var(--space-7) var(--space-6);
  position: relative;
}
.quote::before {
  content: "\201C";
  font-family: var(--font-serif);
  font-size: 5rem;
  line-height: 1;
  color: var(--blush);
  position: absolute;
  top: 12px;
  left: 20px;
}
.quote__body {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  line-height: 1.65;
  font-style: italic;
  color: var(--navy);
  margin: 0 0 var(--space-5);
  position: relative;
}
.quote__cite {
  font-family: var(--font-display);
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--warm-gray);
}
.quote__cite strong {
  color: var(--navy);
  font-weight: 400;
  display: block;
  margin-bottom: 4px;
  letter-spacing: .28em;
}

/* ============================================================
   Form
   ============================================================ */
.form {
  display: grid;
  gap: var(--space-5);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); }

.label {
  font-family: var(--font-display);
  font-size: .66rem;
  font-weight: 400;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--navy);
}

.input,
.textarea,
.select {
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid rgba(38, 53, 74, .2);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  width: 100%;
}
.input:focus,
.textarea:focus,
.select:focus {
  outline: 0;
  border-color: var(--powder-blue);
  box-shadow: 0 0 0 3px rgba(152, 178, 197, .25);
}
.textarea { min-height: 140px; resize: vertical; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: var(--cream);
  padding: var(--space-8) 0 var(--space-6);
  position: relative;
}


.site-footer .brand,
.site-footer .brand:hover { color: var(--cream); }
.site-footer .brand__tagline { color: var(--blush); opacity: 1; }
.site-footer .brand__wordmark {
  /* On dark navy background, invert/lighten the navy wordmark to cream */
  filter: brightness(0) invert(96%) sepia(15%) saturate(440%) hue-rotate(338deg) brightness(101%) contrast(96%);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-7);
  margin-bottom: var(--space-7);
  padding-top: var(--space-4);
}
.site-footer h4 {
  color: var(--blush);
  font-family: var(--font-display);
  font-size: .76rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.site-footer ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.site-footer a {
  color: var(--cream);
  font-size: .92rem;
  opacity: .85;
}
.site-footer a:hover { opacity: 1; color: var(--blush); }

.site-footer__bottom {
  border-top: 1px solid rgba(249, 243, 238, .18);
  padding-top: var(--space-5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-display);
  font-size: .68rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  opacity: .75;
}

/* ============================================================
   Feature list
   ============================================================ */
.feature-list {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}
.feature-list li {
  position: relative;
  padding-left: 28px;
  font-size: 1rem;
  line-height: 1.65;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 14px;
  height: 1px;
  background: var(--navy);
}

.feature-list--circle li::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  top: 9px;
}

/* ============================================================
   Instagram feed placeholder
   ============================================================ */
.ig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-7);
}
.ig-tile {
  aspect-ratio: 1;
  background: var(--cream-deep);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ig-tile:nth-child(3n)   { background: var(--powder-blue); }
.ig-tile:nth-child(3n+1) { background: var(--blush); }
.ig-tile:nth-child(4n)   { background: var(--cream-deep); }
.ig-tile:nth-child(5n)   { background: var(--navy); color: var(--cream); }
.ig-tile img {
  width: 60%;
  height: 60%;
  opacity: .55;
  object-fit: contain;
}

/* ============================================================
   Prose
   ============================================================ */
.prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.8;
}
.prose h2 {
  margin-top: var(--space-7);
  font-family: var(--font-serif);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}
.prose h3 {
  margin-top: var(--space-6);
  color: var(--navy);
  font-family: var(--font-display);
  font-size: .78rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  font-weight: 400;
}
.prose p + p { margin-top: 1em; }

/* ============================================================
   Brand asset helpers
   ============================================================ */
.brand-crest-decor {
  display: block;
  margin: 0 auto;
  width: clamp(100px, 12vw, 150px);
  height: auto;
}

.brand-monogram-decor {
  display: block;
  margin: 0 auto;
  width: clamp(80px, 10vw, 120px);
  height: auto;
  opacity: .85;
}

.nyc-accent {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .site-header__inner { padding: var(--space-4) 0; gap: var(--space-3); }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line-soft);
    padding: var(--space-5) var(--space-6);
  }
  .nav.is-open { display: block; }
  .nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-4);
  }

  .brand__crest { width: 42px; height: 42px; flex: 0 0 42px; }
  .brand__wordmark { height: 24px; }
  .brand__tagline { font-size: .52rem; }

  .split { grid-template-columns: 1fr; gap: var(--space-6); }
  .split--reverse > :first-child { order: 0; }

  .field--row { grid-template-columns: 1fr; }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }

  .section { padding: var(--space-8) 0; }
  .hero { padding: var(--space-9) 0 var(--space-8); }
}

@media (max-width: 520px) {
  .container { padding: 0 var(--space-5); }
  .site-footer__grid { grid-template-columns: 1fr; }
  .brand__tagline { display: none; }
  .brand__wordmark { height: 22px; }
  .hero__accent { display: none; }
}
