/* Treva Eid Al Etihad (plugin): the UAE National Day look over the Treva theme. Loaded only on those days; the
   motion is in assets/js/national-day.js. Nothing here changes the theme's own files. */
:root{
  --nd-red:#EF3340;--nd-green:#009739;--nd-black:#111;--nd-ink:#27437A;--nd-cream:#F6DDA8;--nd-blue:#2C4A85;--nd-blue-deep:#1F3766;
  --nd-flag:linear-gradient(90deg,var(--nd-red) 0 26%,transparent 26%),linear-gradient(180deg,var(--nd-green) 0 33.34%,#fff 33.34% 66.67%,var(--nd-black) 66.67%);
  --nd-gold:linear-gradient(105deg,#9C7529 0%,#D9B867 22%,#FFF3C9 38%,#E2C374 50%,#A9812F 70%,#E8CF86 86%,#8E6A24 100%);
}

/* ---------- 1. the offer bar: the flag in place of the spark, and the day's name in place of its first words ---------- */
.treva-nd .treva-offer{z-index:4}
.treva-nd .treva-offer .o-spark{display:none}
.treva-nd .treva-offer .o-in::before{content:"";flex:none;width:24px;height:12px;border-radius:1.5px;background:var(--nd-flag);box-shadow:0 0 0 1px rgba(255,255,255,.8)}
.treva-nd .treva-offer .o-kicker{font-size:0;letter-spacing:0;color:#fff}
.treva-nd .treva-offer .o-kicker::before{content:"";display:inline-block;width:51px;height:20px;margin:0 .6em 0 0;font-size:12.5px;vertical-align:middle;background:url(../img/nd-ar-bar.png?v=101) center/contain no-repeat}
.treva-nd .treva-offer .o-kicker::after{content:"Eid Al Etihad 55";font-size:12.5px;letter-spacing:.14em;vertical-align:middle}
@media (min-width:641px){.treva-nd .treva-offer .o-kicker{display:inline-flex;align-items:center}}
@media (max-width:640px){.treva-nd .treva-offer .o-in::before{width:20px;height:10px}}
@media (max-width:370px){.treva-nd .treva-offer .o-in::before{display:none}}

/* ---------- 2. the horizon along the bottom of the menu row; the buttons stand in front of it ---------- */
.treva-nd .treva-site-header > .elementor{position:relative;z-index:2}
.treva-nd .treva-site-header::before{content:"";position:absolute;left:0;right:0;bottom:1px;height:26px;z-index:1;pointer-events:none;background:url(../img/nd-horizon.svg?v=101) repeat-x 0 100% / auto 100%;opacity:.36}
.treva-nd .treva-site-header .treva-actions > :not(.treva-cart){background-color:#F4F0E6}

/* ---------- 3. the tag, hanging from the bar (placed by the script; hidden until then) ---------- */
.nd-tag{position:absolute;z-index:3;top:0;left:0;width:64px;display:flex;flex-direction:column;align-items:center;visibility:hidden;cursor:default;-webkit-tap-highlight-color:transparent;
  transform-origin:50% 0;transform:rotate(calc(var(--rest,-5deg) + var(--sw,0rad)));filter:drop-shadow(0 10px 14px rgba(27,34,51,.22)) drop-shadow(0 2px 3px rgba(27,34,51,.18))}
.nd-tag.placed{visibility:visible}
.nd-tag.off{display:none}
/* phones (or no room in the row): hanging below the header under the name, tucked away once the page scrolls */
.nd-tag{transition:opacity .35s ease,translate .35s ease}
.nd-tag.below .nd-cord{height:7px}
.nd-tag.below .nd-face{box-shadow:inset 0 0 0 1px rgba(246,221,168,.3)}
.nd-tag.away{opacity:0;translate:0 -12px;pointer-events:none}
.nd-tag.drop{animation:nd-drop .95s cubic-bezier(.3,1.35,.5,1) both}
@keyframes nd-drop{from{translate:0 -110px}}
.nd-cord{width:2px;height:16px;border-radius:1px;background:repeating-linear-gradient(180deg,var(--nd-red) 0 3px,var(--nd-green) 3px 6px,#fff 6px 9px,var(--nd-black) 9px 12px)}
.nd-card{position:relative;width:64px;height:96px;margin-top:-5px;transform-style:preserve-3d;transform:perspective(320px) rotateY(var(--flip,0deg));transition:transform .9s cubic-bezier(.5,0,.2,1)}
.nd-tag.back .nd-card{--flip:180deg}
.nd-face{position:absolute;inset:0;backface-visibility:hidden;display:flex;flex-direction:column;align-items:center;padding-top:17px;
  background:linear-gradient(180deg,var(--nd-blue),var(--nd-blue-deep));clip-path:polygon(26% 0,74% 0,100% 15%,100% 100%,0 100%,0 15%)}
.nd-face::before{content:"";position:absolute;left:50%;top:5px;width:7px;height:7px;margin-left:-3.5px;border-radius:50%;background:#1B2233;box-shadow:0 0 0 1.6px #D4B062,0 0 0 2.4px rgba(0,0,0,.18)}
.nd-face::after{content:"";position:absolute;left:0;right:0;bottom:0;height:6px;background:var(--nd-flag)}
.nd-back{transform:rotateY(180deg);padding-top:18px}
.treva-site-header .nd-falc{display:block;height:20px!important;width:auto!important;max-width:none!important;margin:1px 0 3px;filter:drop-shadow(0 1px 1px rgba(0,0,0,.45))}
.treva-site-header .nd-ar{display:block;height:64px!important;width:auto!important;max-width:none!important}
.nd-55{font-family:var(--display);font-size:34px;line-height:.95;background:var(--nd-gold);background-size:260% 100%;background-position:100% 0;-webkit-background-clip:text;background-clip:text;color:transparent;animation:nd-glint 5.5s ease-in-out 1.2s infinite}
@keyframes nd-glint{0%,55%{background-position:100% 0}85%,100%{background-position:0 0}}
.nd-uae{font-family:var(--mono);font-size:8px;letter-spacing:.24em;margin:2px 0 0 .24em;color:var(--nd-cream)}

/* ---------- 4. the falcon, gliding along the horizon from the far right once a page ---------- */
.nd-falcon{position:absolute;z-index:1;left:0;bottom:6px;width:44px;height:18px;pointer-events:none;opacity:0;fill:var(--nd-ink);translate:calc(100vw + 30px) 0}
.nd-falcon.fly{animation:nd-fly 16s linear infinite}
.nd-falcon svg{display:block;width:100%;height:100%;animation:nd-flap 1.5s ease-in-out infinite;transform-origin:50% 40%}
/* across the whole width in ten seconds, then out of sight for six */
@keyframes nd-fly{
  0%{opacity:0;translate:calc(100vw + 30px) 0;animation-timing-function:cubic-bezier(.4,.1,.6,.9)}
  5%{opacity:.9}
  31%{translate:50vw -4px;animation-timing-function:cubic-bezier(.4,.1,.6,.9)}
  58%{opacity:.9}
  62.5%{opacity:0;translate:-70px 2px}
  100%{opacity:0;translate:-70px 2px}
}
@keyframes nd-flap{0%,100%{scale:1 1}50%{scale:1 .55}}

@media (max-width:600px){
  .treva-nd .treva-site-header::before{height:17px;background-position:-150px 100%}
  .nd-tag{width:32px}
  .nd-cord{height:9px}
  .nd-card{width:32px;height:51px;margin-top:-4px}
  .nd-face{padding-top:10px}
  .nd-face::before{top:3.5px;width:5px;height:5px;margin-left:-2.5px}
  .nd-face::after{height:4px}
  .nd-back{padding-top:10px}
  .treva-site-header .nd-falc{height:10px!important;margin:0 0 1px}
  .treva-site-header .nd-ar{height:33px!important}
  .nd-55{font-size:18px}
  .nd-uae{font-size:5px;margin-top:1px}
  .nd-falcon{width:30px;height:12px;bottom:4px}
}
@media (max-width:374px){
  .nd-tag{width:29px}
  .nd-card{width:29px;height:47px}
  .treva-site-header .nd-falc{height:9px!important}
  .treva-site-header .nd-ar{height:30px!important}
  .nd-55{font-size:16px}
}

/* ---------- 5. the home banner: the day's picture, and on computers a journey from the silk to the bottle ---------- */
/* the pictures themselves are set by the plugin with full addresses (a relative address inside a CSS variable would be
   read from the theme's folder, where the variable is used) */
.treva-nd .treva-hero .stage{background:#15171C}
.treva-nd .treva-hero .scrim{display:none}
.treva-nd .treva-hero .cue{color:#FBF8F1;transition:opacity .4s ease}
.treva-nd .treva-hero.nd-moved .cue{opacity:0!important;animation:none}
.treva-nd .treva-hero.nd-journey{height:300vh}
.treva-nd .treva-hero.nd-journey .poster{transform-origin:50% 50%;will-change:transform;backface-visibility:hidden}
.nd-dim,.nd-glow,.nd-sheen{position:absolute;inset:0;pointer-events:none;display:none}
.nd-journey .nd-dim,.nd-journey .nd-glow,.nd-journey .nd-sheen{display:block;will-change:opacity,transform}
.nd-dim{background:radial-gradient(ellipse 80% 90% at 60% 55%,rgba(6,8,12,.35),rgba(6,8,12,.7))}
.nd-glow{background:radial-gradient(ellipse 24% 42% at 50% 47%,rgba(255,196,130,.3),rgba(255,196,130,0) 70%);mix-blend-mode:screen;opacity:0}
.nd-sheen{background:linear-gradient(104deg,rgba(255,236,210,0) 38%,rgba(255,236,210,.16) 50%,rgba(255,236,210,0) 62%);mix-blend-mode:screen}
/* the lines in cream on the dark picture */
.treva-nd .treva-hero .band .h-hero,.treva-nd .treva-hero .band .sub,.treva-nd .treva-hero .band .meta,.treva-nd .treva-hero .band .link,
.treva-nd .treva-hero .static-hero .h-hero,.treva-nd .treva-hero .static-hero .sub,.treva-nd .treva-hero .static-hero .eyebrow,.treva-nd .treva-hero .static-hero .link{color:#FBF8F1;text-shadow:0 2px 22px rgba(0,0,0,.5)}
.treva-nd .treva-hero .band .meta,.treva-nd .treva-hero .static-hero .eyebrow{color:var(--nd-cream)}
.treva-nd .treva-hero .band .link:hover,.treva-nd .treva-hero .static-hero .link:hover{color:var(--nd-cream)}
.treva-nd .treva-hero .band::before,.treva-nd .treva-hero .static-hero::before{background:rgb(10 12 16 / calc(var(--sa,.8) * .5))}
/* the lines come in more alive: words fall into focus from a blur, the two halves sweep in from the sides, a gold
   light runs through the words one after another, and a fine gold line draws itself under each heading */
.treva-nd .treva-hero .drift .w{filter:blur(calc((1 - var(--kc)) * 9px));transform:translateY(calc((1 - var(--kc)) * -48px)) scale(calc(1.14 - .14 * var(--kc)))}
.treva-nd .treva-hero .part .half-a{filter:blur(calc((1 - var(--kc)) * 10px));transform:translateX(calc((1 - var(--kc)) * 120px))}
.treva-nd .treva-hero .part .half-b{filter:blur(calc((1 - var(--kc)) * 10px));transform:translateX(calc((1 - var(--kc)) * -120px))}
.treva-nd .treva-hero .rise .w{filter:blur(calc((1 - var(--kc)) * 8px));transform:translateY(calc((1 - var(--kc)) * 56px)) rotate(calc((1 - var(--kc)) * 4deg))}
.treva-nd .treva-hero .focus .sharp{letter-spacing:calc((1 - var(--k,0)) * .18em)}
.treva-nd .treva-hero .fade-late,.treva-nd .treva-hero .rise .sub{filter:blur(calc((1 - var(--ks,1)) * 6px))}
.treva-nd .treva-hero .nd-t{display:inline-block}
.treva-nd .treva-hero .band .w,.treva-nd .treva-hero .band .nd-t{
  background:linear-gradient(100deg,#FBF8F1 0 40%,#F6D892 50%,#FBF8F1 60% 100%) 100% 0/300% 100% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;text-shadow:none;
  animation:nd-gild 5.5s ease-in-out infinite;animation-delay:calc(1s + var(--th,0) * 2.4s)}
.treva-nd .treva-hero .band.part .half-b .nd-t{animation-delay:1.5s}
@keyframes nd-gild{0%,60%{background-position:100% 0}86%,100%{background-position:0 0}}
.treva-nd .treva-hero .band .h-hero:not(.soft)::after{content:"";display:block;width:calc(var(--k,0) * 92px);height:2px;margin-top:.3em;border-radius:2px;background:linear-gradient(90deg,#B8913F,#F6E3A6 55%,#C9A24E)}

/* phones held upright: the words sit under the picture, on the page, in the usual colours */
@media (orientation:portrait){
  .treva-nd .treva-hero .stage{background:transparent}
  .treva-nd .treva-hero .static-hero .h-hero,.treva-nd .treva-hero .static-hero .sub,.treva-nd .treva-hero .static-hero .link{color:var(--text-primary);text-shadow:none}
  .treva-nd .treva-hero .static-hero .eyebrow{color:var(--text-secondary);text-shadow:none}
  .treva-nd .treva-hero .static-hero .link:hover{color:var(--accent)}
}

@media (prefers-reduced-motion:reduce){
  .nd-tag.drop,.nd-falcon.fly,.nd-55{animation:none}
  .nd-falcon{display:none}
  .nd-card{transition:none}
}
