/*
 * unboundedapp.com
 *
 * Two landing pages from two design comps, sharing a skeleton and almost nothing else.
 *
 * Each comp is a fixed 2560x1440 artboard with everything absolutely positioned, so this is a
 * translation rather than a transcription: sizes are clamps against the viewport, and the phone
 * cluster uses percentages so its arrangement holds at any width.
 *
 * Layout, spacing and the phone geometry are shared. Palette, headline face and the background
 * treatment are not — the timer is dark and hairline-sans, Best Self is light with a serif
 * headline, and each matches its own app rather than a house style neither would fit. The split
 * is expressed as variables overridden under body.light, plus the handful of rules that can't be
 * a variable.
 */

@font-face { font-family: "Inter Tight"; font-display: swap; src: local("Inter Tight"); }

:root {
  --ink: #081420;
  --field-1: #1b3d5e;
  --field-2: #102943;
  --bright: #eaf3fa;
  --body: #9fc0d8;
  --eyebrow: #6f9dbe;
  --quiet: #7ea6c4;
  --line: #5c8bab;
  --link: #4aa3d8;
  --link-hover: #7cc4ec;
  --bezel: #05080c;
  --bezel-ring: #313c49;

  --shell: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--body);
  font-family: var(--shell);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--link); }
a:hover { color: var(--link-hover); }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(22px, 5vw, 64px); }

/* --- hero ---------------------------------------------------------------- */

/*
 * The comp's off-centre glow, anchored to the top right where the phones sit. On narrow screens
 * it moves to top centre, because there is no second column for it to sit behind.
 */
.hero {
  position: relative;
  background: radial-gradient(90% 120% at 72% 8%, var(--field-1) 0%, var(--field-2) 45%, var(--ink) 100%);
  padding: clamp(96px, 10vw, 152px) 0 clamp(60px, 8vw, 130px);
  overflow: hidden;
}

/*
 * A hero with no masthead above it and nothing below but the footer — so it carries the page on
 * its own, and is given the viewport to do it in, the way the comp's full-bleed artboard reads.
 * min-height rather than height: on a narrow screen the stacked copy and phone are taller than
 * the viewport and should simply run on.
 */
.hero.bare {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: clamp(44px, 6vw, 88px);
}
.hero.bare > .wrap { width: 100%; }

/*
 * Wide screens only — the narrow layout sits where it should already.
 *
 * The content is centred in the viewport, so what lifts it is the gap between the top and bottom
 * padding, not the top value on its own: with the bottom larger, the centre of the box lands
 * above the centre of the screen. Halving the top roughly doubles that lift.
 */
@media (min-width: 861px) {
  .hero.bare { padding-top: clamp(24px, 3vw, 48px); }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.eyebrow {
  font-size: clamp(0.78rem, 1.05vw, 0.95rem);
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--eyebrow);
  margin: 0 0 clamp(20px, 2.4vw, 34px);
}

h1 {
  font-size: clamp(2.6rem, 5.6vw, 5rem);
  font-weight: 100;
  letter-spacing: -0.015em;
  line-height: 1.08;
  color: var(--bright);
  margin: 0 0 clamp(20px, 2.6vw, 36px);
  text-wrap: pretty;
}

.lede {
  font-size: clamp(1.06rem, 1.75vw, 1.6rem);
  font-weight: 200;
  line-height: 1.42;
  color: var(--body);
  margin: 0 0 clamp(28px, 3.4vw, 46px);
  max-width: 24em;
  text-wrap: pretty;
}

/* --- store pills --------------------------------------------------------- */

.stores { display: flex; flex-wrap: wrap; gap: clamp(12px, 1.4vw, 22px); }

.pill {
  display: inline-block;
  border-radius: 999px;
  padding: clamp(12px, 1.15vw, 19px) clamp(24px, 2.4vw, 42px);
  font-size: clamp(0.95rem, 1.15vw, 1.16rem);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.pill.solid { background: var(--bright); color: #0a1c2e; font-weight: 400; }
.pill.solid:hover { background: #ffffff; color: #0a1c2e; }
.pill.hollow { border: 2px solid var(--line); color: #d6e7f3; font-weight: 300; }
.pill.hollow:hover { border-color: var(--bright); color: var(--bright); }

/* --- phone cluster ------------------------------------------------------- */

/*
 * The lead phone sits in normal flow and sets the height; the two behind are absolute and
 * rotated, exactly as in the comp. Percentage widths mean the arrangement holds its proportions
 * at any viewport instead of needing a breakpoint per size.
 */
.phones { position: relative; }

.phone {
  background: var(--bezel);
  border-radius: 9.5% / 4.4%;
  padding: 1.6%;
  box-shadow: 0 0 0 2px var(--bezel-ring), 0 50px 110px rgba(0, 0, 0, 0.55);
}
.phone .screen { position: relative; border-radius: 8% / 3.7%; overflow: hidden; background: #0e2338; }
.phone img { display: block; width: 100%; height: auto; }

/* The pill cutout. Sits over the screenshot's own status bar, as in the comp. */
.phone .notch {
  position: absolute;
  top: 1.4%; left: 50%; transform: translateX(-50%);
  width: 24%; height: 3.1%;
  border-radius: 999px;
  background: var(--bezel);
}

.phone.lead { position: relative; z-index: 2; width: 62%; margin: 0 auto; }
.phone.behind { position: absolute; top: 7%; width: 52%; z-index: 1; }
.phone.behind.l { left: 0; transform: rotate(-7deg); transform-origin: bottom right; }
.phone.behind.r { right: 0; transform: rotate(7deg); transform-origin: bottom left; }

/* --- brand lockup (Best Self hero) --------------------------------------- */

.lockup {
  display: flex; align-items: center;
  gap: clamp(12px, 1.3vw, 22px);
  margin: 0 0 clamp(20px, 2.4vw, 38px);
}
.lockup img { width: clamp(42px, 4vw, 74px); height: auto; flex: none; }
.lockup .eyebrow { margin: 0; }

/* --- light theme (Best Self) --------------------------------------------- */

/*
 * The two products do not share a palette and shouldn't: the timer is a dark, quiet thing you
 * open with your eyes half shut, and Best Self is a bright daytime dashboard. Each landing page
 * matches its own app rather than a house style neither would fit.
 *
 * Only the variables and the handful of rules that can't be expressed as variables are
 * overridden — layout, spacing and the phone geometry are shared.
 */
body.light {
  --ink: #f4f7f6;
  --bright: #16232b;
  --body: #4a626c;
  --eyebrow: #5f7c86;
  --quiet: #6d858f;
  --line: #a9c2cc;
  --link: #2f8fbe;
  --link-hover: #56b3d8;
  --bezel: #0d1418;
  --bezel-ring: #cfdde2;
}

body.light .hero {
  background: linear-gradient(135deg, #eafaf3 0%, #f4f6fd 42%, #fdf1f4 72%, #f8f2fb 100%);
}

/* Newsreader for the headline — the one place either page uses a serif, and what gives this
   product its warmer voice next to the timer's hairline sans. */
body.light h1 {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-weight: 300;
  font-size: clamp(2.25rem, 4.6vw, 4.25rem);
}

body.light .pill.solid {
  background: linear-gradient(90deg, #8fdcc4 0%, #7cc6f0 100%);
  color: #10262f; font-weight: 500;
}
body.light .pill.solid:hover { filter: brightness(1.05); }
body.light .pill.hollow { border-color: var(--line); color: #2c4652; font-weight: 400; }
body.light .pill.hollow:hover { border-color: #16232b; color: #16232b; }

body.light .phone { box-shadow: 0 0 0 2px var(--bezel-ring), 0 50px 110px rgba(30, 60, 75, 0.22); }
body.light .phone .screen { background: #ffffff; }

/* The mark, blown up and faded into the corners. Decorative only, hence aria-hidden in the
   markup and pointer-events off here — it must never intercept a tap meant for a button. */
.watermark { position: absolute; z-index: 0; pointer-events: none; user-select: none; }
.watermark.a { left: -16%; top: -22%; width: 39%; opacity: 0.16; }
.watermark.b { right: -10%; bottom: -26%; width: 35%; opacity: 0.14; }
.hero > .wrap { position: relative; z-index: 1; }

/* --- home: two app cards -------------------------------------------------- */

/*
 * The home page is light, and each card carries its own product's palette inside it — the timer's
 * dark field on the left, Best Self's pastel wash on the right. That works because the theme is
 * expressed as variables: setting them on .card re-skins everything nested, pills and phone bezel
 * included, without a single duplicated rule.
 */
body.apps .wrap { max-width: 1500px; }
body.apps { background: linear-gradient(150deg, #fbfcfb 0%, #f2f6f7 46%, #f6f2f8 100%); }

.apps-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 4vw, 76px) 0 clamp(32px, 4vw, 72px);
}

.intro { text-align: center; }
.intro h1 { font-size: clamp(1.9rem, 3.6vw, 3.2rem); margin: 0 0 clamp(10px, 1vw, 18px); }
.intro .lede { margin-left: auto; margin-right: auto; max-width: 26em; }

/*
 * The comp leaves about 250px here on a 2560 artboard — nearly ten per cent of the viewport, and
 * enough that the cards read as a separate page. Roughly halved: still generous, but the eye
 * travels from the promise to the products without a pause.
 */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 40px);
  margin-top: clamp(28px, 3vw, 56px);
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: clamp(26px, 2.4vw, 60px);
  padding: clamp(26px, 3.4vw, 66px);
  /*
   * A floor, not a ratio. `aspect-ratio` was clipping the buttons off the bottom: overflow:hidden
   * suppresses a grid item's automatic minimum size, so the ratio won outright and the content
   * had no way to push the box taller. Height comes from the copy now, with this as the minimum
   * so a card never looks squat, and the grid equalises the pair.
   */
  min-height: clamp(300px, 34vw, 460px);
}

.card.timer {
  --bright: #eaf3fa; --body: #9fc0d8; --eyebrow: #6f9dbe; --line: #5c8bab; --quiet: #7ea6c4;
  --bezel: #05080c; --bezel-ring: #2b3440;
  background: radial-gradient(130% 90% at 50% 0%, #1b3d5e 0%, #102943 48%, #081420 100%);
  box-shadow: 0 40px 90px rgba(20, 45, 65, 0.22);
}
.card.best {
  --bright: #16232b; --body: #4a626c; --eyebrow: #5f7c86; --line: #a9c2cc; --quiet: #43808f;
  --bezel: #0d1418; --bezel-ring: #cfdde2;
  background: linear-gradient(140deg, #eafaf3 0%, #f2f6fd 46%, #fdf1f4 78%, #f8f2fb 100%);
  box-shadow: 0 40px 90px rgba(30, 60, 75, 0.14);
}

.card-copy { position: relative; z-index: 2; width: 48%; }

.card .eyebrow { font-weight: 400; letter-spacing: 0.2em; margin-bottom: clamp(12px, 1.2vw, 28px); }

.card h2 {
  font-size: clamp(1.3rem, 2.4vw, 2.4rem);
  line-height: 1.1;
  color: var(--bright);
  margin: 0 0 clamp(12px, 1.2vw, 26px);
  text-wrap: pretty;
}
.card.timer h2 { font-weight: 100; letter-spacing: -0.01em; }
.card.best h2 {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-weight: 300; letter-spacing: -0.015em; line-height: 1.12;
}

.card .blurb {
  margin: 0 0 clamp(18px, 1.7vw, 32px);
  font-size: clamp(0.86rem, 1.12vw, 1.14rem);
  line-height: 1.5;
  color: var(--body);
}
.card.timer .blurb { font-weight: 200; }
.card.best .blurb { font-weight: 300; }

/* Smaller and stacked inside a card than they are on a hero. */
.card .stores { flex-direction: column; align-items: flex-start; gap: clamp(8px, 0.8vw, 16px); }
.card .pill {
  font-size: clamp(0.78rem, 1vw, 1.02rem);
  padding: clamp(9px, 0.85vw, 17px) clamp(16px, 1.9vw, 40px);
}
/*
 * body.light restyles both pills for a light background; the dark card has to take them back.
 * The hover state matters most: body.light's hollow hover paints the border and label #16232b,
 * which on this card is near-black on near-black — the button appeared to vanish under the
 * cursor. Five classes to body.light's four-plus-an-element, so these win.
 */
.card.timer .pill.solid { background: #eaf3fa; color: #0a1c2e; font-weight: 400; }
.card.timer .pill.solid:hover { background: #ffffff; color: #0a1c2e; filter: none; }
.card.timer .pill.hollow { border-color: var(--line); color: #d6e7f3; font-weight: 300; }
.card.timer .pill.hollow:hover { border-color: var(--bright); color: var(--bright); }

.more {
  display: inline-block;
  margin-top: clamp(14px, 1.3vw, 26px);
  /* Nudged in so it sits under the pills' labels rather than their left edge. */
  margin-left: clamp(8px, 0.9vw, 18px);
  font-size: clamp(0.82rem, 0.98vw, 1rem);
  font-weight: 300;
  color: var(--quiet);
  text-decoration: none;
}
.more:hover { color: var(--bright); }

/* Bleeds off the bottom and right of the card, which is clipped by the overflow above. */
.card .phone {
  position: absolute;
  left: 63%; top: 16%; width: 41%;
  z-index: 1;
  transform: rotate(-5deg);
  box-shadow: 0 0 0 2px var(--bezel-ring), -30px 40px 90px rgba(0, 0, 0, 0.4);
}
.card.best .phone { box-shadow: 0 0 0 2px var(--bezel-ring), -30px 40px 90px rgba(30, 60, 75, 0.3); }
.card.best .phone .screen { background: #ffffff; }

body.apps .watermark.a { left: -16%; top: -19%; width: 39%; opacity: 0.1; }
body.apps .watermark.b { right: -13%; bottom: -24%; width: 39%; opacity: 0.08; }


/* --- narrow -------------------------------------------------------------- */

@media (max-width: 860px) {
  .hero {
    background: radial-gradient(110% 60% at 50% 4%, var(--field-1) 0%, var(--field-2) 45%, var(--ink) 100%);
    padding-top: clamp(78px, 16vw, 120px);
  }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: clamp(44px, 9vw, 72px); text-align: center; }
  .lede { margin-left: auto; margin-right: auto; }
  .stores { justify-content: center; flex-direction: column; align-items: center; }
  .pill { width: min(100%, 340px); text-align: center; }

  /* One phone only. The rotated pair needs horizontal room it doesn't have here, and the comp's
     mobile artboard drops them for the same reason. */
  .phone.behind { display: none; }
  .phone.lead { width: min(78%, 320px); }


  /* Lockup stacks and centres with the rest of the copy. */
  .lockup { flex-direction: column; gap: clamp(14px, 3vw, 22px); }
  .lockup img { width: clamp(64px, 15vw, 104px); }

  body.light .hero {
    background: linear-gradient(160deg, #eafaf3 0%, #f4f6fd 40%, #fdf1f4 74%, #f8f2fb 100%);
  }
  /* One watermark only — the second sits under where the phone now is. */
  .watermark.b { display: none; }
  .watermark.a { left: auto; right: -26%; top: -8%; width: 72%; }

  /* Cards stack. Copy and phone stay side by side inside each one, as the comp's mobile
     artboard has them — the phone still bleeds off the right, just smaller. */
  .cards { grid-template-columns: minmax(0, 1fr); gap: clamp(18px, 4vw, 30px); margin-top: clamp(32px, 8vw, 60px); }

  .card { min-height: clamp(300px, 78vw, 430px); }
  .card-copy { width: 54%; }
  .card .phone { left: 62%; top: 14%; width: 46%; }

  body.apps .watermark.a { right: -26%; top: -10%; width: 68%; opacity: 0.1; }
}

/* --- very narrow: the card stacks ----------------------------------------- */

/*
 * Below about 560px the side-by-side card runs out of room. The copy column is 54% of the card,
 * which at phone width is under 200px, and "Download on the App Store" is wider than that — the
 * pill is nowrap, so it overflowed its column and the card's overflow:hidden sliced the label in
 * half. Shrinking the type enough to fit would have made the buttons illegible.
 *
 * So the card stacks instead: copy across the full width, phone beneath it and centred. The phone
 * goes back into normal flow with a negative bottom margin, which is what makes it bleed off the
 * bottom edge — deterministic, where absolute positioning would have meant guessing an offset
 * that stayed right at every width.
 */
@media (max-width: 560px) {
  .card { min-height: 0; }
  .card-copy { width: 100%; }

  .card .phone {
    position: static;
    width: 66%;
    margin: clamp(24px, 7vw, 40px) auto -46%;
    transform: rotate(-4deg);
  }
}
