/* ============================================================
   TREY Coffee Roasters — landing page styles
   Implemented from "TREY Landing Page.dc.html" (Claude Design).
   ============================================================ */

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--font-sans);
}

a { color: var(--espresso); }
a:hover {
  color: var(--coffee);
  text-decoration-color: var(--cream-line);
  text-underline-offset: 3px;
}

img { max-width: 100%; }

@keyframes trey-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes trey-drift { 0%, 100% { translate: 0 0; } 50% { translate: 0 8px; } }
@keyframes trey-ticker { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }

.float-slow { animation: trey-float 7s ease-in-out infinite; }
.drift-slow { animation: trey-drift 6s ease-in-out infinite; }
.drift-slow--alt { animation-duration: 7.3s; animation-delay: 0.8s; }

@media (prefers-reduced-motion: reduce) {
  .float-slow, .drift-slow, .ticker__run { animation: none !important; }
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--page-width);
  margin: 0 auto;
  padding-left: clamp(20px, 4vw, 52px);
  padding-right: clamp(20px, 4vw, 52px);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(32px, 5vw, 80px);
}

.copy-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 560px;
}

/* ---------- Type patterns ---------- */
.kicker {
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--coffee);
}
.kicker--on-dark { color: var(--leaf); }

.display-title {
  margin: 0;
  font-size: clamp(38px, 5.4vw, 80px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--espresso);
}
.display-title strong { font-weight: 700; }
.display-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
}

.h2-title {
  margin: 0;
  font-weight: 500;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--espresso);
}
.h2-title strong { font-weight: 700; }
.h2-title em { font-family: var(--font-serif); font-style: italic; }

.section-sub {
  margin: 20px 0 0;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--coffee);
}

.lede {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--coffee);
}

.body-copy { margin: 0; font-size: 18px; line-height: 1.5; letter-spacing: -0.02em; color: var(--espresso); }
.body-copy--soft { color: var(--coffee); }

.script-note {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
  color: var(--espresso);
}

/* Hairline list rows */
.rule-list { display: flex; flex-direction: column; border-top: 1px solid var(--cream-line); }
.rule-list > li, .rule-list > div {
  padding: 14px 0;
  border-bottom: 1px solid var(--cream-line);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.rule-list--tight > li, .rule-list--tight > div { padding: 13px 0; font-size: 17px; }
.rule-list--compact > li, .rule-list--compact > div { padding: 12px 0; font-size: 16px; }
ul.rule-list { margin: 0; padding: 0; list-style: none; }

/* Numbered hairline rows */
.numbered-list { display: flex; flex-direction: column; border-top: 1px solid var(--cream-line); margin: 0; padding: 0; list-style: none; }
.numbered-list > li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--cream-line);
}
.numbered-list .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--coffee);
  min-width: 28px;
}
.numbered-list .label {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--espresso);
}

/* Dark-surface variants */
.on-dark .numbered-list { border-top-color: var(--hairline-on-dark); }
.on-dark .numbered-list > li { border-bottom-color: var(--hairline-on-dark); padding: 15px 0; }
.on-dark .numbered-list .num { font-size: 15px; color: var(--leaf); }
.on-dark .numbered-list .label { color: #ffffff; }

/* ---------- Sticky nav ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(255, 246, 220, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--cream-line);
  padding: 14px clamp(20px, 4vw, 52px);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.site-nav.is-top {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 44px; height: 44px; display: block; }
.brand .wordmark {
  font-weight: 700;
  font-style: italic;
  font-size: 18px;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: var(--espresso);
}

.site-nav .links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.5vw, 32px);
  flex-wrap: wrap;
  margin-left: auto;
}
.nav-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--espresso);
}
.nav-link:hover { color: var(--coffee); }

.nav-cta {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cta-dark);
  color: #ffffff;
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background 0.2s ease;
}
.nav-cta:hover { background: var(--espresso); color: #ffffff; }
.nav-cta svg { width: 14px; height: 14px; }

/* Hamburger toggle — hidden on desktop; DS NavBar menu glyph on mobile */
.nav-toggle {
  display: none;
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  flex-direction: column;
  gap: 7px;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 28px;
  height: 2.5px;
  background: var(--espresso);
  transition: transform 0.3s ease, opacity 0.2s ease, width 0.3s ease;
}
.nav-toggle span:nth-child(3) { width: 20px; }

@media (max-width: 720px) {
  .site-nav { padding: 10px 16px; }
  .nav-toggle { display: flex; }

  /* Menu open: solid nav even over the hero */
  .site-nav.menu-open {
    background: rgba(255, 246, 220, 0.98);
    border-bottom-color: var(--cream-line);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  /* Hamburger → X */
  .menu-open .nav-toggle span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
  .menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .nav-toggle span:nth-child(3) { width: 28px; transform: translateY(-9.5px) rotate(-45deg); }

  /* Dropdown panel */
  .site-nav .links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 4px 20px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 246, 220, 0.98);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--cream-line);
    box-shadow: var(--shadow-pop);
  }
  .menu-open .links { display: flex; animation: nav-drop 0.25s ease; }
  .site-nav .nav-link {
    padding: 15px 0;
    border-bottom: 1px solid var(--cream-line);
    font-size: 15px;
  }
  .site-nav .nav-cta { margin-top: 18px; justify-content: center; }
}

@keyframes nav-drop {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .menu-open .links { animation: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: 0 0 var(--radius-section) var(--radius-section);
  background: #e8d9bd url("../assets/photos/hero-toast.jpg") center / cover no-repeat;
  padding: clamp(120px, 11vw, 170px) clamp(20px, 4vw, 52px) 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 246, 220, 0.28), rgba(255, 246, 220, 0) 40%);
  pointer-events: none;
}

.hero__titleblock { position: relative; z-index: 2; text-align: center; }
.hero__title { margin: 0; color: var(--espresso); }
.hero__title .line-sans {
  display: block;
  font-weight: 700;
  font-size: clamp(56px, 10vw, 150px);
  line-height: 0.95;
  letter-spacing: -0.05em;
}
.hero__title .line-serif {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(50px, 9vw, 136px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.hero__tagline {
  margin: 24px auto 0;
  max-width: 560px;
  font-size: clamp(17px, 1.8vw, 22px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--coffee);
}

.hero__stage { position: relative; z-index: 1; margin-top: clamp(48px, 6vw, 96px); }
.hero__panel { display: flex; flex-direction: column; gap: 12px; width: min(380px, 84vw); }
.hero__frame {
  height: clamp(400px, 44vw, 500px);
  border: 2px solid #ffffff;
  border-radius: 28px;
}
.hero__caption {
  background: #ffffff;
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero__caption img { width: 40px; height: 40px; flex: none; display: block; }
.hero__caption .t { margin: 0; font-size: 16px; font-weight: 500; letter-spacing: -0.02em; color: var(--espresso); }
.hero__caption .s { margin: 2px 0 0; font-size: 14px; letter-spacing: -0.02em; color: var(--coffee); }

.hero__cta {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

/* ---------- Pill button (DS Button) ---------- */
.btn-pill {
  display: inline-flex;
  border-radius: var(--radius-pill);
  padding: var(--ring-offset);
  outline: 1px dashed currentColor;
  outline-offset: -0.5px;
  text-decoration: none;
}
.btn-pill__inner {
  height: 68px;
  border-radius: var(--radius-pill);
  padding: 24px 32px;
  box-sizing: border-box;
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  transition: filter 160ms ease;
}
.btn-pill:hover .btn-pill__inner { filter: brightness(0.94); }
.btn-pill__inner svg { flex: none; }

.btn-pill--moss { color: var(--moss-deep); }
.btn-pill--moss .btn-pill__inner { background: var(--moss-deep); color: #ffffff; }
.btn-pill--leaf { color: var(--leaf); }
.btn-pill--leaf .btn-pill__inner { background: var(--leaf); color: var(--espresso); }
.btn-pill--white { color: #ffffff; }
.btn-pill--white .btn-pill__inner { background: #ffffff; color: var(--espresso); }

/* Outline pill (consultancy CTA) */
.btn-outline {
  text-decoration: none;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--moss-deep);
  color: var(--moss-deep);
  border-radius: var(--radius-pill);
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-top: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-outline:hover { background: var(--moss-deep); color: #ffffff; }
.btn-outline svg { width: 14px; height: 14px; }

/* ---------- Sticker badge (DS StickerBadge) ---------- */
.sticker-badge { position: relative; }
.sticker-badge__fill {
  position: absolute;
  inset: 0;
  -webkit-mask-image: url("../assets/star-badge.svg");
  mask-image: url("../assets/star-badge.svg");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  background: linear-gradient(180deg, #e6eaae 0%, var(--leaf-deep) 100%);
}
.sticker-badge__text {
  position: absolute;
  inset: 0 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-sans);
  font-weight: 700;
  font-style: italic;
  line-height: 1.2;
  color: var(--espresso);
}

.hero__badge {
  position: absolute;
  right: -104px;
  bottom: 96px;
  z-index: 4;
  width: 150px;
  height: 150px;
  transform: rotate(-15deg);
  --leaf: #f0f250;
  --leaf-deep: #f0f250;
}
.hero__badge .sticker-badge__fill { background: linear-gradient(180deg, #e6eaae 0%, var(--leaf-deep) 100%); }
.hero__badge .sticker-badge__text { font-size: 16.5px; }
@media (max-width: 720px) {
  .hero__badge { right: -34px; bottom: 40px; width: 110px; height: 110px; }
  .hero__badge .sticker-badge__text { font-size: 12px; }
}

/* ---------- Ticker ribbon (DS TickerRibbon) ---------- */
.ticker-slot {
  position: relative;
  z-index: 6;
  height: 0;
  --leaf: #f0f250;
  --leaf-deep: #e3e64a;
}
.ticker-slot__pos { position: absolute; left: -60px; right: -60px; top: -58px; }

.ticker { overflow: hidden; margin: -40px -20px; padding: 40px 0; pointer-events: none; }
.ticker__band {
  background: var(--leaf);
  padding: 22px 0;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.ticker--up .ticker__band { transform: rotate(-3deg) scale(1.04); }
.ticker--down .ticker__band { transform: rotate(3deg) scale(1.04); }
.ticker__run {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--espresso);
  animation: trey-ticker 40s linear infinite;
}

/* ---------- Annotation (DS Annotation) ---------- */
.annotation {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  width: max-content;
}
.annotation--flip { align-items: flex-end; }
.annotation__text {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 18px;
  line-height: 20px;
  color: var(--espresso);
  white-space: nowrap;
}
.annotation--on-dark .annotation__text { color: #ffffff; }
.annotation__arrow { width: 52px; height: 73px; transform: rotate(-25deg); }
.annotation--flip .annotation__arrow { transform: scaleX(-1) rotate(25deg); }
.annotation--on-dark .annotation__arrow { filter: invert(1); }

/* ---------- Product panel (DS ProductPanel) ---------- */
.product-panel {
  width: 340px;
  max-width: 88vw;
  border-radius: var(--radius-panel);
  background: #ffffff;
  padding: 6px;
  box-sizing: border-box;
  box-shadow: var(--shadow-card);
}
.product-panel__photo {
  height: 425px;
  border-radius: calc(var(--radius-panel) - 4px);
  background: var(--placeholder) center / cover no-repeat;
  overflow: hidden;
}
.product-panel__row {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 10px;
}
.product-panel__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--moss-deep);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-panel__copy { display: flex; flex-direction: column; gap: 6px; }
.product-panel__title { font-weight: 500; font-size: 18px; line-height: 20px; letter-spacing: -0.02em; color: var(--espresso); }
.product-panel__sub { font-weight: 400; font-size: 18px; line-height: 20px; letter-spacing: -0.02em; color: var(--espresso); }

/* ---------- Sections ---------- */
.section { padding-top: clamp(72px, 9vw, 140px); padding-bottom: clamp(72px, 9vw, 140px); }
.section--ruled { border-top: 1px solid var(--cream-line); }

/* Dark moss sections with grid texture */
.section-dark {
  background-color: var(--moss-deep);
  background-image:
    linear-gradient(var(--texture-grid-line) 0.5px, transparent 0.5px),
    linear-gradient(90deg, var(--texture-grid-line) 0.5px, transparent 0.5px);
  background-size: var(--texture-grid-size) var(--texture-grid-size);
  color: #ffffff;
}
.section-dark .display-title { color: #ffffff; }
.section-dark .section-sub { color: rgba(255, 255, 255, 0.75); }
.section-dark .body-copy { color: #ffffff; }
.section-dark .body-copy--soft { color: rgba(255, 255, 255, 0.75); }
.section-dark .script-note { color: var(--leaf); }

/* Decorative floating cutouts */
.cutout { position: absolute; pointer-events: none; }
@media (max-width: 900px) {
  .cutout--cup { opacity: 0.3; }
}

/* Consultancy image grid */
.consult-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-content: start;
}
.consult-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 24px;
  display: block;
}
.consult-grid img:nth-child(even) { margin-top: 36px; }
.consult-grid .rule-list { grid-column: 1 / -1; margin-top: 18px; }

/* Café section */
.cafe-photo { position: relative; margin-top: clamp(40px, 5vw, 72px); }
.cafe-photo > img {
  width: 100%;
  height: clamp(320px, 40vw, 560px);
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  display: block;
}
.cafe-photo__note {
  position: absolute;
  right: clamp(12px, 4vw, 56px);
  bottom: -28px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: var(--shadow-pop);
  padding: 18px 24px;
  transform: rotate(6deg);
}
.cafe-photo__note p {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--coffee);
}

/* Community word ladder */
.word-ladder { display: flex; flex-direction: column; gap: 6px; justify-self: center; }
.word-ladder p {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.25;
}

/* Proof rows */
.proof-list { display: flex; flex-direction: column; }
.proof-list__row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--cream-line);
}
.proof-list__row:first-child { border-top: 1px solid var(--cream-line); }
.proof-list__row img {
  width: 72px;
  height: 72px;
  flex: none;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}
.proof-list__row p { margin: 0; font-size: 18px; font-weight: 500; letter-spacing: -0.02em; color: var(--espresso); }

/* Contact cards */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 18px;
  max-width: 1100px;
  margin: clamp(48px, 6vw, 72px) auto 0;
}
.contact-card {
  text-decoration: none;
  background: var(--moss-raised);
  border-radius: 24px;
  padding: 24px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.2s ease;
}
.contact-card:hover { background: #4a5c36; color: #ffffff; }
.contact-card .num { font-family: var(--font-serif); font-style: italic; font-size: 15px; color: var(--leaf); }
.contact-card .label { font-size: 17px; font-weight: 500; letter-spacing: -0.02em; }

/* Footer row */
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--hairline-on-dark);
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: 24px;
}
.footer-row .brand-mini { display: flex; align-items: center; gap: 12px; }
.footer-row .brand-mini img { width: 40px; height: 40px; display: block; filter: invert(1); }
.footer-row .brand-mini .wordmark {
  font-weight: 700;
  font-style: italic;
  font-size: 16px;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: #ffffff;
}
.footer-row .legal { margin: 0; font-size: 14px; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.55); }
