/* RRD Works portal — modern layout */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--rrd-font);
  line-height: 1.55;
  color: var(--rrd-text);
  background: var(--rrd-page);
}

.wrap {
  width: min(100% - 2.5rem, var(--rrd-max-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--rrd-sky);
  color: var(--rrd-navy);
  border-radius: var(--rrd-radius-sm);
  z-index: 200;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header — glass over hero */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(16, 69, 56, 0.34);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
  min-width: 0;
}

.brand__logo {
  flex-shrink: 0;
  display: block;
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.brand__name {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.brand__name-light {
  font-weight: 500;
  opacity: 0.82;
}

.brand__tagline {
  font-size: 0.76rem;
  opacity: 0.65;
  letter-spacing: 0.02em;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: block;
  padding: 0.4rem 0.55rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  border-radius: 7px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.site-nav__link:focus-visible {
  outline: 2px solid var(--rrd-sky-bright);
  outline-offset: 2px;
}

.site-nav__item--dropdown {
  position: relative;
}

.site-nav__dropdown {
  position: relative;
}

.site-nav__summary {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  cursor: pointer;
}

.site-nav__summary::-webkit-details-marker {
  display: none;
}

.site-nav__summary::marker {
  content: "";
}

.site-nav__chevron {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.1rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.75;
  transition: transform 0.15s ease;
}

.site-nav__dropdown[open] .site-nav__chevron {
  transform: rotate(-135deg);
  margin-top: 0.35rem;
}

.site-nav__submenu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  z-index: 110;
  min-width: 13.5rem;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--rrd-border);
  border-radius: var(--rrd-radius-sm);
  box-shadow: var(--rrd-shadow-hover);
}

.site-nav__sublink {
  display: block;
  padding: 0.55rem 0.7rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--rrd-navy-mid);
  text-decoration: none;
  border-radius: 7px;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav__sublink:hover {
  background: var(--rrd-accent-soft);
  color: var(--rrd-green-deep);
}

.site-nav__sublink:focus-visible {
  outline: 2px solid var(--rrd-green-mid);
  outline-offset: 1px;
}

#product-fol,
#product-trans {
  scroll-margin-top: 5.5rem;
}

@media (max-width: 520px) {
  .brand__tagline {
    display: none;
  }

  .site-nav__link {
    font-size: 0.78rem;
    padding: 0.35rem 0.45rem;
  }

  .site-header__actions {
    gap: 0.5rem;
  }
}

/* Language switch — on dark header */

.lang-switch {
  display: inline-flex;
  padding: 3px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--rrd-radius-sm);
  flex-shrink: 0;
}

.lang-switch__btn {
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.38rem 0.7rem;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-switch__btn:hover {
  color: #fff;
}

.lang-switch__btn--active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--rrd-navy);
}

.lang-switch__btn:focus-visible {
  outline: 2px solid var(--rrd-sky-bright);
  outline-offset: 2px;
}

/* Hero — full-bleed photo */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: min(88vh, 820px);
  padding: 6.5rem 0 2.5rem;
  color: #fff;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: var(--rrd-hero-image);
  background-size: cover;
  background-position: center 35%;
  transform: scale(1.02);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--rrd-hero-overlay);
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  padding-bottom: 1rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rrd-sky-bright);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  text-wrap: balance;
}

.lead {
  margin: 0 0 1.5rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.88);
  max-width: 42ch;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--rrd-navy);
  background: #fff;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.hero__credit {
  position: relative;
  z-index: 1;
  margin: 1.5rem 0 0;
  padding: 0 1.25rem 0.5rem;
  width: min(100% - 2.5rem, var(--rrd-max-width));
  margin-inline: auto;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.45);
  text-align: right;
}

.hero__credit a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}

.hero__credit a:hover {
  text-decoration: underline;
  color: rgba(255, 255, 255, 0.85);
}

/* Apps — elevated panel */

.apps {
  position: relative;
  margin-top: -2rem;
  padding: 2.5rem 0 4rem;
  background: var(--rrd-page);
  border-radius: var(--rrd-radius-lg) var(--rrd-radius-lg) 0 0;
  box-shadow: 0 -12px 40px rgba(15, 28, 42, 0.08);
  flex: 1;
}

.section-title {
  margin: 0 0 1.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--rrd-text-subtle);
}

.app-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.15rem;
  align-items: stretch;
}

@media (min-width: 640px) {
  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.app-grid > li {
  display: flex;
  min-width: 0;
}

.app-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: var(--rrd-surface);
  border: 1px solid var(--rrd-border);
  border-radius: var(--rrd-radius);
  overflow: hidden;
  box-shadow: var(--rrd-shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.app-card:hover {
  border-color: var(--rrd-border-strong);
  box-shadow: var(--rrd-shadow-hover);
  transform: translateY(-2px);
}

.app-card__visual {
  position: relative;
  flex: 0 0 10.5rem;
  height: 10.5rem;
  display: flex;
  align-items: flex-end;
  padding: 1rem 1.1rem;
}

.app-card__cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.35s ease;
}

.app-card:hover .app-card__cover {
  transform: scale(1.04);
}

.app-card__visual-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(8, 20, 16, 0.15) 0%,
    rgba(8, 20, 16, 0.55) 55%,
    rgba(8, 20, 16, 0.78) 100%
  );
}

.app-card__app-logo {
  position: relative;
  z-index: 2;
  display: block;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.app-card__visual .badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 3;
}

.app-card__body {
  padding: 1.15rem 1.35rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}

.badge--soon {
  background: var(--rrd-badge-soon-bg);
  color: var(--rrd-badge-soon-text);
  border: 1px solid var(--rrd-border);
}

.app-card__title {
  margin: 0 0 0.45rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-card__desc {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--rrd-text-muted);
  flex: 1;
  min-height: 4.75rem;
}

.app-card__link {
  margin-top: auto;
}

.app-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--rrd-navy-mid);
  text-decoration: none;
}

.app-card__link:hover {
  color: var(--rrd-navy-light);
}

.app-card__arrow {
  transition: transform 0.15s ease;
}

.app-card__link:hover .app-card__arrow {
  transform: translateX(4px);
}

.apps-note {
  margin: 2rem 0 0;
  font-size: 0.92rem;
  color: var(--rrd-text-muted);
}

.apps-note a {
  color: var(--rrd-navy-mid);
  font-weight: 600;
  text-decoration: none;
}

.apps-note a:hover {
  text-decoration: underline;
}

/* About & contact */

.content-section {
  padding: 0 0 2.5rem;
  background: var(--rrd-page);
}

.content-section--contact {
  padding-bottom: 3.5rem;
}

.content-panel {
  padding: 1.35rem 1.5rem;
  background: var(--rrd-surface);
  border: 1px solid var(--rrd-border);
  border-radius: var(--rrd-radius);
  box-shadow: var(--rrd-shadow);
}

.content-panel p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--rrd-text-muted);
}

.content-panel p + p {
  margin-top: 0.85rem;
}

.content-lead {
  font-size: 1.05rem !important;
  font-weight: 600;
  color: var(--rrd-text) !important;
}

.contact-email {
  display: inline-flex;
  margin-top: 1.1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--rrd-navy-mid);
  text-decoration: none;
}

.contact-email:hover {
  color: var(--rrd-navy-light);
  text-decoration: underline;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rrd-border);
  background: var(--rrd-surface);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.35rem 0;
}

.site-footer__mark {
  flex-shrink: 0;
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--rrd-text-muted);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .app-card,
  .app-card__cover,
  .app-card__arrow,
  .lang-switch__btn,
  .site-nav__link,
  .site-nav__chevron,
  .site-nav__sublink,
  .hero__cta {
    transition: none;
  }

  .app-card:hover {
    transform: none;
  }

  .app-card:hover .app-card__cover {
    transform: none;
  }

  .hero__bg {
    transform: none;
  }
}
