/* ------------------------------------------------------------
   Rob Cerveny — Real Estate
   Placeholder brand: "Front Door Orange" on warm cream, ink text.
   ------------------------------------------------------------ */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-var.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("../fonts/caveat-var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --cream: #fbf5ec;
  --paper: #fffaf2;
  --ink: #1e2430;
  --ink-soft: #4a5263;
  --door: #e8562a;        /* brand placeholder: front-door orange */
  --door-deep: #c9431b;
  --butter: #f6c94c;
  --sage: #d6e5cd;
  --grass: #a9c79f;
  --sky: #f5e6cc;
  --glass: #c4dde8;

  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Comic Sans MS", cursive;

  --gutter: clamp(16px, 4vw, 48px);
  --radius: 22px;
  --shadow: 6px 6px 0 var(--ink);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--door);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ------------------------------------------------------------
   Nav
   ------------------------------------------------------------ */

.site-header {
  position: relative;
  z-index: 20;
  padding: 18px var(--gutter);
}

.nav {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  position: relative;
  display: inline-block;
  padding: 10px 14px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
}

/* little hand-drawn squiggle that draws in under the link */
.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 6' preserveAspectRatio='none'%3E%3Cpath d='M1 4 Q 5 1 10 3.5 T 20 3.5 T 30 3.5 T 39 3' fill='none' stroke='%23e8562a' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav-links a:not(.nav-cta):hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.nav-cta {
  margin-left: 8px;
  background: var(--ink);
  color: var(--cream);
  border: 2px solid var(--ink);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-cta:hover { background: var(--door); color: var(--ink); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
}
.menu-toggle-bars {
  position: relative;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease;
}
.menu-toggle-bars::before { top: -5px; }
.menu-toggle-bars::after { top: 5px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
}

/* faint blueprint-ish dot grid */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(30, 36, 48, 0.09) 1.2px, transparent 1.3px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
}

.hero-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 80px);
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(16px, 3vh, 40px);
  min-height: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 7px 14px 7px 8px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.eyebrow-wave {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--butter);
  border-radius: 50%;
  transform-origin: 70% 80%;
  animation: wave 2.6s ease-in-out 0.8s infinite;
}
.eyebrow-wave svg { width: 15px; height: 15px; }

@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(16deg); }
  20%, 40% { transform: rotate(-10deg); }
}

.hero-title {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.scribble {
  position: relative;
  display: inline-block;
  color: var(--door);
  white-space: nowrap;
}
.scribble svg {
  position: absolute;
  left: -4%;
  bottom: -0.16em;
  width: 108%;
  height: 0.32em;
  overflow: visible;
}
.scribble path {
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: draw 0.9s cubic-bezier(0.6, 0, 0.3, 1) 0.5s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.hero-lede {
  max-width: 34rem;
  margin: 24px 0 0;
  font-weight: 400;
  line-height: 1.5;
  font-size: clamp(1.05rem, 1.25vw, 1.18rem);
  color: var(--ink-soft);
  text-wrap: pretty;
}
.hero-lede em {
  font-style: normal;
  font-family: var(--hand);
  font-size: 1.3em;
  line-height: 1;
  color: var(--ink);
}

.hero-actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.2s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-primary { background: var(--door); color: var(--ink); }
.btn-primary:hover { background: #f0683f; }
.btn-secondary { background: var(--paper); color: var(--ink); }
.btn-secondary:hover { background: var(--butter); }

.hand-note {
  font-family: var(--hand);
  font-weight: 600;
  line-height: 1.05;
  color: var(--ink);
}

.actions-note {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 14px 0 0 18px;
  font-size: 1.45rem;
  transform: rotate(-2deg);
}
.actions-note svg { width: 44px; height: 34px; flex: none; margin-top: -10px; }

.hero-small {
  margin: 26px 0 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.hero-small a {
  font-weight: 700;
  color: var(--ink);
  text-decoration-color: var(--door);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.hero-small a:hover { color: var(--door-deep); }

/* ---------- Illustration card ---------- */

.hero-art {
  position: relative;
  justify-self: center;
  width: 100%;
  max-width: 560px;
  max-height: 100%;
}

.art-card {
  position: relative;
  aspect-ratio: 50 / 46;
  max-height: min(64vh, 520px);
  margin-left: auto;
  background: var(--sky);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 10px 10px 0 var(--ink);
  overflow: hidden;
  transform: rotate(1.5deg);
}
.art-card svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.smoke { animation: smoke 4s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom center; }
@keyframes smoke {
  0%, 100% { transform: translateY(0) scaleY(1); opacity: 0.9; }
  50% { transform: translateY(-6px) scaleY(1.08); opacity: 0.55; }
}
.cloud { animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translateX(28px); } }

/* rotating "average guy" sticker */
.sticker {
  position: absolute;
  top: -34px;
  left: -40px;
  z-index: 2;
  width: clamp(112px, 11vw, 148px);
  aspect-ratio: 1;
  filter: drop-shadow(4px 4px 0 var(--ink));
}
.sticker-spin { animation: spin 22s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sticker-text {
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.cat-note {
  position: absolute;
  top: calc(100% + 10px);
  left: 22%;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin: 0;
  font-size: 1.5rem;
  transform: rotate(-3deg);
}
.cat-note svg { width: 40px; height: 36px; margin-bottom: 8px; }

/* ---------- Bottom ticker ---------- */

.ticker {
  position: relative;
  flex: none;
  border-top: 2.5px solid var(--ink);
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 38s linear infinite;
}
.ticker-group {
  display: flex;
  flex: none;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ticker-group li {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 0 14px 22px;
  font-size: 0.98rem;
  font-weight: 600;
  white-space: nowrap;
}
.ticker-group li::after {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--door);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* entrance */
.rise { opacity: 0; transform: translateY(14px); animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.rise-1 { animation-delay: 0.05s; }
.rise-2 { animation-delay: 0.12s; }
.rise-3 { animation-delay: 0.2s; }
.rise-4 { animation-delay: 0.28s; }
.rise-5 { animation-delay: 0.36s; }
.pop { opacity: 0; transform: translateY(18px) rotate(1.5deg) scale(0.97); animation: pop 0.8s cubic-bezier(0.2, 0.8, 0.2, 1.15) 0.2s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes pop { to { opacity: 1; transform: rotate(1.5deg); } }

/* ------------------------------------------------------------
   Placeholder pages (buyers / sellers / about / contact)
   ------------------------------------------------------------ */

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
.page-main {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px var(--gutter) 80px;
  text-align: center;
}
.page-main h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}
.page-main p { max-width: 32rem; margin: 18px auto 0; color: var(--ink-soft); font-size: 1.1rem; }
.page-main .hand-note { margin-top: 28px; font-size: 1.6rem; transform: rotate(-2deg); }
.page-main .btn { margin-top: 32px; }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-height: 760px) and (min-width: 961px) {
  .hero-title { font-size: clamp(2.6rem, 5.6vw, 5rem); }
  .hero-lede { margin-top: 16px; }
  .hero-actions { margin-top: 24px; }
  .hero-small { display: none; }
}

@media (max-width: 960px) {
  .nav-links {
    position: absolute;
    top: calc(100% - 4px);
    left: var(--gutter);
    right: var(--gutter);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .nav-links a { display: block; padding: 14px 16px; font-size: 1.1rem; }
  .nav-links a:not(.nav-cta)::after { display: none; }
  .nav-links a:not(.nav-cta):hover { background: var(--cream); }
  .nav-cta { margin: 6px 0 0; text-align: center; }
  .menu-toggle { display: inline-flex; }

  /* stacked: copy on top, illustration fills whatever height is left */
  .hero { height: auto; min-height: 100vh; min-height: 100svh; }
  .hero-main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 36px;
    padding-top: 20px;
    padding-bottom: 28px;
  }
  .hero-copy { flex: none; }
  .hero-art {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 640px;
    min-height: 240px;
    margin: 0 auto;
  }
  .art-card { flex: 1; aspect-ratio: auto; max-height: none; margin: 0; }
  .cat-note { display: none; }
}

@media (max-width: 560px) {
  .site-header { padding-top: 14px; padding-bottom: 14px; }
  .hero-main { padding-top: 6px; gap: 30px; padding-bottom: 22px; }
  .eyebrow { margin-bottom: 16px; font-size: 0.82rem; }
  .hero-title { font-size: clamp(2.6rem, 12vw, 3.4rem); }
  .hero-lede { margin-top: 14px; font-size: 1rem; }
  .hero-actions { gap: 10px; margin-top: 22px; }
  .btn { flex: 1 1 0; justify-content: center; padding: 13px 12px; font-size: 1rem; }
  .actions-note { margin: 10px 0 0 8px; font-size: 1.25rem; }
  .hero-small { display: none; }
  .hero-art { min-height: 200px; }
  .art-card { box-shadow: 6px 6px 0 var(--ink); }
  .sticker { top: -26px; left: -10px; width: 84px; }
  .ticker-group li { padding-top: 11px; padding-bottom: 11px; font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ticker-track { animation: none; }
}
