/* ============================================================
   RAMS360 Expo landing — mobile-first responsive
   ============================================================ */

:root {
  --rams-charcoal: #303030;
  --rams-orange: #ff9d5a;
  --rams-coral: #ff7959;
  --rams-orange-deep: #e8722a;
  --rams-teal: #0d9488;

  --bg: #f3f1f8;
  --surface: #ffffff;
  --border: #d8d4e8;
  --text: #141428;
  --text-muted: #3d3d58;
  --text-soft: #6b7394;

  --accent: var(--rams-orange-deep);
  --accent-grad: linear-gradient(115deg, #ffa75a 0%, #ff8a4a 45%, #ff6b4a 100%);
  --icon-bg: #fff0e6;
  --icon-border: #ffc9a8;
  --shadow: 0 8px 24px rgba(26, 20, 70, 0.1);
  --shadow-hover: 0 14px 36px rgba(232, 114, 42, 0.18);
  --radius: 16px;
  --font: "Barlow", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --page-pad-x: max(1.1rem, env(safe-area-inset-left, 0px));
  --page-pad-r: max(1.1rem, env(safe-area-inset-right, 0px));
  --page-pad-t: max(0.75rem, env(safe-area-inset-top, 0px));
  --page-pad-b: max(1.25rem, env(safe-area-inset-bottom, 0px));
  --content-max: 26.5rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ----- Atmospheric background ----- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, #fff1e8 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, #e9f8f1 0%, transparent 50%),
    linear-gradient(180deg, #f6f5fa 0%, #fbfaf7 55%, #fff8f3 100%);
}

.ambient__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.65;
}

.ambient__glow--a {
  width: min(420px, 90vw);
  height: min(420px, 90vw);
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 157, 90, 0.28) 0%, transparent 70%);
}

.ambient__glow--b {
  width: min(320px, 75vw);
  height: min(320px, 75vw);
  bottom: -14%;
  right: -12%;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.12) 0%, transparent 70%);
}

.ambient__mesh {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(26, 20, 70, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 20, 70, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, black 15%, transparent 75%);
}

/* ----- Layout ----- */
.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding:
    var(--page-pad-t)
    var(--page-pad-r)
    var(--page-pad-b)
    var(--page-pad-x);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ----- Header / Logo ----- */
.header {
  flex-shrink: 0;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  text-align: center;
  margin-bottom: 1rem;
  padding-inline: 0.15rem;
  animation: rise 0.7s var(--ease) both;
}

.brand-logo {
  width: min(220px, 68vw);
  margin-inline: auto;
  object-fit: contain;
}

.brand-fallback {
  font-size: clamp(1.75rem, 8vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--rams-charcoal);
}

.brand-rule {
  width: 48px;
  height: 3px;
  margin: 0.85rem auto 0.75rem;
  border-radius: 3px;
  background: var(--accent-grad);
  animation: ruleIn 0.8s var(--ease) 0.15s both;
}

.tagline {
  font-size: clamp(0.98rem, 3.8vw, 1.12rem);
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.4;
  max-width: 24ch;
  margin-inline: auto;
}

/* ----- Cards: stacked on mobile ----- */
.cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 0 1 auto;
  justify-content: flex-start;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  min-width: 0;
}

.card {
  --delay: 0s;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon body"
    "cta  cta";
  align-items: center;
  column-gap: 0.9rem;
  row-gap: 0.9rem;
  width: 100%;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.1rem 1.1rem;
  box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease);
  animation: rise 0.65s var(--ease) var(--delay) both;
}

.card:nth-child(1) { --delay: 0.08s; }
.card:nth-child(2) { --delay: 0.16s; }
.card:nth-child(3) { --delay: 0.24s; }

.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--accent-grad);
  opacity: 0.9;
}

.card-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--icon-bg);
  color: #d45f18;
  border: 1.5px solid var(--icon-border);
}

.card-icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.card-body {
  grid-area: body;
  min-width: 0;
  text-align: left;
}

.card-title {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.card-desc {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}

.card-cta {
  grid-area: cta;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent-grad);
  border-radius: 999px;
  box-shadow: 0 5px 14px rgba(232, 114, 42, 0.28);
}

.card-cta-arrow {
  width: 0.9rem;
  height: 0.9rem;
  transition: transform 0.3s var(--ease);
}

.card:active {
  transform: scale(0.985);
  border-color: #ffb07a;
}

/* ----- Footer ----- */
.footer {
  flex-shrink: 0;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  text-align: center;
  margin-top: auto;
  padding-top: 1.35rem;
  padding-bottom: max(0.35rem, env(safe-area-inset-bottom, 0px));
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  animation: rise 0.7s var(--ease) 0.3s both;
}

/* ----- Motion ----- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ruleIn {
  from {
    opacity: 0;
    transform: scaleX(0.3);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* Hover only on devices that support real hover */
@media (hover: hover) and (pointer: fine) {
  .card:hover,
  .card:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: #ffb07a;
    outline: none;
  }

  .card:hover .card-cta,
  .card:focus-visible .card-cta {
    box-shadow: 0 8px 18px rgba(232, 114, 42, 0.36);
  }

  .card:hover .card-cta-arrow,
  .card:focus-visible .card-cta-arrow {
    transform: translateX(3px);
  }

  .card:focus-visible {
    box-shadow: var(--shadow-hover), 0 0 0 3px rgba(232, 114, 42, 0.4);
  }
}

/* ----- Small phones (~360px and up): slightly roomier ----- */
@media (min-width: 380px) {
  .card {
    padding: 1.15rem 1.1rem 1.05rem;
    column-gap: 1rem;
  }

  .card-title {
    font-size: 1.02rem;
  }

  .card-desc {
    font-size: 0.92rem;
  }
}

/* ----- Large phones / small tablets ----- */
@media (min-width: 480px) {
  :root {
    --page-pad-x: max(1.35rem, env(safe-area-inset-left, 0px));
    --page-pad-r: max(1.35rem, env(safe-area-inset-right, 0px));
    --page-pad-t: max(1rem, env(safe-area-inset-top, 0px));
    --page-pad-b: max(1.35rem, env(safe-area-inset-bottom, 0px));
    --content-max: 28rem;
  }

  .brand-logo {
    width: min(250px, 58vw);
  }

  .tagline {
    max-width: 28ch;
  }

  .cards {
    gap: 0.95rem;
  }

  .card {
    border-radius: 18px;
  }
}

/* ----- Tablet / desktop: 3 cards in a row ----- */
@media (min-width: 768px) {
  :root {
    --radius: 20px;
    --content-max: 1100px;
    --page-pad-x: max(2rem, env(safe-area-inset-left, 0px));
    --page-pad-r: max(2rem, env(safe-area-inset-right, 0px));
    --page-pad-t: max(2.5rem, env(safe-area-inset-top, 0px));
    --page-pad-b: max(2rem, env(safe-area-inset-bottom, 0px));
  }

  .page {
    justify-content: center;
  }

  .header {
    max-width: none;
    margin-bottom: 2.5rem;
  }

  .brand-logo {
    width: min(340px, 40vw);
  }

  .brand-rule {
    width: 56px;
    margin: 1.1rem auto 1rem;
  }

  .tagline {
    font-size: 1.15rem;
    max-width: 36ch;
  }

  .cards {
    flex: 0 1 auto;
    flex-direction: row;
    align-items: stretch;
    gap: 1.25rem;
    max-width: none;
  }

  .card {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 17.5rem;
    padding: 2.15rem 1.4rem 1.7rem;
    row-gap: 0;
    column-gap: 0;
  }

  .card-icon {
    width: 3.6rem;
    height: 3.6rem;
    margin-bottom: 1.15rem;
    border-radius: 15px;
  }

  .card-icon svg {
    width: 1.55rem;
    height: 1.55rem;
  }

  .card-body {
    text-align: center;
    margin-bottom: 1.35rem;
  }

  .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
  }

  .card-desc {
    font-size: 0.98rem;
    max-width: 22ch;
    margin-inline: auto;
  }

  .card-cta {
    margin-top: auto;
    width: auto;
    min-width: 10rem;
    min-height: 2.85rem;
    padding: 0.75rem 1.35rem;
    font-size: 0.9rem;
  }

  .footer {
    max-width: none;
    margin-top: 2.25rem;
    padding-top: 0;
    font-size: 0.76rem;
  }
}

@media (min-width: 1024px) {
  .cards {
    gap: 1.5rem;
  }

  .card {
    min-height: 18.5rem;
    padding: 2.35rem 1.6rem 1.85rem;
  }

  .brand-logo {
    width: min(360px, 34vw);
  }
}

/* Short screens (landscape phones): keep content reachable */
@media (max-height: 560px) and (orientation: landscape) {
  .page {
    min-height: auto;
    padding-block: 0.75rem;
  }

  .header {
    margin-bottom: 0.75rem;
  }

  .brand-logo {
    width: min(180px, 28vw);
  }

  .brand-rule {
    margin: 0.5rem auto 0.45rem;
  }

  .tagline {
    font-size: 0.9rem;
  }

  .cards {
    flex-direction: row;
    gap: 0.65rem;
    justify-content: stretch;
  }

  .card {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 0;
    padding: 0.85rem 0.65rem 0.75rem;
  }

  .card-icon {
    width: 2.35rem;
    height: 2.35rem;
    margin-bottom: 0.45rem;
  }

  .card-icon svg {
    width: 1.05rem;
    height: 1.05rem;
  }

  .card-body {
    text-align: center;
    margin-bottom: 0.55rem;
  }

  .card-title {
    font-size: 0.78rem;
    letter-spacing: 0.03em;
  }

  .card-desc {
    font-size: 0.72rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card-cta {
    width: 100%;
    min-height: 2.25rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.72rem;
  }

  .footer {
    margin-top: 0.75rem;
    font-size: 0.65rem;
  }
}

/* Very small height portrait: reduce header so 3 cards fit */
@media (max-height: 700px) and (orientation: portrait) {
  .header {
    margin-bottom: 0.7rem;
  }

  .brand-logo {
    width: min(180px, 58vw);
  }

  .brand-rule {
    margin: 0.45rem auto 0.4rem;
  }

  .tagline {
    font-size: 0.9rem;
  }

  .cards {
    gap: 0.65rem;
  }

  .card {
    padding: 0.9rem 0.95rem 0.85rem;
    row-gap: 0.7rem;
  }

  .card-cta {
    min-height: 2.75rem;
  }

  .footer {
    padding-top: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header,
  .card,
  .footer,
  .brand-rule {
    animation: none;
  }

  .card,
  .card-cta,
  .card-cta-arrow {
    transition: none;
  }

  .card:active {
    transform: none;
  }
}
