/* ============================================================
   OWNEST — 03. LAYOUT
   Site header, mobile drawer, page banner, breadcrumbs, footer.
   Depends on: tokens.css, base.css
============================================================ */

/* ------------------------------------------------ Header --- */
.site-header{
  position:sticky; top:0; z-index:60;
  background:rgba(247,242,232,.9);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.site-header.is-scrolled{ box-shadow:0 6px 20px -18px rgba(43,33,25,.5); }

.nav{
  display:flex; align-items:center; justify-content:space-between;
  gap:18px;
  padding:18px var(--gutter);
  max-width:var(--container);
  margin:0 auto;
}

/* Brand lockup — a single SVG traced from the supplied logo master, so the
   mark and wordmark can never drift out of proportion. Size it by height. */
.logo{ display:flex; align-items:center; flex-shrink:0; }
.logo img{ height:26px; width:auto; }
@media (max-width:420px){ .logo img{ height:23px; } }

.nav-links{
  display:flex; align-items:center; gap:30px;
  font-size:15px; font-weight:500; color:var(--ink-soft);
}
.nav-links a{ position:relative; padding:6px 0; transition:color var(--t-fast) var(--ease); }
.nav-links a::after{
  content:""; position:absolute; left:0; right:0; bottom:0;
  height:1.5px; background:var(--taupe-dark);
  transform:scaleX(0); transform-origin:left;
  transition:transform var(--t-base) var(--ease);
}
.nav-links a:hover{ color:var(--ink); }
.nav-links a:hover::after{ transform:scaleX(1); }
.nav-links a.is-active{ color:var(--ink); font-weight:600; }
.nav-links a.is-active::after{ transform:scaleX(1); }

.nav-cta{ display:flex; align-items:center; gap:14px; }

/* TH / EN switch — stays visible on phones next to the menu button */
.lang-switch{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:40px; height:36px; padding:0 10px;
  border:1px solid var(--line); border-radius:var(--radius-md);
  font-size:13px; font-weight:600; letter-spacing:.04em; color:var(--ink);
  text-decoration:none; transition:border-color var(--t-fast), background var(--t-fast);
}
.lang-switch:hover{ border-color:var(--taupe); background:var(--white); }

.nav-toggle{
  display:none;
  background:none; border:1px solid var(--line); padding:8px;
  border-radius:var(--radius-sm);
  color:var(--ink); line-height:0;
}
.nav-toggle svg{ width:22px; height:22px; }

/* ------------------------------------------ Mobile drawer -- */
.drawer{
  position:fixed; inset:0; z-index:70;
  visibility:hidden;
}
.drawer.is-open{ visibility:visible; }

.drawer-scrim{
  position:absolute; inset:0;
  background:rgba(43,33,25,.42);
  opacity:0; transition:opacity var(--t-base) var(--ease);
}
.drawer.is-open .drawer-scrim{ opacity:1; }

.drawer-panel{
  position:absolute; top:0; right:0; bottom:0;
  width:min(86vw, 340px);
  background:var(--cream);
  border-left:1px solid var(--line);
  padding:22px;
  display:flex; flex-direction:column; gap:8px;
  transform:translateX(100%);
  transition:transform var(--t-base) var(--ease);
  overflow-y:auto;
}
.drawer.is-open .drawer-panel{ transform:none; }

.drawer-head{
  display:flex; align-items:center; justify-content:space-between;
  padding-bottom:16px; margin-bottom:8px;
  border-bottom:1px solid var(--line);
}
.drawer-close{
  background:none; border:1px solid var(--line);
  border-radius:var(--radius-sm); padding:7px; color:var(--ink); line-height:0;
}
.drawer-close svg{ width:20px; height:20px; }

.drawer-links{ display:flex; flex-direction:column; }
.drawer-links a{
  padding:14px 4px;
  font-size:16px; font-weight:500;
  border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between;
}
.drawer-links a.is-active{ color:var(--taupe-dark); font-weight:600; }
.drawer-links svg{ width:15px; height:15px; opacity:.5; }

.drawer-foot{ margin-top:auto; padding-top:22px; display:grid; gap:10px; }
.drawer-foot .contact-line{ font-size:13px; color:var(--ink-soft); }

body.no-scroll{ overflow:hidden; }

@media (max-width: 940px){
  .nav-links{ display:none; }
  .nav-toggle{ display:block; }
  .nav-cta .btn{ display:none; }
}

/* ------------------------------------------- Page banner --- */
.page-banner{
  padding:56px 0 44px;
  border-bottom:1px solid var(--line);
  background:var(--cream);
}
.page-banner h1{ font-size:clamp(30px,4vw,44px); margin-top:10px; max-width:18ch; }
.page-banner p{ margin-top:16px; max-width:60ch; color:var(--ink-soft); font-size:16.5px; line-height:1.7; }

.page-banner--media{
  position:relative; border-bottom:0; padding:0;
  overflow:hidden;
}
.page-banner--media .banner-media{
  position:relative; height:clamp(280px, 42vw, 420px);
}
.page-banner--media .banner-media img{ width:100%; height:100%; object-fit:cover; }
/* Two passes: a horizontal wash so the copy column stays legible on any
   photo, plus a light vertical one so the breadcrumb never sits on a
   blown-out sky. */
.page-banner--media .banner-media::after{
  content:""; position:absolute; inset:0;
  background:
    linear-gradient(180deg, rgba(28,21,15,.42) 0%, rgba(28,21,15,0) 42%),
    linear-gradient(90deg, rgba(43,33,25,.90) 0%, rgba(43,33,25,.66) 52%, rgba(43,33,25,.30) 100%);
}
.page-banner--media .banner-copy{
  position:absolute; inset:0; display:flex; align-items:center; z-index:1;
  padding:34px 0;
}
.page-banner--media .breadcrumb{ margin-bottom:6px; }
.page-banner--media .banner-copy .wrap{ width:100%; }
.page-banner--media h1{ color:var(--cream); }
.page-banner--media p{ color:var(--on-dark); }
.page-banner--media .eyebrow{ color:var(--taupe-pale); }
.page-banner--media .breadcrumb,
.page-banner--media .breadcrumb a{ color:#CDBFA9; }
.page-banner--media .breadcrumb a:hover{ color:var(--cream); }
.page-banner--media .breadcrumb [aria-current]{ color:var(--cream); }

/* ------------------------------------------- Breadcrumbs --- */
.breadcrumb{
  display:flex; align-items:center; flex-wrap:wrap; gap:8px;
  font-size:13px; color:var(--ink-soft);
}
.breadcrumb a:hover{ color:var(--taupe-dark); }
.breadcrumb .sep{ opacity:.5; }
.breadcrumb [aria-current]{ color:var(--ink); font-weight:500; }

/* ------------------------------------------------ Footer --- */
.site-footer{
  background:var(--ink);
  color:var(--on-dark);
  padding:64px 0 28px;
}
.footer-grid{
  display:grid;
  grid-template-columns:1.5fr 1fr 1fr 1.2fr;
  gap:40px;
  padding-bottom:40px;
  border-bottom:1px solid rgba(216,204,184,.18);
}
.footer-logo{ display:flex; align-items:center; margin-bottom:14px; }
.footer-logo img{ height:25px; width:auto; }
.footer-tag{ font-size:13px; color:#B7A98F; line-height:1.7; max-width:34ch; }

.footer-col h4{ font-size:13px; font-weight:600; color:var(--cream); margin:0 0 16px; }
.footer-col ul{ display:flex; flex-direction:column; gap:10px; }
.footer-col a{ font-size:13.5px; color:#C9BBA6; transition:color var(--t-fast) var(--ease); }
.footer-col a:hover{ color:var(--cream); }
.footer-col .contact-item{ display:flex; gap:9px; align-items:flex-start; font-size:13.5px; color:#C9BBA6; line-height:1.6; }
.footer-col .contact-item svg{ width:15px; height:15px; margin-top:3px; flex-shrink:0; color:var(--taupe); }

.footer-social{ display:flex; gap:10px; margin-top:18px; }
.footer-social a{
  width:34px; height:34px; border-radius:var(--radius-sm);
  border:1px solid rgba(216,204,184,.22);
  display:flex; align-items:center; justify-content:center;
  transition:background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.footer-social a:hover{ background:rgba(216,204,184,.12); border-color:rgba(216,204,184,.4); }
.footer-social svg{ width:16px; height:16px; }

.footer-bottom{
  display:flex; justify-content:space-between; align-items:center;
  padding-top:24px; font-size:12.5px; color:var(--on-dark-soft);
  flex-wrap:wrap; gap:10px;
}
.footer-bottom nav{ display:flex; gap:18px; flex-wrap:wrap; }
.footer-bottom a:hover{ color:var(--cream); }

@media (max-width:900px){
  .footer-grid{ grid-template-columns:1fr 1fr; gap:32px; }
}
@media (max-width:560px){
  .footer-grid{ grid-template-columns:1fr; }
}

/* --------------------------------------------- Back to top - */
.to-top{
  position:fixed; right:22px; bottom:22px; z-index:50;
  width:42px; height:42px;
  border-radius:var(--radius-md);
  background:var(--ink); color:var(--cream);
  border:0; display:flex; align-items:center; justify-content:center;
  box-shadow:var(--shadow-card);
  opacity:0; pointer-events:none; transform:translateY(8px);
  transition:opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.to-top.is-visible{ opacity:1; pointer-events:auto; transform:none; }
.to-top svg{ width:18px; height:18px; }
