:root {
  --ink: #1C1511;
  --ink-deep: #241A14;
  --paper: #FBF6EF;
  --orange: #FF5A1F;
  --orange-light: #FF8A52;
  --tile-dark: #2F231B;
  --max-width: 1040px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "League Spartan", -apple-system, sans-serif;
  line-height: 1.1; /* Tightens all titles globally when they wrap */
}

a {
  color: var(--orange);
}

a:focus-visible,
.button:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

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

.hero-section {
  width: 100%;
  background: 
    radial-gradient(circle at 20% 20%, rgba(255, 90, 31, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 80% 40%, rgba(255, 138, 82, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 0%, rgba(255, 90, 31, 0.06) 0%, transparent 70%);
}

.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 72px 24px 48px;
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-content {
  flex: 1 1 420px;
  text-align: left;
}

.header-logo {
  margin: 0 0 40px;
  margin-left: -32px;
}

.hero h1 {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 20px;
  max-width: 600px;
}

.subhead {
  font-size: 1.15rem;
  color: #4a3f38;
  max-width: 480px;
  margin: 0 0 36px;
}

.cta-row {
  display: flex;
  justify-content: flex-start;
}

.hero-media {
  flex: 1 1 320px;
  display: flex;
  justify-content: center;
}

.phone-frame {
  position: relative;
  width: 100%;
  max-width: 300px;
  aspect-ratio: 588 / 1220;
  background: var(--ink-deep);
  border-radius: 48px;
  padding: 14px;
  box-shadow: 0 20px 50px rgba(28, 21, 17, 0.35),
              inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  
  /* Fixes iOS WebKit video overflow & rounding bugs */
  overflow: hidden !important;
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(white, black); /* Enforces strict clipping in Safari */
}

.phone-video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
  border-radius: 34px;
  
  /* Prevents iOS hardware acceleration scaling bugs */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.button {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  display: inline-block;
  background: var(--orange);
  color: var(--paper);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 16px 32px;
  border-radius: 14px;
  box-shadow: 0 6px 0 #C7430F, 0 10px 18px rgba(255, 90, 31, 0.25);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #C7430F, 0 4px 10px rgba(255, 90, 31, 0.2);
}

/* ---------- Hero Word Flip Animation ---------- */

.word-flip-wrap {
  display: inline-block;
  position: relative;
  color: var(--orange-light);
  vertical-align: bottom;
}

.word-flip {
  display: inline-block;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  opacity: 1;
}

.word-flip.flip-out {
  transform: translateY(-0.35em);
  opacity: 0;
}

.word-flip.flip-in {
  transform: translateY(0.35em);
  opacity: 0;
}


/* ---------- Features ---------- */

.features {
  background: var(--ink);
  padding: 64px 24px 72px;
}

.features h2 {
  color: var(--orange);
}

.features-intro {
  max-width: var(--max-width);
  margin: 0 auto 12px;
  text-align: center;
  color: var(--paper);
  font-size: clamp(2.0rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.15;
}

.features-subhead {
  max-width: 580px;
  margin: 0 auto 48px;
  text-align: center;
  color: #D9CFC6;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.5;
}

.tile-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.tile {
  background: var(--paper);
  border-radius: 20px;
  padding: 24px 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tile h3 {
  color: var(--orange);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tile-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--orange);
}

.tile p {
  color: #4A3F38;
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}


/* ---------- Secondary Features ---------- */

.secondary-features {
  max-width: var(--max-width);
  margin: 64px auto 0;
  padding-top: 56px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.secondary-header {
  text-align: center;
  margin-bottom: 40px;
}

.secondary-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(255, 90, 31, 0.12);
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 90, 31, 0.25);
  margin-bottom: 12px;
}

.secondary-title {
  color: var(--paper);
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
}

.secondary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.sec-tile {
  background: var(--tile-dark);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 0 var(--ink-deep);
}

.sec-tile h4 {
  color: var(--orange-light);
  font-family: "League Spartan", -apple-system, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sec-tile-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--orange-light);
}

.sec-tile p {
  color: #D9CFC6;
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.5;
}

.keycap-badge {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: #3D2E24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange-light);
  box-shadow: 0 4px 0 #1A120D, inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sec-tile-body h4 {
  color: var(--paper);
  font-family: "League Spartan", -apple-system, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.sec-tile-body p {
  color: #D9CFC6;
  font-size: 0.92rem;
  margin: 0;
  line-height: 1.5;
}


/* ---------- Keyboard Mode Section ---------- */

.keyboard-mode-section {
  background: var(--paper);
  padding: 80px 24px;
}

.keyboard-mode-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 48px;
}

.keyboard-content {
  flex: 1 1 420px;
  text-align: left;
}

.keyboard-content .secondary-tag {
  margin-bottom: 16px;
}

.keyboard-content h2 {
  font-size: clamp(2.0rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 20px;
}

.keyboard-content .subhead {
  margin-bottom: 24px;
}

.keyboard-bullets {
  list-style: none;
  padding: 0 !important;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.keyboard-bullets li {
  font-size: 0.98rem;
  color: #4A3F38;
  line-height: 1.5;
  position: relative;
  padding-left: 18px;
}

.keyboard-bullets li::before {
  content: "•";
  color: var(--orange);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.keyboard-media {
  flex: 1 1 320px;
  display: flex;
  justify-content: center;
}


/* ---------- Closing CTA & Use Cases ---------- */

.closing-cta {
  background: linear-gradient(135deg, #E2480D 0%, #B83405 100%);
  max-width: var(--max-width);
  margin: 0 auto 64px;
  padding: 80px 24px;
  text-align: center;
  border-radius: 32px;
  box-shadow: 0 12px 36px rgba(184, 52, 5, 0.25);
}

.closing-cta-content {
  position: relative;
  z-index: 2;
}

.closing-cta h2 {
  color: var(--paper);
  font-size: clamp(2.0rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 40px;
}

.use-case-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto 48px;
}

.use-case-card {
  background: rgba(251, 246, 239, 0.12);
  border: 1px solid rgba(251, 246, 239, 0.2);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  flex: 1 1 340px;
  backdrop-filter: blur(4px);
}

.use-case-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.use-case-card p {
  margin: 0;
  font-size: 0.98rem;
  color: var(--paper);
  line-height: 1.4;
}

.use-case-card p strong {
  color: #FFF;
}

.closing-cta .cta-row {
  justify-content: center;
}

.button.button-inverse {
  background: var(--paper);
  color: #B83405;
  box-shadow: 0 6px 0 #D9CFC6, 0 10px 18px rgba(0, 0, 0, 0.2);
}

.button.button-inverse:hover {
  transform: translateY(-1px);
}

.button.button-inverse:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #D9CFC6, 0 4px 10px rgba(0, 0, 0, 0.15);
}


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

.specs-bar {
  background: var(--ink-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 32px 24px;
}

.specs-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 24px;
}

.spec-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.spec-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8C8178;
  margin-bottom: 4px;
}

.spec-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--paper);
}


/* ---------- Animated FAQ Section ---------- */

.faq-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px 40px;
}

.faq-container {
  max-width: 720px;
  margin: 0 auto;
}

.faq-section h2 {
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 40px;
  color: var(--ink);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: #FFF;
  border: 1px solid rgba(28, 21, 17, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item[open] {
  border-color: var(--orange-light);
  box-shadow: 0 4px 20px rgba(28, 21, 17, 0.08);
}

.faq-question {
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--orange);
  font-weight: 400;
  transition: transform 0.25s ease;
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-item[open] .faq-answer-wrapper {
  grid-template-rows: 1fr;
}

.faq-answer {
  overflow: hidden;
}

.faq-answer p {
  padding: 0 24px 20px;
  margin: 0;
  color: #4a3f38;
  font-size: 0.96rem;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.faq-item[open] .faq-answer p {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.05s;
}


/* ---------- Footer ---------- */

footer {
  background: var(--ink-deep);
  color: #B8ACA2;
  text-align: center;
  padding: 40px 24px;
  font-size: 0.9rem;
}

.legal-links {
  margin-bottom: 14px;
}

.legal-links a {
  color: var(--paper);
  text-decoration: none;
  margin: 0 12px;
}

.legal-links a:hover {
  text-decoration: underline;
}

.contact a {
  color: var(--orange-light);
}

.copyright {
  color: #8C8178;
  margin-top: 8px;
}


/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

/* 1. iPad & Tablet Layout (761px to 1060px — includes iPad Pro 13 & Mini) */
@media (min-width: 761px) and (max-width: 1060px) {

  .tile-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
  }

  .secondary-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 20px;
  }

  .hero-section,
  .features,
  .keyboard-mode-section,
  .closing-cta,
  .faq-section,
  footer {
    padding-left: clamp(24px, 4vw, 36px) !important;
    padding-right: clamp(24px, 4vw, 36px) !important;
  }

  .header-logo {
    display: block;
  }

  footer {
    text-align: center !important;
  }

  footer .header-logo,
  footer img,
  .footer-logo {
    display: inline-block !important;
    margin-left: -32px !important;
    margin-right: 0 !important;
  }

  .hero,
  .keyboard-mode-container {
    gap: 32px;
  }
}

/* 2. Medium Screens & Small Tablets */
@media (max-width: 900px) {
  .secondary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 3. Small Tablet / Mobile Stack Header & Keyboard Section */
@media (max-width: 760px) {
  .hero,
  .keyboard-mode-container {
    flex-direction: column;
    text-align: center;
  }

  .hero-content,
  .keyboard-content {
    text-align: center;
  }

  .hero h1,
  .subhead,
  .keyboard-content .subhead {
    margin-left: auto;
    margin-right: auto;
  }

  .cta-row {
    justify-content: center;
  }

  .hero-media {
    order: 1;
  }

  .keyboard-media {
    order: 2;
  }

  .keyboard-content {
    order: 1;
  }

  .header-logo {
    display: inline-block !important;
    margin-left: -32px !important;
    margin-right: 0 !important;
  }

  .keyboard-bullets {
    text-align: left;
    max-width: 480px;
    margin: 0 auto;
    padding-left: 0 !important;
  }
}

/* 4. Mobile Cards Layout */
@media (max-width: 600px) {
  .secondary-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
}

/* 5. Mobile Tight Padding */
@media (max-width: 480px) {
  .hero { 
    padding: 56px 20px 40px; 
  }

  .keyboard-mode-section {
    padding: 56px 20px 40px;
  }
}