/*
Theme Name: Abbysan
Theme URI: https://abbysan.com
Author: Abbysan / Dr. Abhishek Agrawal
Description: Custom theme for Abbysan — a private movement & longevity practice in Phuket. Quiet-luxury design system (Fraunces / Mulish / DM Mono). Built to preserve all existing URLs and Yoast SEO. Global chrome lives here; page-specific section CSS lives in each template.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: abbysan
*/

/* ============================================================
   GLOBAL DESIGN SYSTEM — shared by every page (chrome + base).
   Page-specific section CSS stays in each template's <style>.
   ============================================================ */

:root {
  --paper: #F4EFE7; --paper-2: #FAF6EF; --stone: #E7DFD3; --linen: #EDE6D9;
  --oak: #2A2118; --ink: #211C16; --ink-soft: #463F35; --taupe: #736A5C; --taupe-l: #A89E90;
  --line: #E0D7C9; --line-d: #D5CBBA; --plum: #6E5B7E; --plum-deep: #50425E;
  --hero-1: #1A140D; --hero-2: #2B2118;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --shadow-soft: 0 40px 90px -55px rgba(33,28,22,0.5);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: 'Mulish', sans-serif; font-weight: 300; line-height: 1.85; letter-spacing: 0.005em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 120; background-image: var(--grain); background-size: 160px 160px; opacity: 0.05; mix-blend-mode: soft-light; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 48px; }
.narrow { max-width: 880px; }
h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 300; line-height: 1.18; letter-spacing: -0.012em; color: var(--ink); }
.eyebrow { font-family: 'DM Mono', monospace; font-size: 0.7rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--taupe); display: inline-flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--plum); }
.center .eyebrow { justify-content: center; }

/* NAV */
nav.site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; padding: 32px 48px; transition: background .6s ease, backdrop-filter .6s ease, padding .6s ease, border-color .6s ease; border-bottom: 1px solid transparent; }
nav.site-nav .brand { font-family: 'Fraunces', serif; font-weight: 400; font-size: 1.5rem; letter-spacing: 0.16em; color: var(--paper); text-decoration: none; transition: color .6s ease; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-family: 'DM Mono', monospace; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--paper); opacity: 0.82; text-decoration: none; transition: opacity .3s ease, color .6s ease; }
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-links a.active { border-bottom: 1px solid currentColor; padding-bottom: 3px; }
nav.site-nav .nav-cta { font-family: 'DM Mono', monospace; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper); text-decoration: none; padding-bottom: 5px; border-bottom: 1px solid rgba(244,239,231,0.4); transition: color .6s ease, border-color .3s ease; }
nav.site-nav .nav-cta:hover { border-color: var(--paper); }
nav.site-nav.scrolled { background: rgba(244,239,231,0.86); backdrop-filter: blur(14px); padding: 18px 48px; border-bottom: 1px solid var(--line); }
nav.site-nav.scrolled .brand { color: var(--ink); }
nav.site-nav.scrolled .nav-links a { color: var(--ink-soft); }
nav.site-nav.scrolled .nav-links a:hover, nav.site-nav.scrolled .nav-links a.active { color: var(--plum-deep); }
nav.site-nav.scrolled .nav-cta { color: var(--ink); border-color: var(--line-d); }
nav.site-nav.scrolled .nav-cta:hover { border-color: var(--plum); color: var(--plum-deep); }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 6px; width: 30px; height: 30px; padding: 0; background: none; border: none; cursor: pointer; z-index: 61; }
.nav-toggle span { display: block; width: 26px; height: 1.5px; background: var(--paper); transition: transform .35s ease, opacity .3s ease, background .6s ease; }
nav.site-nav.scrolled .nav-toggle span { background: var(--ink); }
body.menu-open .nav-toggle span { background: var(--ink); }
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }
body.menu-open .site-nav .brand { color: var(--ink); }
body.menu-open { overflow: hidden; }

/* SKIP LINK (a11y) */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--ink); color: var(--paper); padding: 12px 20px; font-family: 'DM Mono', monospace; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; }
.skip-link:focus { left: 12px; top: 12px; }

/* MOBILE MENU */
.mobile-menu { position: fixed; inset: 0; z-index: 55; background: var(--paper); opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s ease; display: flex; align-items: center; justify-content: center; }
.mobile-menu.open { opacity: 1; visibility: visible; }
.mm-links { display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.mm-links a { font-family: 'Fraunces', serif; font-weight: 300; font-size: 2rem; color: var(--ink); text-decoration: none; transition: color .3s ease; }
.mm-links a:hover { color: var(--plum-deep); }
.mm-links .mm-cta { margin-top: 20px; font-family: 'DM Mono', monospace; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: 2px; padding: 18px 38px; }
.mm-links .mm-cta:hover { color: var(--ink); background: transparent; }

/* BUTTONS / LINKS */
.cta-btn { display: inline-flex; align-items: center; gap: 14px; background: var(--ink); color: var(--paper); font-family: 'DM Mono', monospace; font-weight: 400; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; padding: 21px 44px; border: 1px solid var(--ink); border-radius: 2px; cursor: pointer; text-decoration: none; transition: background .4s ease, color .4s ease, transform .4s ease; }
.cta-btn .arr { transition: transform .4s ease; }
.cta-btn:hover { background: transparent; color: var(--ink); transform: translateY(-2px); }
.cta-btn:hover .arr { transform: translateX(6px); }
.cta-btn.on-dark { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta-btn.on-dark:hover { background: transparent; color: var(--paper); }
.cta-btn.ghost-dark { background: transparent; color: var(--paper); border-color: rgba(244,239,231,0.4); }
.cta-btn.ghost-dark:hover { border-color: var(--paper); }
.cta-line { display: inline-flex; align-items: center; gap: 12px; font-family: 'DM Mono', monospace; font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--paper); text-decoration: none; border-bottom: 1px solid rgba(244,239,231,0.45); padding-bottom: 6px; transition: gap .4s ease; }
.cta-line:hover { gap: 20px; }
.text-link { display: inline-flex; align-items: center; gap: 10px; font-family: 'DM Mono', monospace; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--plum-deep); text-decoration: none; border-bottom: 1px solid var(--plum); padding-bottom: 5px; transition: gap .3s ease; }
.text-link:hover { gap: 16px; }
.foot-cta { font-family: 'DM Mono', monospace; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--paper); text-decoration: none; border-bottom: 1px solid rgba(244,239,231,0.3); padding-bottom: 6px; transition: border-color .3s ease; }
.foot-cta:hover { border-color: var(--paper); }

/* FOOTER */
footer.site-footer { background: var(--oak); color: rgba(244,239,231,0.6); }
.foot-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.1fr; gap: 50px; padding: 96px 0 56px; }
.foot-brand { font-family: 'Fraunces', serif; font-weight: 400; font-size: 1.7rem; letter-spacing: 0.18em; color: var(--paper); margin-bottom: 20px; }
.foot-tag { font-size: 0.96rem; color: rgba(244,239,231,0.6); margin-bottom: 26px; line-height: 1.7; }
.foot-col h4 { font-family: 'DM Mono', monospace; font-size: 0.64rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(244,239,231,0.4); margin-bottom: 22px; font-weight: 400; }
.foot-col a, .foot-col p { display: block; font-size: 0.92rem; color: rgba(244,239,231,0.72); text-decoration: none; margin: 0 0 13px; line-height: 1.6; }
.foot-col a { transition: color .3s ease; }
.foot-col a:hover { color: var(--paper); }
.foot-social { display: flex; gap: 18px; margin-top: 20px; }
.foot-social a { margin: 0; color: rgba(244,239,231,0.55); transition: color .3s ease; }
.foot-social a:hover { color: var(--paper); }
.foot-social svg { width: 18px; height: 18px; fill: currentColor; display: block; }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; padding: 26px 0; border-top: 1px solid rgba(244,239,231,0.12); font-family: 'DM Mono', monospace; font-size: 0.66rem; letter-spacing: 0.08em; color: rgba(244,239,231,0.4); }
.foot-bottom a { color: rgba(244,239,231,0.55); text-decoration: none; }
.foot-bottom a:hover { color: var(--paper); }

/* REVEAL */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 1.1s cubic-bezier(.2,.7,.3,1), transform 1.1s cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* GLOBAL RESPONSIVE (chrome) */
@media (max-width: 900px) {
  .wrap { padding: 0 26px; }
  nav.site-nav, nav.site-nav.scrolled { padding: 20px 26px; }
  .nav-links { display: none; } nav.site-nav .nav-cta { display: none; } .nav-toggle { display: flex; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 44px 30px; padding: 64px 0 44px; }
  .foot-col a, .foot-col p { margin-bottom: 18px; }
  .foot-brand-col { grid-column: 1 / -1; }
  .foot-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
@media (max-width: 560px) {
  .foot-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 600px) {
  /* Footer: restore the side gutter — .foot-grid / .foot-bottom padding shorthand zeroes .wrap's horizontal padding */
  .site-footer .wrap { padding-left: 26px; padding-right: 26px; }
  /* Primary buttons: keep the label on one tidy line with the arrow inline beside it, centred (no edge-floated arrow) */
  .cta-btn, a.cta-btn, button.cta-btn, .hero-cta-btn {
    font-size: 0.64rem !important;
    letter-spacing: 0.1em !important;
    padding: 15px 24px !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    line-height: 1.35 !important;
  }
}
