/* apple-1101: design layer for amitaielon.com. Presentation only: no text, link or markup changes.
   Method from the apple-design skill (response on press, interruptible motion, restraint) and from
   real navbars and heroes: navbar.gallery (Velt mobile menu), supahero.io (Stripe, Linear, Notion heroes).
   Scope rules:
   - Nav and menu sheet rules target .site-header, .menu-toggle and #mobile-menu only (unified shell pages).
   - Press, focus, tap target, safe area and type rules name known classes, never bare elements.
   - Pages that carry the explore or my-golan bundles get only the small universal block at the top.
   Light only: the site has no dark scheme, so none is added here. */

/* ---------- 0. universal and near inert ---------- */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
a,button,summary,label,select,input[type=submit],input[type=button],[role=button]{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

/* The shared bridge bar on explore, my-golan, bnei-mitzvah and natur-vision: bigger hit areas, same look. */
html body .unified-bridge a{display:inline-flex;align-items:center;min-height:44px;transition:opacity .35s cubic-bezier(.16,1,.3,1)}
html body .unified-bridge a{padding-inline:8px;margin-inline:-8px}
html body .unified-bridge a:active{opacity:.55;transition-duration:.06s}
html body .unified-bridge a:focus-visible{outline-offset:-4px;border-radius:10px}
html body .unified-bridge{padding-left:max(28px,env(safe-area-inset-left));padding-right:max(28px,env(safe-area-inset-right))}
@media (max-width:520px){html body .unified-bridge{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}}

/* ---------- 1. header, menu toggle, menu sheet (unified shell only) ---------- */
html body .site-header{box-shadow:0 1px 0 rgba(0,0,0,0);transition:box-shadow .3s cubic-bezier(.16,1,.3,1)}
html body .site-header[data-scrolled]{box-shadow:0 1px 0 rgba(0,0,0,.09)}
html body .site-header .wordmark{display:inline-flex;align-items:center;min-height:44px}
html body .site-header .nav-links a{display:inline-flex;align-items:center;min-height:44px;transition:color .2s}
html body .site-header .nav-links a:hover{color:var(--ink);text-decoration:none}
html body .site-header .nav-links a[aria-current=page]{color:var(--blue)}
html body .site-header .nav-cta{position:relative}
html body .site-header .nav-cta::after{content:"";position:absolute;inset:-6px -4px}
html body .site-header :is(a,button):focus-visible{outline:3px solid #0071e3;outline-offset:3px}

/* The two bars become an X while the sheet is open or opening. The icon is drawn by CSS, driven by aria-expanded. */
html body .site-header .menu-toggle{position:relative;border-radius:50%;transition:background-color .25s cubic-bezier(.16,1,.3,1)}
html body .site-header .menu-toggle svg{opacity:0}
html body .site-header .menu-toggle::before,html body .site-header .menu-toggle::after{content:"";position:absolute;left:50%;top:50%;width:18px;height:1.7px;margin:-.85px 0 0 -9px;border-radius:2px;background:currentColor;transition:transform .42s cubic-bezier(.16,1,.3,1)}
html body .site-header .menu-toggle::before{transform:translateY(-4px)}
html body .site-header .menu-toggle::after{transform:translateY(4px)}
html body .site-header .menu-toggle[aria-expanded=true]::before{transform:rotate(45deg)}
html body .site-header .menu-toggle[aria-expanded=true]::after{transform:rotate(-45deg)}
html body .site-header .menu-toggle:active{background:rgba(0,0,0,.07);transition-duration:.05s}
html body .site-header .menu-toggle:focus-visible{border-radius:50%}

html.apple1101-open{overflow:hidden}
.apple1101-scrim{display:none;position:fixed;inset:0;z-index:99;background:rgba(0,0,0,.36);opacity:0;pointer-events:none;touch-action:none}
.apple1101-scrim[data-on]{display:block;pointer-events:auto;opacity:1}

@media (max-width:780px){
  /* The sheet hangs from the header bar (a fixed child would be trapped by the header's backdrop filter).
     Layout only here. Opacity and transform are driven by apple-1101.js from the live value. */
  html body .site-header #mobile-menu{position:absolute;top:100%;left:0;right:0;margin:0;
    max-height:calc(100vh - 62px - 12px);max-height:calc(100dvh - 62px - 12px);
    overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
    padding:6px max(24px,env(safe-area-inset-right)) calc(22px + env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));
    background:#fff;border-top:1px solid var(--line);border-radius:0 0 22px 22px;
    box-shadow:0 28px 56px -18px rgba(0,0,0,.32);transform-origin:50% 0}
  html body .site-header #mobile-menu[hidden]{display:none!important}
  html body .site-header #mobile-menu a{display:flex;align-items:center;min-height:54px;padding:6px 12px;margin-inline:-12px;
    border-radius:14px;font-size:22px;font-weight:500;letter-spacing:-.022em;line-height:1.2;
    transition:background-color .35s cubic-bezier(.16,1,.3,1)}
  html body .site-header #mobile-menu a:active{background:#efeff2;transition-duration:.05s}
  html body .site-header #mobile-menu a[aria-current=page]{color:var(--blue)}
  html body .site-header #mobile-menu a:last-child{justify-content:center;min-height:52px;margin:14px 0 0;padding:12px 24px;
    background:var(--blue);color:#fff;border-radius:999px;font-size:18px;font-weight:500;letter-spacing:-.01em}
  html body .site-header #mobile-menu a:last-child:active{background:var(--blue-hover)}
}

/* ---------- 2. press feedback: instant on touch down, spring back on release ---------- */
html body :is(.button,.text-link,.filter,.path-rail a,.btn,.tai-navbtn,.tai-top){
  transition:transform .5s cubic-bezier(.16,1,.3,1),background-color .2s,color .2s,opacity .3s}
html body :is(.button,.text-link,.filter,.path-rail a,.btn,.tai-navbtn):active{transform:scale(.965);transition-duration:.08s,.2s,.2s,.08s}
html body :is(.book-item,.library-row){transition:transform .5s cubic-bezier(.16,1,.3,1),opacity .3s}
@media (hover:none){
  html body .button:hover{background:var(--blue)}
  html body .button.secondary:hover{background:#e9eff7}
  html body :is(.text-link,.nav-links a,.footer-top a,.footer-bottom a):hover{text-decoration:none}
  html body .library-row:hover h2{color:inherit}
  html body .book-item:hover .book-cover{transform:none}
}
/* after the hover:none block so a pressed card wins over its sticky hover */
html body .book-item:active .book-cover{transform:scale(.975);transition-duration:.08s}
html body .library-row:active{opacity:.62;transition-duration:.06s}

/* ---------- 3. focus rings on known controls ---------- */
html body :is(.button,.text-link,.filter,.path-rail a,.btn,.library-row,.book-item,.footer-top a,.footer-bottom a,.tai-navbtn):focus-visible{outline:3px solid #0071e3;outline-offset:3px}
html body :is(.text-link,.path-rail a,.footer-top a,.footer-bottom a):focus-visible{border-radius:8px}
html body :is(.farm-panel,.hero-photo) :is(a,button):focus-visible{outline-color:#fff}
html body .search-box:focus-within{outline:3px solid #0071e3;outline-offset:3px}
html body .search-box input:focus-visible{outline:none}

/* ---------- 4. tap targets: 44px on touch ---------- */
html body .tai-navbtn{min-height:44px;min-width:44px;justify-content:center}
@media (max-width:780px),(pointer:coarse){
  html body :is(.footer-top a,.footer-bottom .legal-links a,.footer-bottom>a){display:flex;align-items:center;min-height:44px;padding-block:0}
  html body .footer-top .wordmark{display:inline-flex}
  html body .footer-bottom .legal-links{gap:4px 22px}
  html body .footer-bottom .legal-links a{padding-inline:8px;margin-inline:-8px}
  html body .path-rail{row-gap:0}
  html body .path-rail a{min-height:44px}
}

/* ---------- 5. type: size-specific tracking and leading, wrapping quality ---------- */
html body :is(.home-hero h1,.page-intro h1,.gateway h1){letter-spacing:-.042em;font-optical-sizing:auto}
html body :is(.section-heading h2,.closing h2,.journey-item h2){letter-spacing:-.034em}
html body :is(.feature-copy h3,.book-meta h3,.library-row h2){letter-spacing:-.022em}
html body :is(.intro,.section-heading p,.closing p,.page-intro p,.story-split p,.prose p,.feature-copy p){text-wrap:pretty}
html body :is(.hero-caption,.footer-top,.footer-bottom,.result-count,.library-row .kind){letter-spacing:.008em}
@media (max-width:780px){html body .hero-caption{font-size:12px}}
@media (max-width:520px){html body .book-cover span{font-size:12px}}

/* ---------- 6. safe areas (inert unless the page opts in with viewport-fit) ---------- */
html body .wrap{padding-left:max(32px,env(safe-area-inset-left));padding-right:max(32px,env(safe-area-inset-right))}
@media (max-width:780px){html body .wrap{padding-left:max(24px,env(safe-area-inset-left));padding-right:max(24px,env(safe-area-inset-right))}}
html body .site-footer{padding-bottom:calc(24px + env(safe-area-inset-bottom))}
@media (min-width:1001px){html body .site-nav{padding-left:max(40px,env(safe-area-inset-left));padding-right:max(40px,env(safe-area-inset-right))}}
@media (max-width:1000px){html body .site-nav{padding-left:max(24px,env(safe-area-inset-left));padding-right:max(24px,env(safe-area-inset-right))}}

/* ---------- 7. reduced motion: opacity only, at higher specificity than unified.css ---------- */
@media (prefers-reduced-motion:reduce){
  html body :is(.button,.text-link,.filter,.path-rail a,.btn,.tai-navbtn,.tai-top,.book-item,.library-row,.menu-toggle,.unified-bridge a,#mobile-menu a){transition:opacity .12s linear!important}
  html body :is(.button,.text-link,.filter,.path-rail a,.btn,.tai-navbtn):active{transform:none!important;opacity:.7}
  html body .book-item:active .book-cover{transform:none!important}
  html body .book-item:active{opacity:.7}
  html body .site-header .menu-toggle::before,html body .site-header .menu-toggle::after{transition:none!important}
  html body .site-header{transition:none!important}
}
@media (prefers-reduced-transparency:reduce){html body .site-header #mobile-menu{box-shadow:none}.apple1101-scrim{background:rgba(0,0,0,.5)}}
@media (prefers-contrast:more){html body .site-header #mobile-menu{border-top-color:#76767c}html body .site-header[data-scrolled]{box-shadow:0 1px 0 #76767c}}

/* ---------- motion-1114 ---------- */
/* item 3a: a press state within 100 ms on chrome and footer links (opacity only, no layout, no scale). Running text is left alone.
   Every transition list keeps what the link already had (color, border-color); footer links also carry the underline fade of item 6. */
html body :is(.site-header .nav-links a){transition:opacity .3s,color .2s}
html body :is(.site-header .wordmark,.unified-article>footer a,.ap-link){transition:opacity .3s,color .2s,border-color .2s}
html body :is(.site-footer .footer-top a,.site-footer .footer-bottom a){transition:opacity .3s,color .2s,text-decoration-color .15s ease-out}
html body :is(.site-header .nav-links a,.site-header .wordmark,.site-footer .footer-top a,.site-footer .footer-bottom a,.unified-article>footer a,.ap-link):active{opacity:.55;transition-duration:.06s}
@media (prefers-reduced-motion:reduce){html body :is(.site-header .nav-links a,.site-header .wordmark,.site-footer .footer-top a,.site-footer .footer-bottom a,.unified-article>footer a,.ap-link){transition:opacity .12s linear!important}}
/* item 4: menu fixes. On the older journey pages the page's own nav{} and a{} rules (!important) made the sheet see-through and the last label blue on blue. */
@media (max-width:780px){
  html body .site-header #mobile-menu{background:#fff!important;border-bottom:0!important;-webkit-backdrop-filter:none;backdrop-filter:none}
  html body .site-header #mobile-menu a{color:var(--ink)!important;border-bottom:0!important}
  html body .site-header #mobile-menu a[aria-current=page]{color:var(--blue)!important}
  html body .site-header #mobile-menu a:last-child{color:#fff!important}
}
/* item 6: desktop only. Underlines fade in, the small arrow nudges. Touch never gets either. */
@media (hover:hover) and (pointer:fine){
  html body :is(.text-link,.path-rail a){text-decoration-line:underline;text-decoration-color:transparent;transition:transform .5s cubic-bezier(.16,1,.3,1),background-color .2s,color .2s,opacity .3s,text-decoration-color .15s ease-out}
  html body :is(.site-footer .footer-top a:not(.wordmark),.site-footer .footer-bottom a){text-decoration-line:underline;text-decoration-color:transparent}
  html body :is(.text-link,.path-rail a,.site-footer .footer-top a:not(.wordmark),.site-footer .footer-bottom a):hover{text-decoration-color:currentColor}
  html body .text-link svg{transition:transform .2s cubic-bezier(.23,1,.32,1)}
  html body .text-link:hover svg{transform:translateX(3px)}
}
/* item 3b: the one legacy hover that moves things (journey cards draw a bar and a gold border) stays still on touch (S16: border, shadow and background too) */
@media (hover:none),(pointer:coarse){
  html body.unified-article main .card:hover{transform:none}
  html body.unified-article main .card:hover::before{transform:scaleX(0)}
  /* holy-land-tours, tours and planning-call carry an inline hover rule (gold border, larger shadow, !important): a tap leaves none of it. The rest values are the pages' own. */
  html body.unified-article main .card.reveal:hover{border-color:rgba(201,162,39,.28)!important;box-shadow:0 10px 30px rgba(40,36,30,.06)!important;background:#fff!important}
}
