/* ==========================================================================
   InputFlow CSS Stylesheet
   Created with custom, premium aesthetic matching the mobile application.
   ========================================================================== */

/* --- Custom Variables / Design Tokens --- */
:root {
  /* Color Palette (Warm off-white and charcoal theme) */
  --bg-color: hsl(40, 20%, 97%);         /* Soft editorial cream (#FAF9F6) */
  --bg-gradient-start: hsl(40, 25%, 98%);
  --bg-gradient-end: hsl(40, 15%, 94%);
  
  --text-primary: hsl(120, 5%, 12%);     /* Deep warm black/charcoal (#1D1F1D) */
  --text-secondary: hsl(40, 6%, 42%);    /* Muted warm grey (#6D6B66) */
  --text-muted: hsl(40, 4%, 55%);
  
  --accent-color: hsl(120, 8%, 15%);     /* Deep olive/charcoal matching app play btn (#202420) */
  --accent-light: hsl(40, 12%, 91%);
  
  /* Borders and Dividers */
  --border-color: hsla(40, 10%, 86%, 0.6);
  --border-focus: hsla(120, 8%, 15%, 0.3);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --font-display: 'Plus Jakarta Sans', var(--font-sans);
  
  /* Transitions */
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Global Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* --- Decorative Ambient Backgrounds --- */
.glow-bg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1400px;
  height: 600px;
  background: radial-gradient(circle 400px at 50% -100px, hsla(40, 30%, 88%, 0.8), transparent 80%),
              radial-gradient(circle 600px at 20% 400px, hsla(45, 25%, 93%, 0.5), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* --- Header / Navigation --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 6vw;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  max-width: 1400px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: default;
}

.logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-color);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.btn-nav {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-primary);
  padding: 10px 20px;
  border: 1px solid var(--accent-color);
  border-radius: 40px;
  background-color: transparent;
  transition: var(--transition-smooth);
}

.btn-nav:hover {
  background-color: var(--accent-color);
  color: var(--bg-color);
  box-shadow: 0 4px 12px rgba(32, 36, 32, 0.15);
  transform: translateY(-1px);
}

/* --- Main Layout Container --- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 120px 6vw 40px 6vw;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Hero Section --- */
.hero-section {
  text-align: center;
  max-width: 760px;
  margin-top: 40px;
  margin-bottom: 50px;
  z-index: 10;
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -1.5px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--text-secondary);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.55;
  margin-bottom: 32px;
  padding: 0 4%;
}

.cta-group {
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-store-badge-link {
  display: inline-block;
  transition: var(--transition-bounce);
  border-radius: 8px;
}

.app-store-badge-link:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.app-store-badge-img {
  display: block;
  height: 44px;
  width: auto;
}

/* --- Mockup Section (CSS iPhone Frame) --- */
.mockup-section {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 80px;
  z-index: 5;
  opacity: 0;
  transform: translateY(30px);
  animation: mockupFadeIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes mockupFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.iphone-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

/* The physical outer chassis of the device (ultra-realistic) */
.iphone-device {
  position: relative;
  width: 320px;
  aspect-ratio: 9 / 19.5;
  background-color: #000000;
  /* Multi-layered metallic frame simulating a real titanium edge */
  border: 8px solid #2d2c2a;
  border-radius: 44px;
  box-shadow: 
    /* Soft resting drop shadows representing desktop layout */
    0 10px 30px rgba(0, 0, 0, 0.08), 
    0 25px 60px rgba(0, 0, 0, 0.12),
    /* Outermost chamfer thin silver highlight */
    0 0 0 1px #464543,
    /* Inner metallic highlight bevel */
    inset 0 0 0 1.5px #9a9996,
    /* Inner dark gap before the screen */
    inset 0 0 0 3px #1c1b1a;
  transition: var(--transition-bounce);
}

/* Glare highlight overlay on screen (sharp, realistic reflection) */
.iphone-glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* A sharp, sleek diagonal glare simulating real glass reflection */
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.12) 0%, 
    rgba(255, 255, 255, 0.08) 38%, 
    rgba(255, 255, 255, 0) 38.1%, 
    rgba(255, 255, 255, 0) 100%);
  border-radius: 34px;
  pointer-events: none;
  z-index: 15;
}

/* Simulated Side Buttons */
.btn-volume-up, .btn-volume-down, .btn-action, .btn-power {
  position: absolute;
  background-color: #3b3a38;
  border-radius: 2px;
  z-index: -1;
  border: 1px solid #1c1c1b;
}

.btn-action {
  left: -10.5px;
  top: 90px;
  width: 2.5px;
  height: 18px;
}

.btn-volume-up {
  left: -10.5px;
  top: 130px;
  width: 2.5px;
  height: 38px;
}

.btn-volume-down {
  left: -10.5px;
  top: 180px;
  width: 2.5px;
  height: 38px;
}

.btn-power {
  right: -10.5px;
  top: 145px;
  width: 2.5px;
  height: 56px;
}

/* Inner bezel and screen container */
.iphone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #000;
  border-radius: 34px;
  overflow: hidden;
  border: 4px solid #000; /* Screen bezel */
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.6);
}

/* Dynamic Island */
.dynamic-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 22px;
  background-color: #000;
  border-radius: 20px;
  z-index: 20;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.05);
}

/* Top Speaker Grill Slit */
.speaker-grill {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  background-color: #1a1a1a;
  border-radius: 2px;
  z-index: 20;
}

/* App Screenshot inside phone screen */
.screenshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
}

/* --- Features Section --- */
.features-section {
  width: 100%;
  max-width: 1100px;
  margin: 20px auto 40px auto;
  border-top: 1px solid var(--border-color);
  padding-top: 60px;
}

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

.feature-card {
  text-align: center;
  padding: 10px 15px;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
  display: inline-block;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}

.feature-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Footer --- */
.footer {
  width: 100%;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-gradient-end);
  padding: 50px 6vw 40px 6vw;
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-brand {
  text-align: center;
}

.footer-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.footer-nav {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  font-size: 0.88rem;
  text-decoration: none;
  color: var(--text-secondary);
  position: relative;
  padding-bottom: 2px;
  transition: var(--text-primary) 0.3s;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: var(--text-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

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

/* Tablet viewports */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 450px;
    margin: 0 auto;
  }
  
  .navbar {
    padding: 20px 6vw;
  }
  
  .container {
    padding-top: 100px;
  }
}

/* Mobile viewports */
@media (max-width: 480px) {
  .hero-title {
    letter-spacing: -0.8px;
  }
  
  .hero-subtitle {
    padding: 0;
  }
  
  .iphone-device {
    width: 280px; /* Shrink device slightly to fit small screens nicely */
  }
  
  .footer-nav {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
}
