/* ============================================================
   RAJ DIGITAL CARD — Warm Aurora / Living Identity
   Portable static CSS. No framework, CDN, or build step.
   ============================================================ */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* Official core palette */
  --warm-white: #F7F5F0;
  --deep-ocean: #0B1928;

  /* Text */
  --ink: #0B1928;
  --ink-soft: #334657;
  --ink-muted: #526373;
  --ink-faint: #5F6E7B;

  /* Restrained localized aurora tints */
  --sage: #DCE9DF;
  --seafoam: #D9EDE7;
  --peach: #F1DED0;
  --brand-blue: #0047AF;

  /* Glass system */
  --glass-fallback: rgba(247, 245, 240, .91);
  --glass-blur-bg: rgba(255, 255, 255, .57);
  --glass-border: rgba(255, 255, 255, .80);
  --glass-border-strong: rgba(255, 255, 255, .92);
  --glass-shadow: 0 10px 28px rgba(11, 25, 40, .075),
    inset 0 1px 0 rgba(255, 255, 255, .78);
  --glass-shadow-hover: 0 15px 34px rgba(11, 25, 40, .11),
    inset 0 1px 0 rgba(255, 255, 255, .88);

  /* Shape and motion */
  --radius-panel: 36px;
  --radius-control: 18px;
  --radius-small: 14px;
  --ease-out: cubic-bezier(.22, .78, .24, 1);
  --tap: .18s var(--ease-out);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--warm-white);
  color: var(--ink);
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100%;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background-color: var(--warm-white);
  color: var(--ink);
  font-family: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 86% 4%, rgba(220, 233, 223, .72), transparent 32rem),
    radial-gradient(circle at 7% 27%, rgba(217, 237, 231, .54), transparent 29rem),
    radial-gradient(circle at 50% 105%, rgba(241, 222, 208, .62), transparent 36rem),
    linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(247, 245, 240, 0));
  animation: aurora-in 1.35s var(--ease-out) both;
}

::selection {
  background: rgba(0, 71, 175, .14);
  color: var(--deep-ocean);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button,
summary {
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  max-width: 100%;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  color: currentColor;
}

.icon--sm {
  width: 1.05rem;
  height: 1.05rem;
}

.ltr,
bdi {
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid rgba(0, 71, 175, .38);
  outline-offset: 3px;
}

:where(a, button, summary, [tabindex]):focus:not(:focus-visible) {
  outline: none;
}

/* View-switch headings receive programmatic focus for assistive technology,
   but should not look like an interactive control with a button-like ring. */
.view h1[tabindex="-1"]:focus,
.view h1[tabindex="-1"]:focus-visible {
  outline: none;
}

.skip-link.glass {
  position: fixed;
}

.skip-link {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  inset-inline: 0;
  z-index: 50;
  width: max-content;
  max-width: calc(100% - 32px);
  margin-inline: auto;
  padding: 10px 18px;
  border-radius: 14px;
  font-size: .86rem;
  font-weight: 600;
  transform: translateY(-170%);
  transition: transform .2s var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* ------------------------------------------------------------
   Shared glass design token
   ------------------------------------------------------------ */

.glass {
  position: relative;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-control);
  background: var(--glass-fallback);
  box-shadow: var(--glass-shadow);
  transition:
    background-color var(--tap),
    border-color var(--tap),
    box-shadow var(--tap),
    transform var(--tap),
    opacity var(--tap);
}

/* Only lower opacity when backdrop blur is actually available. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: var(--glass-blur-bg);
    -webkit-backdrop-filter: blur(12px) saturate(1.18);
    backdrop-filter: blur(12px) saturate(1.18);
  }
}

@media (hover: hover) and (pointer: fine) {
  .glass:not(.is-static):hover {
    border-color: var(--glass-border-strong);
    background-color: rgba(255, 255, 255, .69);
    box-shadow: var(--glass-shadow-hover);
    transform: translateY(-2px);
  }
}

.glass:not(.is-static):active {
  transform: translateY(1px) scale(.992);
  border-color: rgba(255, 255, 255, .95);
  box-shadow: 0 5px 16px rgba(11, 25, 40, .085),
    inset 0 1px 0 rgba(255, 255, 255, .72);
}

/* ------------------------------------------------------------
   Compact digital object + CSS-only two-view fallback
   ------------------------------------------------------------ */

.experience {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(calc(100% - 20px), 466px);
  margin:
    max(18px, env(safe-area-inset-top))
    auto
    max(24px, env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(158deg, rgba(255, 255, 255, .52), rgba(247, 245, 240, .34)),
    radial-gradient(circle at 50% 4%, rgba(255, 255, 255, .52), transparent 58%);
  box-shadow:
    0 28px 74px rgba(11, 25, 40, .095),
    inset 0 1px 0 rgba(255, 255, 255, .88);
  overflow: hidden;
}

.view {
  grid-area: 1 / 1;
  min-width: 0;
}

.view--services {
  display: none;
}

/* No-JS hash navigation: #services is before #card in the DOM. */
#services:target {
  display: block;
}

#services:target + #card {
  display: none;
}

/* JS adds the same state while also managing inert/focus/title. */
html[data-view="services"] #services,
html[data-view="card"] #card {
  display: block;
}

html[data-view="services"] #card,
html[data-view="card"] #services {
  display: none;
}

.view__inner {
  padding: 28px 24px 26px;
}

/* ------------------------------------------------------------
   View A — main digital card
   ------------------------------------------------------------ */

.hero {
  text-align: center;
}

.brand-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 164px;
  height: 164px;
  margin-inline: auto;
  margin-block-end: 2px;
}

.brand-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .88) 0 37%, rgba(220, 233, 223, .58) 53%, rgba(217, 237, 231, .27) 66%, rgba(241, 222, 208, .08) 76%, transparent 79%);
}

.brand-stage::after {
  content: "";
  position: absolute;
  inset: 15px;
  z-index: -2;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .62);
}

.brand-logo {
  display: block;
  width: 108px;
  height: 108px;
  object-fit: contain;
  /* No filter, recolor, crop, or transform: the official asset is untouched. */
}

.eyebrow {
  margin: 0;
  color: var(--ink-faint);
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.7;
}

.hero-title {
  margin: 7px 0 8px;
  color: var(--deep-ocean);
  font-size: clamp(1.78rem, 7.1vw, 2.25rem);
  font-weight: 750;
  line-height: 1.34;
  letter-spacing: 0;
  text-wrap: balance;
}

.intro {
  max-width: 35ch;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: clamp(.91rem, 3.45vw, 1.01rem);
  font-weight: 400;
  line-height: 1.88;
  text-wrap: pretty;
}

.actions {
  display: grid;
  gap: 9px;
  margin-block-start: 23px;
}

.action {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 57px;
  padding-inline: 15px;
  padding-block: 9px;
  font-size: .96rem;
  font-weight: 650;
  line-height: 1.5;
}

.action__icon,
.contact-action__icon,
.service-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 13px;
  background: rgba(255, 255, 255, .50);
  color: var(--ink);
}

.action__label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: start;
}

.action__arrow {
  margin-inline-start: auto;
  opacity: .72;
}

.action--primary {
  border-color: rgba(255, 255, 255, .25);
  background: linear-gradient(135deg, rgba(11, 25, 40, .965), rgba(20, 47, 69, .935));
  box-shadow:
    0 15px 32px rgba(11, 25, 40, .19),
    inset 0 1px 0 rgba(255, 255, 255, .18);
  color: var(--warm-white);
}

.action--primary .action__icon {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .12);
  color: var(--warm-white);
}

@media (hover: hover) and (pointer: fine) {
  .action--primary:hover {
    background: linear-gradient(135deg, rgba(14, 32, 50, .98), rgba(25, 56, 81, .95));
  }
}

.contact-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 8px;
}

.contact-action {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 64px;
  padding-inline: 12px;
  padding-block: 8px;
  color: var(--ink);
}

.contact-action__icon {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: #173A56;
}

.contact-action__text {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1 1 auto;
}

.contact-action__label {
  font-size: .83rem;
  font-weight: 650;
  line-height: 1.55;
}

.contact-action__value {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: .77rem;
  font-weight: 450;
  line-height: 1.5;
  text-align: start;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-action__arrow {
  margin-inline-start: auto;
  opacity: .48;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 64px;
  padding: 0;
  border-radius: 16px;
  color: var(--ink-soft);
}

.icon-button:disabled,
.mini-action:disabled {
  cursor: not-allowed;
  opacity: .58;
  transform: none;
}

.is-unavailable {
  pointer-events: none;
  opacity: .48;
}

.mail-fallback {
  border-radius: 16px;
  background-color: rgba(255, 255, 255, .43);
  box-shadow: 0 6px 18px rgba(11, 25, 40, .05),
    inset 0 1px 0 rgba(255, 255, 255, .65);
}

.mail-fallback > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding-inline: 14px;
  color: var(--ink-muted);
  font-size: .80rem;
  font-weight: 500;
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}

.mail-fallback > summary::-webkit-details-marker {
  display: none;
}

.mail-fallback__toggle,
.service-card__toggle {
  transition: transform .22s var(--ease-out);
}

.mail-fallback[open] .mail-fallback__toggle,
.service-card[open] .service-card__toggle {
  transform: rotate(45deg);
}

.mail-fallback__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0 10px 10px;
}

.mini-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding-inline: 6px;
  border-radius: 12px;
  background-color: rgba(255, 255, 255, .62);
  color: var(--ink-soft);
  font-size: .73rem;
  font-weight: 550;
  line-height: 1.4;
  white-space: nowrap;
}

.social-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-block-start: 2px;
}

.social-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 59px;
  padding: 7px 4px;
  border-radius: 16px;
  background-color: rgba(255, 255, 255, .46);
  box-shadow: 0 7px 18px rgba(11, 25, 40, .05),
    inset 0 1px 0 rgba(255, 255, 255, .7);
  color: var(--ink-soft);
  font-size: .72rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
}

.action--quiet {
  min-height: 51px;
  margin-block-start: 3px;
  border-color: rgba(255, 255, 255, .68);
  background-color: rgba(255, 255, 255, .35);
  box-shadow: 0 6px 18px rgba(11, 25, 40, .045),
    inset 0 1px 0 rgba(255, 255, 255, .58);
  color: var(--ink-soft);
  font-size: .86rem;
  font-weight: 550;
}

.action--quiet .action__icon--quiet {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .42);
}

.action--quiet .action__arrow {
  opacity: .5;
}

/* ------------------------------------------------------------
   View B — what RAJ does
   ------------------------------------------------------------ */

.view--services .view__inner {
  padding-block: 24px 28px;
}

.services-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block-end: 22px;
}

.back-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding-inline: 12px;
  border-radius: 14px;
  background-color: rgba(255, 255, 255, .54);
  color: var(--ink-soft);
  font-size: .80rem;
  font-weight: 550;
}

.services-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-muted);
  font-size: .77rem;
  font-weight: 500;
}

.services-brand img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.services-intro {
  margin-block-end: 19px;
}

.services-intro h1 {
  margin: 0 0 7px;
  color: var(--deep-ocean);
  font-size: clamp(1.48rem, 6vw, 1.88rem);
  font-weight: 750;
  line-height: 1.38;
  text-wrap: balance;
}

.services-intro p {
  margin: 0;
  color: var(--ink-muted);
  font-size: .89rem;
  line-height: 1.8;
}

.service-list {
  display: grid;
  gap: 10px;
}

.service-card {
  border-radius: 20px;
  overflow: hidden;
}

.service-card > summary {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 22px;
  align-items: start;
  column-gap: 10px;
  padding: 15px 13px 14px;
  list-style: none;
  cursor: pointer;
}

.service-card > summary::-webkit-details-marker {
  display: none;
}

.service-icon {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #173A56;
}

.service-card__body {
  display: block;
  min-width: 0;
  grid-column: 2;
}

.service-card__question {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: .91rem;
  font-weight: 650;
  line-height: 1.65;
  text-wrap: pretty;
}

.service-card__answer {
  display: block;
  margin-block-start: 5px;
  color: var(--ink-muted);
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.7;
}

.service-card__toggle {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  color: var(--ink-faint);
}

.service-card__examples {
  padding-block: 12px 14px;
  padding-inline-start: 69px;
  padding-inline-end: 14px;
  border-block-start: 1px solid rgba(11, 25, 40, .075);
  background: rgba(255, 255, 255, .27);
  color: var(--ink-soft);
  font-size: .76rem;
  line-height: 1.85;
  animation: fade-in .26s var(--ease-out) both;
}

.service-card__examples strong {
  color: var(--ink);
  font-weight: 650;
}

.services-actions {
  display: grid;
  gap: 9px;
  margin-block-start: 18px;
}

.action--secondary {
  justify-content: flex-start;
  min-height: 51px;
  background-color: rgba(255, 255, 255, .55);
  color: var(--ink-soft);
  font-size: .87rem;
  font-weight: 550;
}

/* ------------------------------------------------------------
   Toast, motion, and responsive behavior
   ------------------------------------------------------------ */

.toast {
  position: fixed;
  z-index: 60;
  inset-inline: 0;
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: max-content;
  max-width: calc(100% - 32px);
  margin-inline: auto;
  padding: 11px 16px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 15px;
  background: rgba(11, 25, 40, .95);
  box-shadow: 0 16px 34px rgba(11, 25, 40, .22);
  color: var(--warm-white);
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .22s var(--ease-out), transform .22s var(--ease-out);
}

.toast[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
}

.toast__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(247, 245, 240, .35);
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: .72rem;
  line-height: 1;
}

.reveal {
  animation: reveal .66s var(--ease-out) both;
  animation-delay: var(--reveal-delay, 0s);
}

@keyframes reveal {
  from {
    opacity: .5;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes aurora-in {
  from {
    opacity: .62;
    transform: scale(1.015);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in {
  from { opacity: .45; }
  to { opacity: 1; }
}

@media (max-width: 350px) {
  :root {
    --radius-panel: 28px;
    --radius-control: 16px;
  }

  .experience {
    width: calc(100% - 12px);
  }

  .view__inner {
    padding: 24px 18px 22px;
  }

  .brand-stage {
    width: 136px;
    height: 136px;
  }

  .brand-logo {
    width: 96px;
    height: 96px;
  }

  .hero-title {
    font-size: 1.68rem;
  }

  .intro {
    font-size: .88rem;
    line-height: 1.8;
  }

  .actions {
    margin-block-start: 19px;
  }

  .action {
    min-height: 54px;
    padding-inline: 12px;
    font-size: .90rem;
  }

  .contact-action {
    min-height: 62px;
    padding-inline: 10px;
  }

  .contact-action__icon {
    width: 34px;
    height: 34px;
  }

  .contact-action__value {
    font-size: .72rem;
  }

  .contact-action__arrow {
    display: none;
  }

  .icon-button {
    height: 62px;
  }

  .social-link {
    min-height: 55px;
    font-size: .68rem;
  }

  .mini-action {
    font-size: .69rem;
  }

  .service-card > summary {
    grid-template-columns: 40px minmax(0, 1fr) 20px;
    column-gap: 8px;
    padding: 13px 11px;
  }

  .service-icon {
    width: 40px;
    height: 40px;
  }

  .service-card__question {
    font-size: .85rem;
  }

  .service-card__answer {
    font-size: .74rem;
  }

  .service-card__examples {
    padding-inline-start: 59px;
    padding-inline-end: 11px;
  }
}

@media (min-width: 720px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-block: 46px;
  }

  body::before {
    background:
      radial-gradient(circle at 78% 8%, rgba(220, 233, 223, .66), transparent 37rem),
      radial-gradient(circle at 18% 28%, rgba(217, 237, 231, .50), transparent 33rem),
      radial-gradient(circle at 50% 102%, rgba(241, 222, 208, .56), transparent 40rem),
      linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(247, 245, 240, 0));
  }

  .experience {
    width: min(calc(100% - 48px), 500px);
    margin: 0;
    border-radius: 42px;
  }

  .view__inner {
    padding: 37px 38px 35px;
  }

  .view--services .view__inner {
    padding-block: 32px 36px;
  }

  .brand-stage {
    width: 178px;
    height: 178px;
  }

  .brand-logo {
    width: 120px;
    height: 120px;
  }

  .hero-title {
    font-size: 2.3rem;
  }

  .intro {
    font-size: 1.01rem;
  }

  .actions {
    gap: 10px;
    margin-block-start: 26px;
  }

  .action {
    min-height: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-delay: 0s !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }

  .glass:not(.is-static):hover,
  .glass:not(.is-static):active {
    transform: none !important;
  }

  .toast {
    transform: none !important;
  }
}
