/* =========================================================
   Labcraft homepage sections
   Structure ported from the MagicPatterns study; every colour
   comes from the Atelier design system, not that project's
   near-miss palette.
   ========================================================= */

/* --- shell + vertical rhythm ---------------------------- */
.lc-shell{
  max-width:1400px;
  margin-inline:auto;
  padding-inline:clamp(22px,5vw,40px);
}
.lc-section{
  padding-block:clamp(56px,8vw,112px);
  position:relative;
}

/* tonal rhythm: parchment -> cream -> parchment(grain) -> leather -> sage */
.lc-section--parchment{background:var(--lc-parchment);}
.lc-section--cream    {background:var(--lc-cream);}
.lc-section--leather  {background:var(--lc-leather);}
.lc-section--sage     {background:var(--lc-sage);}

/* --- paper fibre grain (technique from the study) -------- */
.lc-grain{position:relative;}
.lc-grain::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  opacity:.34;mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}
.lc-grain > *{position:relative;z-index:1;}

/* --- deckle (torn) edge ---------------------------------- */
.lc-deckle-top{
  -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='60' preserveAspectRatio='none'%3E%3Cpath d='M0 60h1200V20c-40-6-80 4-120-2s-80-12-120-6-80 14-120 8-80-14-120-12-80 12-120 10-80-12-120-8-80 12-120 8-80-10-120-4z' fill='%23000'/%3E%3C/svg%3E");
  mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='60' preserveAspectRatio='none'%3E%3Cpath d='M0 60h1200V20c-40-6-80 4-120-2s-80-12-120-6-80 14-120 8-80-14-120-12-80 12-120 10-80-12-120-8-80 12-120 8-80-10-120-4z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-size:100% 100%;mask-size:100% 100%;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
}

/* --- section head: heading left, link right, baseline ---- */
.lc-sechead{
  display:flex;flex-direction:column;gap:14px;
  align-items:flex-start;
}
@media (min-width:640px){
  .lc-sechead{flex-direction:row;align-items:flex-end;justify-content:space-between;gap:26px;}
}
.lc-sechead--ruled{
  border-bottom:1px solid var(--lc-blush);
  padding-bottom:22px;
}
.lc-sechead__eyebrow{
  font-family:var(--lc-body);
  font-size:11px;letter-spacing:.2em;text-transform:uppercase;
  color:var(--lc-sage);margin:0 0 10px;
}
.lc-sechead__title{
  font-family:var(--lc-display);font-weight:400;
  font-size:clamp(27px,4vw,46px);line-height:1.12;
  color:var(--lc-leather);margin:0;max-width:20ch;text-wrap:balance;
}
.lc-link{
  font-family:var(--lc-body);
  font-size:12px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--lc-leather);text-decoration:none;white-space:nowrap;
  border-bottom:1px solid var(--lc-gold);padding-bottom:4px;
  transition:color .3s ease,border-color .3s ease;
}
.lc-link:hover,.lc-link:focus-visible{color:var(--lc-tan);border-color:var(--lc-tan);}

/* --- collections row ------------------------------------- */
.lc-collections{
  display:grid;gap:clamp(18px,2.4vw,28px);margin-top:clamp(30px,4vw,52px);
  grid-template-columns:repeat(2,minmax(0,1fr));
}
@media (min-width:900px){ .lc-collections{grid-template-columns:repeat(4,minmax(0,1fr));} }
.lc-collection{display:block;text-decoration:none;group:collection;}
.lc-collection__media{
  aspect-ratio:4/5;overflow:hidden;border:1px solid var(--lc-blush);
  background:linear-gradient(155deg,#F7EFE2 0%,#E9DAC5 100%);
  position:relative;
}
.lc-collection__media img{width:100%;height:100%;object-fit:cover;display:block;
  transition:transform .8s cubic-bezier(.23,1,.32,1);}
.lc-collection:hover .lc-collection__media img{transform:scale(1.04);}
.lc-collection__name{
  font-family:var(--lc-display);font-size:clamp(19px,2.2vw,23px);
  color:var(--lc-charcoal);margin:14px 0 4px;
}
.lc-collection__tag{
  font-family:var(--lc-body);font-size:13px;line-height:1.6;
  color:#7C6A57;margin:0;max-width:30ch;
}
.lc-collection__count{
  font-family:var(--lc-body);font-size:10.5px;letter-spacing:.16em;
  text-transform:uppercase;color:var(--lc-sage);margin:8px 0 0;
}

/* --- editorial split (Process) ---------------------------- */
.lc-split{
  display:grid;gap:clamp(28px,5vw,72px);align-items:start;
  grid-template-columns:minmax(0,1fr);
}
@media (min-width:900px){
  .lc-split{grid-template-columns:minmax(0,6fr) minmax(0,5fr);}
  .lc-split--reverse > .lc-split__media{order:2;}
}
.lc-split__media{
  aspect-ratio:4/3;overflow:hidden;border:1px solid var(--lc-blush);
  background:linear-gradient(150deg,#EFE4D4 0%,#DFCDB4 55%,#CDB79A 100%);
  position:relative;
}
.lc-split__media img{width:100%;height:100%;object-fit:cover;display:block;}

/* numbered process steps: hairline-separated rows */
.lc-steps{margin:clamp(22px,3vw,34px) 0 0;padding:0;list-style:none;}
.lc-step{
  display:flex;gap:clamp(16px,2.4vw,26px);
  border-top:1px solid rgba(107,66,38,.22);
  padding-block:clamp(18px,2.4vw,26px);
}
.lc-step:last-child{border-bottom:1px solid rgba(107,66,38,.22);}
.lc-step__n{
  font-family:var(--lc-display);font-size:clamp(19px,2.4vw,25px);
  color:var(--lc-gold);line-height:1;flex:0 0 auto;min-width:2ch;
  font-variant-numeric:tabular-nums;
}
.lc-step__t{
  font-family:var(--lc-display);font-size:clamp(19px,2.2vw,23px);
  color:var(--lc-charcoal);margin:0 0 6px;line-height:1.25;
}
.lc-step__d{
  font-family:var(--lc-body);font-size:14px;line-height:1.7;
  color:#7C6A57;margin:0;max-width:52ch;
}

/* --- the dark pause band (Quote) -------------------------- */
.lc-quote{
  max-width:56ch;margin-inline:auto;text-align:center;
}
.lc-quote__mark{
  font-family:var(--lc-display);font-size:54px;line-height:1;
  color:var(--lc-gold);opacity:.55;margin:0 0 6px;
}
.lc-quote__text{
  font-family:var(--lc-display);font-style:italic;font-weight:300;
  font-size:clamp(23px,3.4vw,38px);line-height:1.35;
  color:#F6EEE2;margin:0;text-wrap:balance;
}
.lc-quote__cite{
  display:block;margin-top:clamp(20px,3vw,28px);
  font-family:var(--lc-body);font-style:normal;
  font-size:11px;letter-spacing:.18em;text-transform:uppercase;
  color:rgba(232,213,192,.72);
}

/* --- newsletter ------------------------------------------- */
.lc-news{
  display:grid;gap:clamp(24px,4vw,64px);align-items:center;
  grid-template-columns:minmax(0,1fr);
}
@media (min-width:900px){ .lc-news{grid-template-columns:minmax(0,1fr) minmax(0,1fr);} }
.lc-news__title{
  font-family:var(--lc-display);font-weight:400;
  font-size:clamp(26px,3.6vw,42px);line-height:1.14;
  color:var(--lc-parchment);margin:0;text-wrap:balance;
}
.lc-news__sub{
  font-family:var(--lc-body);font-size:14.5px;line-height:1.7;
  color:#F1EDE4;margin:14px 0 0;max-width:44ch;
}
.lc-news__form{display:flex;flex-wrap:wrap;gap:0;max-width:460px;}
.lc-news__form input[type="email"]{
  flex:1 1 200px;min-width:0;
  border:1px solid rgba(253,246,236,.55);border-right:none;
  background:rgba(253,246,236,.14);color:var(--lc-parchment);
  padding:15px 18px;font-family:var(--lc-body);font-size:14px;border-radius:0;
}
.lc-news__form input[type="email"]::placeholder{color:rgba(253,246,236,.72);}
.lc-news__form input[type="email"]:focus-visible{outline:2px solid var(--lc-gold);outline-offset:-2px;}
.lc-news__form button{
  border:1px solid var(--lc-charcoal);background:var(--lc-charcoal);
  color:var(--lc-parchment);font-family:var(--lc-body);
  font-size:12px;font-weight:500;letter-spacing:.15em;text-transform:uppercase;
  padding:15px 26px;cursor:pointer;border-radius:0;
  transition:background .3s ease,border-color .3s ease;
}
.lc-news__form button:hover,.lc-news__form button:focus-visible{
  background:var(--lc-leather);border-color:var(--lc-leather);
}
.lc-news__note{
  font-family:var(--lc-body);font-size:11.5px;color:rgba(253,246,236,.8);
  margin:12px 0 0;letter-spacing:.02em;
}

/* --- WooCommerce product grid inside our sections --------- */
.lc-products .woocommerce ul.products,
.lc-products ul.products{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:clamp(22px,3vw,34px) clamp(16px,2.4vw,30px);
  margin:clamp(30px,4vw,50px) 0 0 !important;
  padding:0 !important;list-style:none;
}
@media (min-width:900px){
  .lc-products ul.products{grid-template-columns:repeat(4,minmax(0,1fr));}
}
.lc-products ul.products::before,
.lc-products ul.products::after{display:none !important;}
.lc-products ul.products li.product{
  width:auto !important;margin:0 !important;float:none !important;text-align:left;
}
.lc-products ul.products li.product img{
  border:1px solid var(--lc-blush);margin-bottom:14px;
}
.lc-products ul.products li.product .woocommerce-loop-product__title{
  font-family:var(--lc-display) !important;font-size:clamp(18px,2vw,22px) !important;
  color:var(--lc-charcoal);padding:0 !important;margin:0 0 5px !important;
}
.lc-products ul.products li.product .price{
  font-family:var(--lc-body);font-size:15px;font-weight:700;
  color:var(--lc-leather);font-variant-numeric:tabular-nums;
}
.lc-products ul.products li.product .button{margin-top:10px;}

/* empty-catalogue notice, shown until products import */
.lc-empty{
  margin-top:clamp(28px,4vw,44px);
  border:1px dashed var(--lc-blush);
  padding:clamp(24px,4vw,40px);
  text-align:center;
}
.lc-empty p{
  font-family:var(--lc-body);font-size:13.5px;color:#8B7A66;margin:0;
}

/* --- reveal on scroll ------------------------------------- */
.lc-reveal{opacity:0;transform:translateY(16px);
  transition:opacity .75s cubic-bezier(.23,1,.32,1),transform .75s cubic-bezier(.23,1,.32,1);}
.lc-reveal.is-in{opacity:1;transform:none;}
@media (prefers-reduced-motion:reduce){
  .lc-reveal{opacity:1;transform:none;transition:none;}
  .lc-collection__media img{transition:none;}
}

/* --- adapters: make core/columns behave like our grids ---- */
.lc-collections.wp-block-columns{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:clamp(18px,2.4vw,28px);
  margin-top:clamp(30px,4vw,52px);
}
@media (min-width:900px){
  .lc-collections.wp-block-columns{grid-template-columns:repeat(4,minmax(0,1fr));}
}
.lc-collections.wp-block-columns > .wp-block-column{
  flex-basis:auto !important;margin:0 !important;min-width:0;
}
.lc-collections .wp-block-image{margin:0 0 14px;}
.lc-collections .wp-block-image img{
  aspect-ratio:4/5;object-fit:cover;width:100%;
  border:1px solid var(--lc-blush);display:block;
}
.lc-collections h3{
  font-family:var(--lc-display);font-weight:400;
  font-size:clamp(19px,2.2vw,23px);color:var(--lc-charcoal);
  margin:0 0 5px;
}
.lc-collections p{
  font-family:var(--lc-body);font-size:13px;line-height:1.6;
  color:#7C6A57;margin:0;
}

.lc-splitcols.wp-block-columns{
  gap:clamp(28px,5vw,72px);align-items:flex-start;
}
@media (min-width:900px){
  .lc-splitcols.wp-block-columns{flex-wrap:nowrap !important;}
}
.lc-splitcols .wp-block-image{margin:0;}
.lc-splitcols .wp-block-image img{
  aspect-ratio:4/3;object-fit:cover;width:100%;
  border:1px solid var(--lc-blush);display:block;
}

/* placeholder media used until real photography exists */
.lc-ph{
  aspect-ratio:4/5;border:1px solid var(--lc-blush);
  background:linear-gradient(155deg,#F7EFE2 0%,#E9DAC5 100%);
  position:relative;overflow:hidden;
}
.lc-ph--wide{aspect-ratio:4/3;}
.lc-ph::after{
  content:"";position:absolute;left:50%;top:50%;
  width:26%;aspect-ratio:1;transform:translate(-50%,-50%) rotate(45deg);
  border:1px solid rgba(142,158,137,.5);
}
.lc-ph__label{
  position:absolute;left:0;right:0;bottom:12px;text-align:center;
  font-family:var(--lc-body);font-size:9.5px;letter-spacing:.18em;
  text-transform:uppercase;color:rgba(124,106,87,.62);
}

/* dark/sage sections: neutralise Kadence heading colour */
.lc-section--leather h2,.lc-section--leather h3,
.lc-section--sage h2,.lc-section--sage h3{color:var(--lc-parchment);}
.lc-section--sage p{color:#F1EDE4;}

/* WP gives block paragraphs a default margin; it drops the section-head
   link below the heading baseline. */
.lc-sechead > p,
.lc-sechead > .wp-block-paragraph{margin:0;}
.lc-sechead > .wp-block-group > p:last-child,
.lc-sechead > .wp-block-group > h2:last-child{margin-bottom:0;}

.lc-sechead > .wp-block-group{margin-block:0;}
