:root {
  --bg: #f5f1ea;
  --bg-soft: #fbf8f3;
  --panel: #fffdf9;
  --panel-2: #f1ebe0;
  --line: #e3d6c3;
  --line-strong: #cfb285;
  --text: #1f241e;
  --muted: #766c5d;
  --accent: #bc8530;
  --accent-deep: #87601f;
  --shadow: 0 18px 40px rgba(40, 30, 18, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fbf9f5 0%, var(--bg) 48%, #f8f3eb 100%);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.site-header, .site-footer {
  width: min(1400px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-header {
  padding: 26px 0 18px;
  border-bottom: 1px solid rgba(172, 149, 113, 0.22);
}
.brand { display: inline-flex; flex-direction: column; gap: 5px; }
.brand strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem; font-weight: 600; letter-spacing: .06em;
}
.brand span {
  font-size: .68rem; letter-spacing: .34em; color: rgba(31,36,30,.52);
}
.main-nav { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.main-nav a {
  font-size: .82rem; font-weight: 600; letter-spacing: .08em; padding: 12px 0;
  color: rgba(31,36,30,.75); border-bottom: 2px solid transparent;
}
.main-nav a.active { color: var(--text); border-color: var(--accent); }
.header-cta, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 999px; transition: .25s ease; font-weight: 600;
}
.header-cta {
  padding: 14px 22px; background: var(--accent); color: #fff; box-shadow: var(--shadow);
}
.header-cta:hover { transform: translateY(-2px); background: var(--accent-deep); }

main { width: min(1400px, calc(100% - 48px)); margin: 0 auto; }
.hero {
  display: grid; grid-template-columns: 1.06fr .94fr; align-items: center; gap: 56px;
  padding: 42px 0 24px;
}
.eyebrow, .mini-label {
  margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .32em; color: var(--accent); text-transform: uppercase;
}
.hero-copy h1, .section-head h2, .compact-title h2 {
  margin: 14px 0 10px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600; line-height: .92;
}
.hero-copy h1 { font-size: clamp(4.3rem, 8vw, 7.2rem); letter-spacing: -.03em; }
.hero-copy h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 600; margin: 0 0 16px; }
.hero-copy .hero-text { max-width: 650px; font-size: 1.04rem; line-height: 1.9; color: var(--muted); margin: 0 0 30px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.btn { padding: 15px 28px; font-size: .95rem; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.65); border-color: var(--line); }
.btn-ghost:hover { background: #fff; transform: translateY(-2px); }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 560px; }
.hero-stats div {
  padding-left: 18px; border-left: 1px solid var(--line);
}
.hero-stats strong {
  display: block; font-family: 'Cormorant Garamond', serif; font-size: 2.6rem; line-height: 1;
}
.hero-stats span { color: var(--muted); font-size: .9rem; line-height: 1.5; }

.hero-visual { position: relative; min-height: 620px; display: flex; align-items: center; justify-content: center; }
.hero-glow {
  position: absolute; inset: 14% 12% auto 12%; height: 70%;
  background: radial-gradient(circle at center, rgba(188,133,48,.24), rgba(188,133,48,0) 68%);
  filter: blur(18px);
}
.hero-panel {
  position: relative; width: min(100%, 680px); border-radius: 36px; overflow: hidden;
  background: linear-gradient(145deg, #fff 0%, #f2ebdf 100%); box-shadow: 0 40px 80px rgba(45,31,10,.14);
  padding: 24px;
}
.hero-panel > img {
  width: 100%; border-radius: 22px; object-fit: cover; border: 1px solid rgba(255,255,255,.55);
}
.floating-card, .hero-note {
  position: absolute; background: rgba(255,255,255,.9); backdrop-filter: blur(12px); border: 1px solid rgba(207,178,133,.36);
  box-shadow: var(--shadow); border-radius: 22px;
}
.floating-card {
  padding: 16px 18px; display: grid; gap: 6px; min-width: 190px;
}
.floating-card.top-left { left: -10px; top: 48px; }
.floating-card.bottom-left { left: 26px; bottom: 26px; }
.floating-card.top-right { right: -10px; top: 90px; }
.floating-card strong { font-size: 1rem; }
.floating-card span { color: var(--muted); font-size: .86rem; line-height: 1.55; }
.hero-note {
  right: 32px; bottom: -18px; padding: 18px 22px; max-width: 230px; line-height: 1.6; color: var(--muted);
}
.hero-note b { color: var(--text); }

.benefits-bar {
  margin: 14px 0 34px; padding: 14px; border: 1px solid rgba(172,149,113,.18); background: rgba(255,255,255,.55);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; border-radius: 28px;
}
.benefits-bar article {
  display: flex; gap: 14px; align-items: center; background: rgba(255,255,255,.62); border: 1px solid rgba(172,149,113,.16);
  padding: 18px 20px; border-radius: 20px; transition: .25s ease;
}
.benefits-bar article:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.benefits-bar span {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.15rem;
  color: var(--accent); border: 1px solid rgba(188,133,48,.3); background: #fff;
}
.benefits-bar b { display: block; margin-bottom: 4px; font-size: 1rem; }
.benefits-bar small { color: var(--muted); font-size: .84rem; line-height: 1.5; }

.section { padding: 46px 0 20px; }
.section-head, .compact-title {
  display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px;
}
.section-head h2, .compact-title h2 { font-size: clamp(3rem, 5vw, 4.6rem); }
.section-head p, .compact-title p { margin-bottom: 10px; }
.section-head a { color: var(--accent-deep); font-weight: 600; white-space: nowrap; }
.section-sub { max-width: 700px; color: var(--muted); line-height: 1.8; margin: 0; }

.lab-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
}
.lab-card, .tool-card, .group-card, .tip-card {
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(250,247,241,.88));
  border: 1px solid rgba(172,149,113,.2); border-radius: 26px; box-shadow: var(--shadow);
}
.lab-card {
  display: flex; flex-direction: column; gap: 16px; padding: 22px; min-height: 280px;
}
.card-top, .tool-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.icon-badge {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: .95rem; font-weight: 800;
  background: linear-gradient(145deg, rgba(188,133,48,.16), rgba(188,133,48,.06)); color: var(--accent-deep); border: 1px solid rgba(188,133,48,.25);
}
.icon-badge.soft { width: 54px; height: 54px; border-radius: 16px; }
.status-pill, .tool-tag, .group-card span {
  display: inline-flex; padding: 9px 12px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .05em;
  background: rgba(188,133,48,.12); color: var(--accent-deep); border: 1px solid rgba(188,133,48,.15);
}
.card-copy h3, .tool-copy h3, .group-card h3 { margin: 10px 0 10px; font-family: 'Cormorant Garamond', serif; font-size: 2rem; }
.card-copy p, .tool-copy p, .group-card p, .tip-card p { color: var(--muted); line-height: 1.8; margin: 0; }
.card-note {
  margin-top: auto; padding-top: 16px; border-top: 1px dashed rgba(172,149,113,.28); color: var(--accent-deep); font-size: .9rem;
}

.recommended-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px;
}
.tool-card {
  padding: 22px; display: flex; flex-direction: column; gap: 16px; min-height: 290px; transition: .28s ease;
}
.tool-card:hover { transform: translateY(-5px); box-shadow: 0 24px 48px rgba(49,38,20,.12); }
.tool-meta {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 16px; border-top: 1px solid rgba(172,149,113,.18); font-size: .86rem; color: var(--muted);
}
.tool-meta a { font-weight: 700; color: var(--accent-deep); }

.workflow-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.group-card { padding: 22px; }
.group-card h3 { font-size: 1.85rem; }

.tip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tip-card { padding: 24px; }
.tip-card h3 { margin: 10px 0 12px; font-family: 'Cormorant Garamond', serif; font-size: 2rem; }

.contact-cta {
  margin: 58px 0 30px; padding: 28px 30px; border-radius: 28px; background: linear-gradient(90deg, rgba(246,240,230,.95), rgba(255,255,255,.9));
  border: 1px solid rgba(172,149,113,.2); display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.contact-cta h2 { margin: 0 0 8px; font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem, 3vw, 3rem); }
.contact-cta p { margin: 0; color: var(--muted); }
.contact-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 14px; flex-shrink: 0; }
.contact-actions .btn { white-space: nowrap; }

.site-footer {
  padding: 30px 0 38px; border-top: 1px solid rgba(172,149,113,.22); margin-top: 28px;
}
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer nav a { font-size: .82rem; font-weight: 600; letter-spacing: .06em; color: rgba(31,36,30,.7); }
.site-footer p { color: rgba(31,36,30,.56); font-size: .84rem; text-align: right; }

@media (max-width: 1200px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: auto; }
  .benefits-bar, .lab-grid, .recommended-grid, .workflow-grid, .tip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .site-header, .site-footer, main { width: min(100%, calc(100% - 28px)); }
  .site-header, .site-footer, .contact-cta { flex-direction: column; align-items: flex-start; }
  .main-nav { gap: 14px; }
  .hero-copy h1 { font-size: 3.7rem; }
  .hero-stats, .benefits-bar, .lab-grid, .recommended-grid, .workflow-grid, .tip-grid { grid-template-columns: 1fr; }
  .hero-panel { padding: 16px; }
  .floating-card.top-left, .floating-card.top-right, .hero-note, .floating-card.bottom-left { position: static; margin-top: 12px; }
  .section-head, .compact-title { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 1100px) { .contact-cta { flex-direction: column; align-items: flex-start; } .contact-actions { flex-wrap: wrap; } }

/* V3.6: lightweight illustrative previews for all app cards */
.lab-card,.tool-card{overflow:hidden;}
.app-preview{margin:-22px -22px 2px;aspect-ratio:16/9;overflow:hidden;background:#233445;border-radius:25px 25px 0 0;}
.app-preview img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s ease;}
.lab-card:hover .app-preview img,.tool-card:hover .app-preview img{transform:scale(1.035);}
@media(prefers-reduced-motion:reduce){.app-preview img{transition:none!important;transform:none!important;}}

/* V3.7: identity assets displayed without crop or hover zoom */
.recommended-grid .app-preview{background:#172331;}
.recommended-grid .app-preview img{object-fit:contain;transform:none!important;}


/* V4.7 MOBILE — compact 2-column app browsing */
@media(max-width:820px){
  .site-header{width:calc(100% - 28px);min-height:64px;height:auto;padding:10px 0;display:grid;grid-template-columns:1fr auto;gap:9px}.site-header .brand strong{font-size:22px}.site-header .brand span{display:none}.header-cta{font-size:.72rem;padding:10px 13px}
  .main-nav{grid-column:1/-1;display:flex;flex-wrap:nowrap;gap:17px;overflow-x:auto;white-space:nowrap;padding:3px 0 4px;scrollbar-width:none}.main-nav::-webkit-scrollbar{display:none}.main-nav a{flex:0 0 auto;font-size:.72rem}
  .hero{padding-top:34px;gap:20px}.hero-copy h1{font-size:3.3rem}.hero-copy h2{font-size:1.8rem}.hero-copy .hero-text{font-size:.92rem;line-height:1.65;margin-bottom:20px}.hero-actions{gap:9px;margin-bottom:20px}.hero-actions .btn{padding:11px 14px;font-size:.8rem}
  .hero-stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.hero-stats div{padding:10px}.hero-stats strong{font-size:1.6rem}.hero-stats span{font-size:.68rem}
  .hero-visual{display:none}.benefits-bar{grid-template-columns:repeat(2,minmax(0,1fr))}
  .section{padding-top:34px}.section-head h2,.compact-title h2{font-size:2.25rem}.section-sub{font-size:.88rem}
  .lab-grid,.recommended-grid,.workflow-grid,.tip-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px!important}
  .lab-card,.tool-card,.group-card,.tip-card{padding:12px!important;min-width:0}.card-copy h3,.tool-copy h3,.group-card h3,.tip-card h3{font-size:1.35rem!important;line-height:1.05}.card-copy p,.tool-copy p,.group-card p,.tip-card p{font-size:.76rem;line-height:1.5}.app-preview{min-height:100px}.status-pill,.tool-tag,.group-card span{font-size:.6rem}
}


/* V4.7 FIX5 — APPS mobile hero compact */
@media(max-width:820px){
  .site-header{min-height:58px;padding:8px 0}.site-header .brand strong{font-size:20px}.header-cta{padding:8px 11px;font-size:.66rem}
  .main-nav{gap:15px;padding:2px 0 3px}.main-nav a{font-size:.68rem}
  .hero{padding-top:22px;gap:12px}.hero-copy .eyebrow{margin-bottom:7px}.hero-copy h1{font-size:3rem;line-height:.92;margin-bottom:8px}.hero-copy h2{font-size:1.55rem;line-height:1.08;margin-bottom:10px}.hero-copy .hero-text{font-size:.84rem;line-height:1.48;margin-bottom:14px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
  .hero-actions{gap:8px;margin-bottom:14px}.hero-actions .btn{padding:9px 12px;font-size:.72rem;min-height:38px}
  .hero-stats{gap:6px}.hero-stats div{padding:8px 7px}.hero-stats strong{font-size:1.45rem}.hero-stats span{font-size:.62rem;line-height:1.3}
  .benefits-bar{margin-top:14px}.section{padding-top:26px}
}


/* V4.7 FIX6 — APPS mobile recommended cards ~50% shorter */
@media(max-width:820px){
  .recommended-grid .tool-card{
    padding:8px!important;
    gap:7px!important;
    min-height:0!important;
    border-radius:18px;
  }
  .recommended-grid .app-preview{
    margin:-8px -8px 0!important;
    min-height:0!important;
    height:78px!important;
    aspect-ratio:auto!important;
    border-radius:17px 17px 0 0!important;
  }
  .recommended-grid .app-preview img{
    width:100%;height:100%;object-fit:contain!important;
  }
  .recommended-grid .tool-head{gap:6px!important;}
  .recommended-grid .icon-badge.soft{
    width:38px!important;height:38px!important;border-radius:12px!important;font-size:.72rem!important;
  }
  .recommended-grid .tool-tag{
    padding:6px 8px!important;font-size:.52rem!important;line-height:1.05!important;
  }
  .recommended-grid .tool-copy .mini-label{
    margin:1px 0 2px!important;font-size:.55rem!important;letter-spacing:.18em!important;
  }
  .recommended-grid .tool-copy h3{
    margin:2px 0 3px!important;font-size:1.18rem!important;line-height:1!important;
  }
  .recommended-grid .tool-copy p:not(.mini-label){
    font-size:.68rem!important;line-height:1.32!important;
    display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
  }
  .recommended-grid .tool-meta{
    margin-top:2px!important;padding-top:7px!important;gap:6px!important;font-size:.65rem!important;line-height:1.1!important;
  }
  .recommended-grid .tool-meta a{font-size:.66rem!important;}
}


/* V4.7 FIX7 — APPS mobile layout refinements */
@media(max-width:820px){
  /* feature icons: keep them perfectly round and not squeezed */
  .benefits-bar article{align-items:flex-start!important;gap:10px!important;}
  .benefits-bar article span{
    width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;
    flex:0 0 42px!important;flex-shrink:0!important;border-radius:50%!important;
    font-size:.95rem!important;line-height:1!important;
  }
  .benefits-bar b{font-size:.92rem!important;line-height:1.15!important;}
  .benefits-bar small{font-size:.72rem!important;line-height:1.35!important;}

  /* lab cards: shorten strongly to feel similar to recommended cards */
  .lab-grid .lab-card{
    padding:8px!important;gap:7px!important;min-height:0!important;border-radius:18px;
  }
  .lab-grid .app-preview{
    margin:-8px -8px 0!important;min-height:0!important;height:78px!important;
    aspect-ratio:auto!important;border-radius:17px 17px 0 0!important;
  }
  .lab-grid .app-preview img{width:100%;height:100%;object-fit:cover!important;}
  .lab-grid .card-top{gap:6px!important;}
  .lab-grid .icon-badge{
    width:38px!important;height:38px!important;border-radius:12px!important;font-size:.72rem!important;
  }
  .lab-grid .status-pill{
    padding:6px 8px!important;font-size:.52rem!important;line-height:1.05!important;
  }
  .lab-grid .card-copy .mini-label{
    margin:1px 0 2px!important;font-size:.55rem!important;letter-spacing:.18em!important;
  }
  .lab-grid .card-copy h3{
    margin:2px 0 3px!important;font-size:1.12rem!important;line-height:1!important;
  }
  .lab-grid .card-copy p:not(.mini-label){
    font-size:.68rem!important;line-height:1.32!important;
    display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
  }
  .lab-grid .card-note{
    margin-top:2px!important;padding-top:7px!important;font-size:.66rem!important;line-height:1.28!important;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  }

  /* tips: 3 cards on one horizontal row */
  .tip-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;}
  .tip-card{padding:12px!important;border-radius:18px!important;min-width:0;}
  .tip-card .mini-label{font-size:.58rem!important;letter-spacing:.16em!important;}
  .tip-card h3{margin:6px 0 8px!important;font-size:1.02rem!important;line-height:1.02!important;}
  .tip-card p:not(.mini-label){font-size:.68rem!important;line-height:1.34!important;}
}


/* V4.7 FIX8 — APPS horizontal contact buttons */
@media(max-width:820px){
  .contact-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:8px!important;
  }
  .contact-actions .btn{
    width:100%!important;min-width:0!important;max-width:none!important;
    padding:10px 8px!important;min-height:40px!important;
    font-size:.73rem!important;gap:6px!important;white-space:nowrap!important;
  }
}


/* V4.7 FIX9 — APPS colored contact buttons + single-line footer nav */
.contact-actions .btn:nth-child(1){
  background:linear-gradient(135deg,#c28a2e,#a86d15)!important;
  color:#fff!important;border-color:transparent!important;
}
.contact-actions .btn:nth-child(2){
  background:linear-gradient(135deg,#29a7ff,#0c7fe6)!important;
  color:#fff!important;border-color:transparent!important;
}
.contact-actions .btn:nth-child(3){
  background:linear-gradient(135deg,#4d74c9,#3055a5)!important;
  color:#fff!important;border-color:transparent!important;
}

@media(max-width:820px){
  .site-footer nav{
    width:100%!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    justify-content:space-between!important;
    gap:8px!important;
  }
  .site-footer nav a{
    font-size:.67rem!important;
    letter-spacing:.03em!important;
    white-space:nowrap!important;
  }
}
