/* ==========================================================================
   banaOS 4FTV — phone patents page
   A 6.9-inch phone that opens into 85 inches. The device is pure CSS 3D.
   ========================================================================== */

.phone-page {
  background: #050506;
}

/* ---- Hero ---- */

.phone-hero {
  text-align: left;
  align-items: stretch;
}

.phone-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1220px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}

.phone-hero .hero-copy {
  align-items: flex-start;
  text-align: left;
  max-width: 620px;
}

.phone-hero .eyebrow {
  color: var(--banana);
}

.phone-hero .hero-title {
  margin-top: 16px;
  font-size: clamp(42px, 4.8vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.phone-hero .hero-title .thin {
  letter-spacing: -0.03em;
}

.phone-hero .hero-sub {
  max-width: 560px;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: rgba(245, 245, 247, 0.62);
}

.phone-hero .hero-cta {
  justify-content: flex-start;
}

.phone-hero-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 650px;
  perspective: 1800px;
  perspective-origin: 50% 45%;
  animation: phoneFloat 10s ease-in-out 1.8s infinite;
}

@keyframes phoneFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -10px, 0);
  }
}

.phone-shadow {
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 5%;
  height: 38px;
  background: radial-gradient(50% 100% at 50% 40%, rgba(0, 0, 0, 0.9), transparent 72%);
  filter: blur(18px);
  pointer-events: none;
}

.phone-caption {
  margin-top: 8px;
}

/* ---- Phone device ---- */

.phone-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1800px;
  perspective-origin: 50% 45%;
}

.phone-device {
  position: relative;
  width: min(300px, 66vw);
  aspect-ratio: 0.47;
  transform-style: preserve-3d;
  transform:
    rotateX(var(--rx, 3.5deg))
    rotateY(var(--ry, 0deg))
    translate3d(var(--plx, 0px), var(--ply, 0px), 0)
    scale(var(--fs, 1));
  will-change: transform;
}

.phone-half {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  transform-style: preserve-3d;
}

.phone-half--top {
  top: 0;
  transform-origin: 50% 100%;
  transform: rotateX(calc(var(--fold, 24deg) * -1));
}

.phone-half--bottom {
  top: 50%;
}

.phone-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.phone-face--screen {
  background: #020204;
  box-shadow:
    inset 0 0 0 2px #151519,
    inset 0 0 0 3px rgba(208, 216, 232, 0.22),
    inset 0 0 0 5px #0a0a0d;
  filter: brightness(var(--dim, 1)) saturate(var(--sat, 1));
}

.phone-half--top .phone-face--screen {
  border-radius: 26px 26px 2px 2px;
}

.phone-half--bottom .phone-face--screen {
  border-radius: 2px 2px 26px 26px;
}

.phone-half--top .phone-face--back {
  transform: rotateX(180deg);
  border-radius: 26px 26px 2px 2px;
}

.phone-half--bottom .phone-face--back {
  transform: rotateX(180deg);
  border-radius: 2px 2px 26px 26px;
}

.phone-face--back {
  background:
    radial-gradient(80% 70% at 22% 6%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(150deg, #4a4a52 0%, #1b1b20 26%, #0a0a0d 66%, #2c2c33 100%);
  box-shadow:
    inset 0 0 0 2px #17171b,
    inset 0 0 0 3px rgba(208, 216, 232, 0.2);
}

.phone-wallpaper {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 82% at 58% 8%, rgba(255, 188, 60, 0.34), transparent 62%),
    radial-gradient(90% 80% at 12% 94%, rgba(52, 160, 255, 0.22), transparent 70%),
    linear-gradient(165deg, #1c1305 0%, #3a2509 28%, #0d1c2d 62%, #05060b 100%);
  background-size: 100% 200%;
}

.phone-half--top .phone-wallpaper {
  background-position: 50% 0%;
}

.phone-half--bottom .phone-wallpaper {
  background-position: 50% 100%;
}

.phone-wallpaper::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1.2px 1.2px at 18% 16%, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(1px 1px at 68% 22%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1.2px 1.2px at 42% 34%, rgba(255, 255, 255, 0.75), transparent 60%),
    radial-gradient(1px 1px at 84% 42%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1px 1px at 26% 46%, rgba(255, 255, 255, 0.55), transparent 60%),
    linear-gradient(180deg, rgba(5, 10, 30, 0.6), rgba(1, 3, 10, 0.85));
  opacity: var(--night, 0);
  pointer-events: none;
}

.phone-face--screen::after {
  content: "";
  position: absolute;
  inset: -30%;
  background: linear-gradient(112deg, transparent 40%, rgba(255, 255, 255, 0.24) 50%, transparent 60%);
  transform: translate3d(var(--sheen-x, 0), 0, 0);
  mix-blend-mode: screen;
  opacity: 0.3;
  pointer-events: none;
}

.phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 62px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 12px;
  background: #020203;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  z-index: 3;
}

.phone-screen-ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 40px 18px 0;
  color: #fff;
  z-index: 2;
}

.phone-time {
  font-family: var(--font);
  font-size: clamp(36px, 4vw, 46px);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-top: 4px;
}

.phone-date {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
}

.phone-carrier {
  position: absolute;
  left: 18px;
  top: 14px;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.5);
}

.phone-bottom-ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  padding: 16px 16px 20px;
  color: #fff;
  z-index: 2;
}

.phone-widget {
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(12, 12, 16, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.phone-widget span {
  display: block;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
}

.phone-widget b {
  display: block;
  margin-top: 3px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.phone-widget small {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.58);
}

.phone-dock {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.phone-dock i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.phone-dock i:nth-child(2) {
  background: rgba(255, 214, 10, 0.34);
}

.phone-dock i:nth-child(3) {
  background: rgba(100, 210, 255, 0.26);
}

/* camera + cover on the top back */

.phone-camera {
  position: absolute;
  left: 17px;
  top: 17px;
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: #0b0b0e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.phone-camera i {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2b2b33, #050507 62%);
  box-shadow: inset 0 0 0 2px #191920, 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.phone-camera i:nth-child(1) {
  left: 8px;
  top: 8px;
}

.phone-camera i:nth-child(2) {
  right: 8px;
  top: 8px;
}

.phone-camera i:nth-child(3) {
  left: 26px;
  bottom: 8px;
}

.phone-cover {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -50%);
  width: 118px;
  height: 66px;
  border-radius: 14px;
  background: #050508;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #f5f5f7;
}

.phone-cover span {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -0.03em;
  line-height: 1;
}

.phone-cover small {
  font-size: 7px;
  color: rgba(255, 255, 255, 0.5);
}

.phone-logo {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.32);
}

.phone-hinge {
  position: absolute;
  left: 4%;
  right: 4%;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 225, 130, 0.95) 30%, #fff6c8 50%, rgba(255, 225, 130, 0.95) 70%, transparent);
  box-shadow: 0 0 12px rgba(255, 190, 40, 0.6), 0 0 30px rgba(255, 140, 0, 0.28);
  opacity: var(--hinge, 0.42);
  z-index: 5;
  pointer-events: none;
}

.phone-stage .phone-device {
  margin: 0 auto;
}

.phone-pinned-stage {
  min-height: 620px;
}

.phone-pinned-stage .phone-device {
  width: min(280px, 60vw);
}

/* ---- Patents ---- */

.phone-page .cert-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.phone-page .cert-grid .cert:last-child {
  grid-column: 1 / -1;
}

/* ---- Specs ---- */

.phone-specs {
  background: #fff;
  color: var(--ink);
}

.phone-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(28px, 5vw, 80px);
  margin-top: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--line);
}

.spec-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.spec-item span {
  color: #6e6e73;
}

.spec-item b {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: right;
}

.phone-spec-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
}

.phone-spec-cta .link {
  color: var(--blue, #0071e3);
}

/* ---- Closing ---- */

.phone-closing .gold-text {
  max-width: 12em;
}

/* ---- Responsive ---- */

@media (max-width: 1100px) {
  .phone-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .phone-hero .hero-copy {
    align-items: center;
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
  }

  .phone-hero .hero-cta {
    justify-content: center;
  }

  .phone-hero-stage {
    min-height: 620px;
  }
}

@media (max-width: 768px) {
  .phone-hero-stage {
    min-height: 560px;
    animation: none;
  }

  .phone-device {
    width: min(252px, 64vw);
  }

  .phone-hero .hero-title {
    font-size: clamp(38px, 8vw, 50px);
  }

  .phone-pinned-stage {
    min-height: 520px;
  }

  .phone-pinned-stage .phone-device {
    width: min(230px, 58vw);
  }

  .phone-page .cert-grid {
    grid-template-columns: 1fr;
  }

  .phone-page .cert-grid .cert:last-child {
    grid-column: auto;
  }

  .phone-spec-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .phone-device {
    width: min(230px, 66vw);
  }

  .phone-camera {
    width: 64px;
    height: 64px;
    border-radius: 17px;
  }

  .phone-camera i {
    width: 20px;
    height: 20px;
  }

  .phone-camera i:nth-child(3) {
    left: 22px;
  }

  .phone-cover {
    width: 100px;
    height: 58px;
  }

  .phone-hero-stage {
    min-height: 500px;
  }

  .phone-pinned-stage {
    min-height: 470px;
  }

  .phone-pinned-stage .phone-device {
    width: min(210px, 60vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-hero-stage {
    animation: none !important;
  }

  .phone-face--screen::after {
    opacity: 0;
  }
}
