/* ============================================================
   Urge marketing site — base styles
   Palette + typography ported from the original Elm CommonStyling.
   ============================================================ */

/* Raleway is distributed as a variable font; two files cover every weight
   (roman 100-900 and italic). font-display: swap keeps text visible while
   the font loads. The italic file is only fetched if italic text is used. */
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/raleway-roman.woff2") format("woff2");
}
@font-face {
  font-family: "Raleway";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/raleway-italic.woff2") format("woff2");
}

:root {
  --dark-blue: #004647;
  --light-blue: #33a3a5;
  --orange-box: #ffd399;
  --orange: #ffa300;
  --deep-orange: #ff7900;
  --white: #ffffff;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  max-width: 1400px;
  min-height: 100%;
  margin: 0 auto;
  font-family: "Raleway", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  font-weight: 400;
  overflow-x: hidden;
}

h1 { font-size: 2em; }
h2 { font-size: 1.7em; font-weight: 400; }
h3 { font-size: 1.5em; }
p  { font-size: 1.2em; line-height: 1.6; }

svg { display: block; }

a.nav-link {
  color: var(--dark-blue);
  text-decoration: none;
  margin-right: 1em;
  margin-left: 10px;
  font-size: 1.3em;
  font-weight: 700;
}
a.nav-link:hover { text-decoration: underline; }

a:focus-visible {
  outline: 2px solid var(--dark-blue);
  outline-offset: 2px;
}

/* ============================================================
   Layout + decorative SVG positioning
   Ported from Elm SvgStyles.elm + the per-view css blocks.
   Mobile-first: base rules target small screens (Elm "smallscreen",
   width <= 769px); desktop layered at min-width: 770px.
   ============================================================ */

/* Decorative SVG wrappers collapse to nothing so the inner <svg>
   positions exactly as it did in the Elm source (where the css was
   applied to the svg element). plant2 is the exception: its span is a
   real overflow-hidden clipping box. */
.graphic-mobile,
.plant1,
.wave1,
.wave2,
.wave3,
.sun,
.boat,
.bottom-bot { display: contents; }

/* ---- Navbar (Main.elm navbarStyling) ---- */
nav {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  height: 100px;
  max-width: 1400px;
  padding: 15px 35px 15px 40px;
}
.logo { margin-right: auto; line-height: 0; }
.logo svg { height: 70px; width: auto; }
.nav-secondary { display: none; }            /* hidden on small screens (Elm smallScreenNavbarElement) */

/* App Store badge fill (SvgStyles.appStore) — blue on small screens */
.appstore { line-height: 0; }
.appstore .badge-bg { fill: #4086cd; }

/* ---- Hero / signup (View/Signup.elm) ---- */
.hero {
  position: relative;
  min-height: 50em;
  padding-top: 35px;
  margin-bottom: 2em;
  display: flex;
}
.hero-copy {
  position: relative;
  z-index: 2;
  margin-left: 10%;
  width: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-copy h1 {
  color: var(--dark-blue);
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.2;
}

/* Big phone illustration (SvgStyles.illustration). Mobile shows the
   mobile graphic; desktop swaps to the desktop graphic. */
.graphic-desktop { display: none; }
.graphic-mobile svg,
.graphic-desktop svg {
  position: absolute;
  right: 0;
  bottom: -50vw;
  width: 100%;
  max-height: inherit;
  min-height: calc(65% + 31vw);
}

/* plant1 (SvgStyles.plants) — desktop only */
.plant1 { display: none; }
.plant1 svg {
  position: absolute;
  width: 12vw;
  right: 50vw;
  bottom: -7vw;
  z-index: 1;
}

/* wave1 (SvgStyles.wave) */
.wave1 svg {
  position: absolute;
  right: 0;
  bottom: -15vw;
  width: 100%;
  max-width: 1400px;
}

/* ---- About (View/About.elm) ---- */
.about {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
}
.wave2 svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
}
.about-copy {
  position: relative;
  z-index: 1;
  width: auto;
  margin: 5em 8% 12em 8%;
}

/* ---- Team (View/Team.elm) ---- */
.team {
  position: relative;
  z-index: 2;
  min-height: 50em;
  display: flex;
  padding-top: 1.5em;
  padding-bottom: 2em;
}
.team-copy {
  position: relative;
  z-index: 3;
  width: 80%;
  margin-left: 10%;
  margin-bottom: 20vh;
  color: var(--white);
}

/* plant2 — span is a real clipping box (overflow hidden). Desktop only. */
.plant2 { display: none; }
.plant2 svg { width: 100%; }

/* sun (SvgStyles.sun) */
.sun svg {
  position: absolute;
  width: 35vw;
  max-width: 250px;
  left: 5vw;
  top: -20vw;
  z-index: -1;
}

/* boat (SvgStyles.boat) */
.boat svg {
  position: absolute;
  height: 11em;
  width: auto;
  bottom: 14.4vw;
  right: 8%;
}

/* bottomBot (SvgStyles.bottomHill) */
.bottom-bot svg {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
}

/* wave3 (SvgStyles.wave3) — stretched full bleed behind team */
.wave3 svg {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}

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

/* Desktop (Elm: not smallscreen, width > 769px) */
@media screen and (min-width: 770px) {
  .nav-secondary { display: inline-block; }

  .hero-copy { margin-left: 5%; width: 35%; }

  .graphic-desktop { display: contents; }
  .graphic-mobile  { display: none; }
  .graphic-desktop svg {
    width: 60%;
    max-height: 100%;
    bottom: -15px;
    min-height: 0;
  }

  .plant1 { display: contents; }

  .about-copy { width: 44%; margin: 7em 5% 5em auto; }

  .plant2 {
    display: block;
    position: absolute;
    top: -42%;
    left: 0;
    width: 30vw;
    max-width: 315px;
    height: 142%;
    overflow: hidden;
  }
  .team-copy {
    width: 40%;
    margin-left: 30vw;
    margin-top: 12vw;
    margin-bottom: 0;
  }

  /* App Store badge: grey by default, blue on hover */
  .appstore .badge-bg { fill: #999; }
  .appstore:hover .badge-bg { fill: #4086cd; }
}

/* Mid sizes — sun + plant2 adjustments (Elm minWidth 1065) */
@media screen and (min-width: 1065px) {
  .sun svg { left: 17em; top: -12em; }
  .plant2 { top: -32vw; height: calc(100% + 30vw); }
}

/* Wide (Elm breakPoint2, minWidth 1400) */
@media screen and (min-width: 1400px) {
  .plant1 svg { width: 10.5em; right: 45em; }
  .wave1 svg { bottom: -12.5em; }
  .boat svg { bottom: 12.8em; }
  .team-copy { margin-left: 26em; margin-top: 9em; }
}
